How can I create a local volume?

You have probably configured your cinder.conf to use lvm as backend:

control1:~ # grep -r enabled_backends /etc/cinder/
/etc/cinder/cinder.conf:#enabled_backends = lvm
/etc/cinder/cinder.conf:enabled_backends = rbd --> that's what I use currently

I'm not sure if it would work, it's been a while since I used local storage, but if you just comment the enabled_backend option out and restart cinder services, I believe it would create local volumes. But still, I would postpone volumes for now if you want to bring an instance up at all and try to get nova to work with glance.

Ok, that's different! I'm not running Glance on my Compute, only on my Control.

Glance is not supposed to run on a compute node, it runs on a control node. Reading the error message it seems that you have configured your glance host as it tries to connect, but do you also have configured the endpoints according to http://docs.openstack.org/draft/install-guide-debconf/debconf/debconf-api-endpoints.html? What's the output of "openstack endpoint list | grep glance"?

[waited a little while]

How long did you wait? Timeout problem? Make sure that nothing blocks the requests (proxy?), what response do you get if you execute
control1:~ # curl http://<YOUR-CONTROLLER>:9292

Which of these should I run on the Compute and which one on the Control?

On top of every "install and configure" page there is a statement where to install the required services, for example the glance page says:

"This section describes how to install and configure the Image service, code-named glance, on the controller node."

Or if you continue to the compute service, which has several components, it differs between control and compute node:

"This section describes how to install and configure the Compute service, code-named nova, on the controller node."

and

"This section describes how to install and configure the Compute service on a compute node."

Now, this might be a stupid question, but it actually only occurred to me just now
when I looking at that missing net error.

I don't think this should be a problem if you have at least a subnet assigned to the network, which is true in your case. I just tested that, the instance boots into a newly created network without any further configuration. So in your case it's the missing connection to glance, if you fix that we'll see what's next ;-)


Zitat von Turbo Fredriksson <tu...@bayour.com>:

Now that my authentication problems seems to be fixed, it's back on track with
trying to boot my first instance..

On Jun 21, 2016, at 3:17 PM, Cynthia Lopes wrote:

If not, the command is: openstack volume create --size (size in GB) --image
(image name or id) volume_name

Just for info the cinder command was not exact, it should be: cinder create
--image*-id *<IMAGE-ID> *--display-name* <NAME> <SIZE>

Thanx.

I agree with Eugen that you should make sure you can create a volume and
attach to a VM to help understand what your problem is.

Ok, so I created an empty, bootable volume. Worked just fine it seems.

I then used that when creating the instance (from Horizon).

Still the same error - Block Device Mapping is Invalid.

----- s n i p -----
bladeA01b:~# openstack volume list
+--------------------------------------+--------------+-----------+------+-------------+
| ID | Display Name | Status | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| c16975ad-dd45-41d7-b0a9-cbd0849f80e4 | test | available | 5 | |
+--------------------------------------+--------------+-----------+------+-------------+
bladeA01b:~# openstack volume show test
+--------------------------------+--------------------------------------+
| Field                          | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | true                                 |
| consistencygroup_id            | None                                 |
| created_at                     | 2016-06-22T20:48:31.000000           |
| description                    |                                      |
| encrypted                      | False                                |
| id                             | c16975ad-dd45-41d7-b0a9-cbd0849f80e4 |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | test                                 |
| os-vol-host-attr:host          | bladeA01b@lvm#LVM_iSCSI              |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 2985b96e27f048cd92a18db0dd03aa23     |
| properties                     |                                      |
| replication_status             | disabled                             |
| size                           | 5                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | available                            |
| type                           | None                                 |
| updated_at                     | 2016-06-22T20:48:48.000000           |
| user_id                        | 0b7e5b0653084efdad5d67b66f2cf949     |
+--------------------------------+--------------------------------------+
----- s n i p -----

If I understand you correctly, this is a Cinder volume, right? Because of
the "@lvm.." part?

How can I create a local volume?

Looking under "System Information -> Block Storage Services" I see only
Cinder services..

----- s n i p -----
Name             Host           Zone    Status  State   Last Updated
cinder-backup    bladeA01b      nova    Enabled Up      0 minutes
cinder-scheduler bladeA01b      nova    Enabled Up      0 minutes
cinder-volume    bladeA01b@lvm  nova    Enabled Up      0 minutes
cinder-volume    bladeA01b@nfs  nova    Enabled Down    4 hours, 13 minutes
----- s n i p -----

This guide explains about ephemeral storage options:
https://platform9.com/support/openstack-tutorial-storage-options-and-use-cases/

Thanx, I've read something similar so I'm aware of the differences and
what they do. This one I'm going to read in more detail, because it HAD
more detail! :)

Usually you can specify the directory where VM instances disks will be
stored in the compute node on nova.conf option 'instances_path' in
[DEFAULT] session.

It was commented out, but just for the sake of it I un-commented it..

Nova compute config options:
http://docs.openstack.org/liberty/config-reference/content/list-of-compute-config-options.html

Thanx. That was actually halfway to actually be "documentation". I'll bookmark
that.

The command to create the VM with an ephemeral disk (nova local storage and
not cinder) is:
openstack server create --image (image id or name) --flavor (flavor id or
name) vm_name

----- s n i p -----
bladeA01b:/var/tmp# wget --quiet http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img bladeA01b:/var/tmp# openstack image create --public --protected --disk-format qcow2 \
        --container-format docker --property architecture=x86_64 \
        --property hypervisor_type=docker \
        --file cirros-0.3.4-x86_64-disk.img cirros
+------------------+------------------------------------------------------+
| Field            | Value                                                |
+------------------+------------------------------------------------------+
| checksum         | ee1eca47dc88f4879d8a229cc70a07c6                     |
| container_format | docker                                               |
| created_at       | 2016-06-22T21:23:03Z                                 |
| disk_format      | qcow2                                                |
| file             | /v2/images/d4d913c3-21f3-4e7d-932c-2cb35c8131e8/file |
| id               | d4d913c3-21f3-4e7d-932c-2cb35c8131e8                 |
| min_disk         | 0                                                    |
| min_ram          | 0                                                    |
| name             | cirros                                               |
| owner            | 2985b96e27f048cd92a18db0dd03aa23                     |
| properties       | architecture='x86_64', hypervisor_type='docker'      |
| protected        | True                                                 |
| schema           | /v2/schemas/image                                    |
| size             | 13287936                                             |
| status           | active                                               |
| tags             |                                                      |
| updated_at       | 2016-06-22T21:23:04Z                                 |
| virtual_size     | None                                                 |
| visibility       | public                                               |
+------------------+------------------------------------------------------+
bladeA01b:/var/tmp# openstack server create --image cirros --flavor m1.tiny test3 Multiple possible networks found, use a Network ID to be more specific. (HTTP 409) (Request-ID: req-381a6df8-cd8b-474a-89c4-8a5935b3d7f8)
bladeA01b:/var/tmp# openstack network list
+--------------------------------------+------------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+------------+--------------------------------------+
| fb1a3653-44d9-4f98-a357-c87406a8ea47 | physical | 5e3ea098-975d-460c-b313-61c11b2175d3 | | 2bb7b8e2-188f-4e46-bf4d-ef5ec81ddb4d | network-99 | 6ef5d993-2796-4adf-a724-eae5f5d1cc53 |
+--------------------------------------+------------+--------------------------------------+
bladeA01b:/var/tmp# openstack server create --image cirros --flavor m1.tiny --nic net-id=2bb7b8e2-188f-4e46-bf4d-ef5ec81ddb4d test3
+--------------------------------------+------------------------------------------------+
| Field | Value |
+--------------------------------------+------------------------------------------------+
| OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | None | | OS-EXT-SRV-ATTR:hypervisor_hostname | None | | OS-EXT-SRV-ATTR:instance_name | instance-00000003 | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | None | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | | addresses | | | adminPass | whateversecret | | config_drive | | | created | 2016-06-22T21:26:55Z | | flavor | m1.tiny (5936ba55-7d76-4b80-8b3a-73b458b306f2) | | hostId | | | id | 860613fe-3834-4f72-909b-5fb4b7ff2932 | | image | cirros (d4d913c3-21f3-4e7d-932c-2cb35c8131e8) | | key_name | None | | name | test3 | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | project_id | 2985b96e27f048cd92a18db0dd03aa23 | | properties | | | security_groups | [{u'name': u'default'}] | | status | BUILD | | updated | 2016-06-22T21:26:55Z | | user_id | 0b7e5b0653084efdad5d67b66f2cf949 |
+--------------------------------------+------------------------------------------------+
[waited a little while]
bladeA01b:/var/tmp# openstack server show test3 | grep fault
| fault | {u'message': u'Build of instance 860613fe-3834-4f72-909b-5fb4b7ff2932 aborted: Cannot load repository file: Connection to glance host http://10.0.4.3:9292 failed: Error finding address for http://10.0.4.3:9292/v1/images/d4d913c3-21f3-4e7d-932c-2cb35c8131e8: HTTPConnecti', u'code': 500, u'details': u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1926, in _do_build_and_run_instance\n filter_properties)\n File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2083, in _build_and_run_instance\n \'create.error\', fault=e)\n File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 221, in __exit__\n self.force_reraise()\n File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 197, in force_reraise\n six.reraise(self.type_, self.value, self.tb)\n File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2067, in _build_and_run_instance\n instance=instance)\n File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__\n self.gen.throw(type, value, traceback)\n File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2244, in _build_resources\n reason=six.text_type(exc))\n', u'created': u'2016-06-22T21:27:28Z'} |
----- s n i p -----

Ok, that's different! I'm not running Glance on my Compute, only on my Control.

Which of these should I run on the Compute and which one on the Control?

The documentation (one of many I follow: http://docs.openstack.org/draft/install-guide-debconf/common/get_started_image_service.html) doesn't say. Only which ones to install
on the Control.

----- s n i p -----
bladeA03b:/etc/nova# apt-cache search glance | grep ^glance
glance - OpenStack Image Registry and Delivery Service - Daemons
glance-api - OpenStack Image Registry and Delivery Service - API server
glance-common - OpenStack Image Registry and Delivery Service - common files
glance-glare - OpenStack Artifacts - API server
glance-registry - OpenStack Image Registry and Delivery Service - registry server
----- s n i p -----

Currently, I have all of them only on the Control..

Concerning the flavor, I think the flavor you use should have the same disk
size as the disk.

Ok, I'll keep that in mind, thanx.


Now, this might be a stupid question, but it actually only occurred to me just now when I looking at that missing net error. I haven't really setup my network, just
"winged" it. I' pretty sure it's not even close to working (I need to do more
studying in the matter - I still don't have a clue about how things is supposed
to work in/on the OpenStack side of things).

I've postponed it because I desperately need ANY success story - creating an
instance, even if it won't technically work would help a lot in that. I figured it should at least TRY to start.. And I _ASUME_ (!!) that as long as the Control can talk to the Compute and "tell" it what to do (such as "attach this volume/image"), it should at least be able to be created. I'm guessing the networking (Neutron) in OS is for the _instance_, not for administration etc. Or, did I misunderstood
(the little I've read and actually understood about it :)?
--
Att tänka innan man talar, är som att torka sig i röven
innan man skiter.
- Arne Anka


_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack



--
Eugen Block                             voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG      fax     : +49-40-559 51 77
Postfach 61 03 15
D-22423 Hamburg                         e-mail  : ebl...@nde.ag

        Vorsitzende des Aufsichtsrates: Angelika Mozdzen
          Sitz und Registergericht: Hamburg, HRB 90934
                  Vorstand: Jens-U. Mozdzen
                   USt-IdNr. DE 814 013 983


_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to