yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #56111
[Bug 1620989] [NEW] When booting a VM with creation of a new volume, the host AZ info is not passed to Cinder
Public bug reported:
Description
===========
When attaching of volumes across Nova/Cinder AZs is forbidden
(cross_az_attach = False in nova.conf) and you try to boot an instance
without specifying an AZ (i.e. you are ok with any of the AZs the
instance will be scheduled to), and block device mapping states that a
new volume must be created (e.g. in order to boot from it), then the
info about the AZ won't be passed to Cinder and it will create the new
volume in the default AZ.
Steps to reproduce
==================
1. Configure multiple AZs in Nova and Cinder.
2. Disable attaching of volumes across AZs in nova.conf:
[cinder]
cross_az_attach = False
3. Restart nova-compute service.
4. Boot a new VM *without* specifying an AZ explicitly (so that Nova can pick up a host in *any* of the AZs) + state in the block device mapping, that a new volume must be created, e.g.:
nova boot --block-device source=image,id=decd5d33-fdd5-4736-b10a-
fd2ceebbd224,dest=volume,size=1,shutdown=remove,bootindex=0 --nic net-
id=68038c06-f160-4405-9acc-b3480e3e8830 --flavor m1.nano demo
Expected result
===============
Instance is booted successfully.
Actual result
=============
Instance failed to boot and goes to ERROR state (Block Device Mapping is
Invalid)
nova-compute log says:
2016-09-07 09:54:26.396 13021 ERROR nova.compute.manager [instance:
1c7de927-9755-4081-99cf-3d1132a9d45a] InvalidVolume: Invalid volume:
Instance 10 and volume e3970ecc-796a-46f8-952f-1bc804aab4a4 are not in
the same availability_zone. Instance is in az1. Volume is in az2
^ this is because *null* value was passed to Cinder on creation of a new volume and cinder-scheduler picked the cinder-volume in the *default* AZ configured in cinder.conf, instead of using the AZ of the host a Nova instance was scheduled to.
Environment
===========
DevStack, libvirt, Cinder LVM
Nova version: master (f1b70d9457ae6c1fba3e7ac7c5f8b08d9042f2ba)
Two AZs configured in Nova and Cinder
** Affects: nova
Importance: Undecided
Assignee: Roman Podoliaka (rpodolyaka)
Status: New
** Tags: cinder volumes
** Changed in: nova
Assignee: (unassigned) => Roman Podoliaka (rpodolyaka)
** Summary changed:
- When a booting a VM with creation of a new volume, the host AZ info is not passed to Cinder
+ When booting a VM with creation of a new volume, the host AZ info is not passed to Cinder
** Tags added: cinder volumes
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1620989
Title:
When booting a VM with creation of a new volume, the host AZ info is
not passed to Cinder
Status in OpenStack Compute (nova):
New
Bug description:
Description
===========
When attaching of volumes across Nova/Cinder AZs is forbidden
(cross_az_attach = False in nova.conf) and you try to boot an instance
without specifying an AZ (i.e. you are ok with any of the AZs the
instance will be scheduled to), and block device mapping states that a
new volume must be created (e.g. in order to boot from it), then the
info about the AZ won't be passed to Cinder and it will create the new
volume in the default AZ.
Steps to reproduce
==================
1. Configure multiple AZs in Nova and Cinder.
2. Disable attaching of volumes across AZs in nova.conf:
[cinder]
cross_az_attach = False
3. Restart nova-compute service.
4. Boot a new VM *without* specifying an AZ explicitly (so that Nova can pick up a host in *any* of the AZs) + state in the block device mapping, that a new volume must be created, e.g.:
nova boot --block-device source=image,id=decd5d33-fdd5-4736-b10a-
fd2ceebbd224,dest=volume,size=1,shutdown=remove,bootindex=0 --nic net-
id=68038c06-f160-4405-9acc-b3480e3e8830 --flavor m1.nano demo
Expected result
===============
Instance is booted successfully.
Actual result
=============
Instance failed to boot and goes to ERROR state (Block Device Mapping
is Invalid)
nova-compute log says:
2016-09-07 09:54:26.396 13021 ERROR nova.compute.manager [instance:
1c7de927-9755-4081-99cf-3d1132a9d45a] InvalidVolume: Invalid volume:
Instance 10 and volume e3970ecc-796a-46f8-952f-1bc804aab4a4 are not in
the same availability_zone. Instance is in az1. Volume is in az2
^ this is because *null* value was passed to Cinder on creation of a new volume and cinder-scheduler picked the cinder-volume in the *default* AZ configured in cinder.conf, instead of using the AZ of the host a Nova instance was scheduled to.
Environment
===========
DevStack, libvirt, Cinder LVM
Nova version: master (f1b70d9457ae6c1fba3e7ac7c5f8b08d9042f2ba)
Two AZs configured in Nova and Cinder
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1620989/+subscriptions