Not able to launch new volume-based instance in different availability_zone

Bug #1481818 reported by krogon-intel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Alexander Gubanov
6.1.x
Won't Fix
High
Denis Puchkin
7.0.x
Fix Released
High
Ivan Kolodyazhny
8.0.x
Fix Released
High
Alexander Gubanov

Bug Description

Impacting: OpenStack Release: Juno on CentosOS 6.5 (2014.2.2-6.1)
Storage: shared Ceph
Working correctly with previous release: Juno on CentOS 6.5 (2014.2-6.0)

Steps to reproduce:
1. Open Horizon - Login with admin account.
2. Select Admin - Host Aggregates - Create Host Aggregate.
3. Type "aaa" for Name and "aaa" for Availability Zone.
4. Select Project - Instances - Launch Instance.
5. Launch instance from image to new volume. Choose "aaa" as Availability Zone.
6. Error "Failed to launch instance" during "Block Device Mapping".
7. Looking at cinder-api.log: InvalidInput: Invalid input received: Availability zone 'aaa' is invalid

Description:
Nova sends POST request to cinder-api with "availability_zone": "aaa". Cinder-api is not able to found that AZ (aaa is only valid for nova). As the errors happens at cinder-api disabling AvailabilityZoneFilter for cinder-scheduler will not resolve that.
In Fuel 6.0 nova was sending correct POST with "availability_zone": "nova".

Fuel version:
  release: "6.1"
  openstack_version: "2014.2.2-6.1"
  api: "1.0"
  build_number: "18"
  build_id: "2015-06-29_20-18-55"

cinder-api.log
2015-08-05T14:24:15.939378+00:00 info: POST http://10.251.101.5:8776/v1/f9da8071379940a88759d80941b41a70/volumes
2015-08-05T14:24:15.940345+00:00 debug: Create volume request body: {u'volume': {u'status': u'creating', u'user_id': u'3c34b579d2644de3869054306699394d', u'imageRef': u'd666e851-d0de-4af7-92ce-be4143502651', u'availability_zone': u'aaa'
, 'scheduler_hints': {}, u'attach_status': u'detached', u'display_description': u'', u'metadata': {}, u'source_volid': None, u'snapshot_id': None, u'display_name': u'', u'project_id': u'f9da8071379940a88759d80941b41a70', u'volume_type':
None, u'size': 32}}
(...)
2015-08-05T14:24:16.378119+00:00 warning: Availability zone 'aaa' is invalid
2015-08-05T14:24:16.378995+00:00 debug: Exiting old state 'SCHEDULING' in response to event 'wait'
2015-08-05T14:24:16.379408+00:00 debug: Entering new state 'WAITING' in response to event 'wait'
2015-08-05T14:24:16.380200+00:00 debug: Exiting old state 'WAITING' in response to event 'analyze'
2015-08-05T14:24:16.380366+00:00 debug: Entering new state 'ANALYZING' in response to event 'analyze'
2015-08-05T14:24:16.381298+00:00 warning: Task 'cinder.volume.flows.api.create_volume.ExtractVolumeRequestTask;volume:create' (9e55ec29-6819-409f-b96d-812d2bbe8e2d) transitioned into state 'FAILURE'
2015-08-05 14:24:16.380 64039 TRACE cinder.volume.api Traceback (most recent call last):
2015-08-05 14:24:16.380 64039 TRACE cinder.volume.api File "/usr/lib/python2.6/site-packages/taskflow/engines/action_engine/executor.py", line 35, in _execute_task
2015-08-05 14:24:16.380 64039 TRACE cinder.volume.api result = task.execute(**arguments)
2015-08-05 14:24:16.380 64039 TRACE cinder.volume.api File "/usr/lib/python2.6/site-packages/cinder/volume/flows/api/create_volume.py", line 406, in execute
2015-08-05 14:24:16.380 64039 TRACE cinder.volume.api source_volume)
2015-08-05 14:24:16.380 64039 TRACE cinder.volume.api File "/usr/lib/python2.6/site-packages/cinder/volume/flows/api/create_volume.py", line 314, in _extract_availability_zone
2015-08-05 14:24:16.380 64039 TRACE cinder.volume.api raise exception.InvalidInput(reason=msg)
2015-08-05 14:24:16.380 64039 TRACE cinder.volume.api InvalidInput: Invalid input received: Availability zone 'aaa' is invalid

summary: - Not able to lunch new instance in different availability_zone
+ Not able to lunch new volume-based instance in different
+ availability_zone
description: updated
summary: - Not able to lunch new volume-based instance in different
+ Not able to launch new volume-based instance in different
availability_zone
tags: added: customer-found
Changed in mos:
assignee: nobody → MOS Cinder (mos-cinder)
importance: Undecided → High
status: New → Confirmed
milestone: none → 7.0
Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

@krogon-intel, could you please provide output of 'cinder-manage service list' ?

Changed in mos:
assignee: MOS Cinder (mos-cinder) → Ivan Kolodyazhny (e0ne)
Revision history for this message
krogon-intel (krogon-intel) wrote :

# cinder-manage service list 2>/dev/null
Binary Host Zone Status State Updated At
cinder-backup rbd:volumes nova enabled :-) 2015-08-06 15:16:07
cinder-volume rbd:volumes nova enabled :-) 2015-08-06 15:16:07
cinder-scheduler rbd:volumes nova enabled :-) 2015-08-06 15:16:07
# cinder availability-zone-list
+------+-----------+
| Name | Status |
+------+-----------+
| nova | available |
+------+-----------+

I not sure cinder is wrong here, because nova is sending that POST. Do you thing cinder improperly handles that?

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

@krogon-intel, please, provide output of 'cinder availability-zone-list' and 'nova availability-zone-list' too

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

krogon-intel, you tries to create a volume in 'aaa' AZ. Cinder doesn't have such one. It can't create a volume with such AZ. Are you sure that it worked in a previous release?

Changed in mos:
status: Confirmed → Incomplete
assignee: Ivan Kolodyazhny (e0ne) → krogon-intel (krogon-intel)
tags: added: cinder
Revision history for this message
krogon-intel (krogon-intel) wrote :

Just like mentioned in description
1) this is something I do in Horizon
2) this was working in Fuel 6.0
3) I know there is no AZ like "aaa" in cinder, but it tries to use AZ from nova
4) I didn't found easy way to add new AZ in cinder: each controller have the same service name (rbd:volumes) so I cannot change storage_availability_zone in /etc/cinder/cinder.conf (race condition of last updated controller)

To confirm my word I think this is the commit that changed the behavior: https://github.com/openstack/nova/commit/d23ddc475c9e51ac3f8d0d1574aeb0707c9fd82c

Now let's see it in action:
[node from MOS 6.0]# grep "volume_api.create(" /usr/lib/python2.6/site-packages/nova/virt/block_device.py -A1
            vol = volume_api.create(context, self.volume_size,
                                    '', '', snapshot)
--
            vol = volume_api.create(context, self.volume_size,
                                    '', '', image_id=self.image_id)
--
            vol = volume_api.create(context, self.volume_size, vol_name, '')
            if wait_func:
[node from MOS 6.1]# grep "volume_api.create(" /usr/lib/python2.6/site-packages/nova/virt/block_device.py -A1
            vol = volume_api.create(context, self.volume_size, '', '',
                                    snapshot, availability_zone=av_zone)
--
            vol = volume_api.create(context, self.volume_size,
                                    '', '', image_id=self.image_id,
--
            vol = volume_api.create(context, self.volume_size, vol_name, '',
                                    availability_zone=av_zone)

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

There was a bug in nova which is fixed by the commit: https://github.com/openstack/nova/commit/6060888b58db42eea826939852838f9e1c204d2c

tags: added: nova
Revision history for this message
krogon-intel (krogon-intel) wrote :

@Ivan: I do not think you get it correctly. In previous comment I linked to the same commit (to be clearly merge of that commit). They call it fix, because it was impossible to spawn VM in different cinder AZ. However this introduces the problems in MOS architecture as there is only single cinder AZ and you cannot that change that easily.

Revision history for this message
krogon-intel (krogon-intel) wrote :

Discussion started on mailing irc about proper behaviour: http://lists.openstack.org/pipermail/openstack-dev/2015-August/071732.html

Changed in mos:
status: Incomplete → Confirmed
Andrey Maximov (maximov)
Changed in mos:
assignee: krogon-intel (krogon-intel) → Ivan Kolodyazhny (e0ne)
Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

@krogon-intel, according to the documentation [1] you should select available AZ in a new host aggregate. If you specify a new AZ, it won't work in nova too [2].

Before [3] was merged, nova didn't pass AZ to Cinder so it was able to use volume in any available AZ.

MOS architecture and Cinder extension is out of scope of this issue, so I would like to close this issue for MOS 7.0 and implement better solutions both in MOS and Cinder in the following releases.

[1] http://docs.openstack.org/havana/config-reference/content/host-aggregates.html
[2] http://paste.openstack.org/show/429718/
[3] https://github.com/openstack/nova/commit/6060888b58db42eea826939852838f9e1c204d2c

Changed in mos:
status: Confirmed → Won't Fix
Revision history for this message
krogon-intel (krogon-intel) wrote :

You still do not get the point.
You can have unlimited nova AZ, but single cinder AZ. How this may work? Whole AZ feature and host-aggregate is useless.

You are right that mentioned commit in nova introduce the problem. But you are the integrator! You have backported that commit from Kilo 2015.1.1 to Juno. It stopped working after upgrading from MOS 6.0 to 6.1.

Guys from cinder are working on blueprint to solve that (allow multiple AZ assignment to single cinder service or additional flag to ignore AZ from scheduler), but this will be ready for M-release. Till that time you should address this issue.

BTW. You are wrong with the example you showed. After adding some host to aggregate new AZ is created: http://paste.openstack.org/show/434630/

Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :
Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

krogon-intel, I will backport patch from Liberty to MOS7. Thanks for helping me to understand why it is needed.

Changed in mos:
status: Won't Fix → Confirmed
status: Confirmed → In Progress
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/cinder (openstack-ci/fuel-7.0/2015.1.0)

Fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Ivan Kolodyazhny <email address hidden>
Review: https://review.fuel-infra.org/11056

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/cinder (openstack-ci/fuel-7.0/2015.1.0)

Reviewed: https://review.fuel-infra.org/11056
Submitter: mos-infra-ci <>
Branch: openstack-ci/fuel-7.0/2015.1.0

Commit: c5a863eaa47ad097361f01fa2cfbdf4540194a04
Author: Ivan Kolodyazhny <email address hidden>
Date: Wed Sep 2 10:57:58 2015

Adds allow_availability_zone_fallback option to Cinder

This change adds allow_availability_zone_fallback, which allows Cinder
to fall back to an already configured availability zone if the
requested availability zone is unavailable.

Change-Id: Id6b43fc3243b4de82241cfab34ff10953b537874
DocImpact: cinder
Closes-Bug: #1481818

Ivan Kolodyazhny (e0ne)
Changed in mos:
status: In Progress → Fix Committed
Revision history for this message
Oleksiy Butenko (obutenko) wrote :

on verification

Revision history for this message
Oleksiy Butenko (obutenko) wrote :

verified on MOS 7.0 ISO 265
{"build_id": "265", "build_number": "265", "release_versions": {"2015.1.0-7.0": {"VERSION": {"build_id": "265", "build_number": "265", "api": "1.0", "fuel-library_sha": "4fdf3d6b070204366593012428395d173698678a", "nailgun_sha": "0dfcf73deb8ae99654f3da2ea95b7b68b9ee7273", "feature_groups": ["mirantis"], "fuel-nailgun-agent_sha": "d7027952870a35db8dc52f185bb1158cdd3d1ebd", "openstack_version": "2015.1.0-7.0", "fuel-agent_sha": "082a47bf014002e515001be05f99040437281a2d", "production": "docker", "python-fuelclient_sha": "9643fa07f1290071511066804f962f62fe27b512", "astute_sha": "e63709d16bd4c1949bef820ac336c9393c040d25", "fuel-ostf_sha": "582a81ccaa1e439a3aec4b8b8f6994735de840f4", "release": "7.0", "fuelmain_sha": "9ab01caf960013dc882825dc9b0e11ccf0b81cb0"}}}, "auth_required": true, "api": "1.0", "fuel-library_sha": "4fdf3d6b070204366593012428395d173698678a", "nailgun_sha": "0dfcf73deb8ae99654f3da2ea95b7b68b9ee7273", "feature_groups": ["mirantis"], "fuel-nailgun-agent_sha": "d7027952870a35db8dc52f185bb1158cdd3d1ebd", "openstack_version": "2015.1.0-7.0", "fuel-agent_sha": "082a47bf014002e515001be05f99040437281a2d", "production": "docker", "python-fuelclient_sha": "9643fa07f1290071511066804f962f62fe27b512", "astute_sha": "e63709d16bd4c1949bef820ac336c9393c040d25", "fuel-ostf_sha": "582a81ccaa1e439a3aec4b8b8f6994735de840f4", "release": "7.0", "fuelmain_sha": "9ab01caf960013dc882825dc9b0e11ccf0b81cb0"}

Changed in mos:
status: Fix Committed → Fix Released
Revision history for this message
krogon-intel (krogon-intel) wrote :

Any chance for 6.1 bugfix?

Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

That was fixed in 7.0, I nominated that bug to 6.1-updates. The fix looks pretty simple, it's likely to be included into the next 6.1 maintenance update.

krogon-intel, please stay tuned.

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/cinder (openstack-ci/fuel-6.1/2014.2)

Fix proposed to branch: openstack-ci/fuel-6.1/2014.2
Change author: Ivan Kolodyazhny <email address hidden>
Review: https://review.fuel-infra.org/12786

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

Fix was merged with the latest stable/liberty code

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

Fix for this introduces new config option. But bug is customer-found. I'm not sure that we could merge it

Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Closing as Won't Fix for 6.1-updates as we don't introduce new features in maintenance updates. allow_availability_zone_fallback option is available in 7.0 and 8.0.

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/cinder (openstack-ci/fuel-6.1/2014.2)

Change abandoned by Vitaly Sedelnik <email address hidden> on branch: openstack-ci/fuel-6.1/2014.2
Review: https://review.fuel-infra.org/12786
Reason: Abandoned as we don't accept new features to stable branch.

Revision history for this message
Alexander Gubanov (ogubanov) wrote :

I've verified on MOS 8.0 (build 264) - bug is reproduced.
Env: HA, 3 controllers, 2 compute, neutron vlan, ceph for all
Details here http://paste.openstack.org/show/481890/

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

Alexander,

Fix is merged for to 8.0 branch [1]. Did you set allow_availability_zone_fallback=True in cinder.conf to make this patch work?

[1] https://review.fuel-infra.org/gitweb?p=openstack/cinder.git;a=commit;h=b85d2812a8256ff82934d150dbc4909e041d8b31

Revision history for this message
Alexander Gubanov (ogubanov) wrote :

I've verified it again on MOS 8.0 (build 368) with allow_availability_zone_fallback=True in cinder.conf - all works fine!
ENV: Neutron VLAN, 3 controller with ceph for all, 2 compute
Details: http://pastebin.com/nDRsX3fq

tags: added: wontfix-feature
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.