availability_zone list is incorrectly fetched in nova driver

Bug #1680359 reported by Haiwei Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
High
Haiwei Xu

Bug Description

When trying to create a profile with 'availability_zone' property, got the following error:

2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server result = func(ctxt, **new_args)
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 153, in wrapper
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server return f(*args, **kwargs)
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/engine/service.py", line 71, in wrapped
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server return func(self, ctx, req_obj)
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/engine/service.py", line 395, in profile_create
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server profile = cls.create(ctx, name, req.profile.spec, metadata=metadata)
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/profiles/base.py", line 178, in create
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server profile.validate(True)
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/profiles/base.py", line 286, in validate
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server self.do_validate(obj=self)
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/profiles/os/nova/server.py", line 411, in do_validate
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server self._validate_az(obj, az_name)
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/profiles/os/nova/server.py", line 322, in _validate_az
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server res = self.compute(obj).validate_azs([az_name])
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server File "/opt/stack/senlin/senlin/drivers/openstack/nova_v2.py", line 215, in validate_azs
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server if az['zoneState']['available']]
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server TypeError: 'AvailabilityZone' object has no attribute '__getitem__'
2017-04-06 08:00:17.702 TRACE oslo_messaging.rpc.server

Haiwei Xu (xu-haiwei)
Changed in senlin:
assignee: nobody → Haiwei Xu (xu-haiwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (master)

Fix proposed to branch: master
Review: https://review.openstack.org/454082

Changed in senlin:
status: New → In Progress
Qiming Teng (tengqim)
Changed in senlin:
importance: Undecided → High
milestone: none → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/454082
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=18c66f9db58999adb9bf39a5557f90f519cedcc2
Submitter: Jenkins
Branch: master

commit 18c66f9db58999adb9bf39a5557f90f519cedcc2
Author: HaiweiXu <email address hidden>
Date: Thu Apr 6 07:52:16 2017 +0000

    Fix availability_zone issues in nova driver

    When getting availability_zones from Nova, SDK will return an
    object of AvailabilityZone class which is processed further by
    SDK instead of a respond body from Nova.

    Change-Id: Idf1eaf092b2bb860e1784604fd44d3974cd0572c
    Closes-bug: #1680359

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/454422

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (stable/ocata)

Reviewed: https://review.openstack.org/454422
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=ce509a040a55bcf62729c2f3934cb7df2e90a40a
Submitter: Jenkins
Branch: stable/ocata

commit ce509a040a55bcf62729c2f3934cb7df2e90a40a
Author: HaiweiXu <email address hidden>
Date: Thu Apr 6 07:52:16 2017 +0000

    Fix availability_zone issues in nova driver

    When getting availability_zones from Nova, SDK will return an
    object of AvailabilityZone class which is processed further by
    SDK instead of a respond body from Nova.

    Change-Id: Idf1eaf092b2bb860e1784604fd44d3974cd0572c
    Closes-bug: #1680359
    (cherry picked from commit 18c66f9db58999adb9bf39a5557f90f519cedcc2)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 4.0.0.0b1

This issue was fixed in the openstack/senlin 4.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 3.0.1

This issue was fixed in the openstack/senlin 3.0.1 release.

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.