VMware: retype fails with AttributeError 'NoneType' object has no attribute 'service_content'

Bug #1380675 reported by Vipin Balachandran
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Vipin Balachandran
Juno
Fix Released
Undecided
Unassigned
VMwareAPI-Team
New
Undecided
Unassigned

Bug Description

Retype fails with

^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00mTraceback (most recent call last):
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m File "/opt/stack/cinder/cinder/volume/manager.py", line 1410, in retype
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m host)
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m return f(*args, **kwargs)
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m File "/opt/stack/cinder/cinder/volume/drivers/vmware/vmdk.py", line 1434, in retype
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m new_profile)
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m File "/opt/stack/cinder/cinder/volume/drivers/vmware/datastore.py", line 263, in is_datastore_compliant
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m profile_id = self.get_profile_id(profile_name)
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m File "/opt/stack/cinder/cinder/volume/drivers/vmware/datastore.py", line 59, in get_profile_id
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m profile_id = self._vops.retrieve_profile_id(profile_name)
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m File "/opt/stack/cinder/cinder/volume/drivers/vmware/volumeops.py", line 1361, in retrieve_profile_id
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m for profile in self.get_all_profiles():
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m File "/opt/stack/cinder/cinder/volume/drivers/vmware/volumeops.py", line 1339, in get_all_profiles
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00m profile_manager = pbm.service_content.profileManager
^[[01;31m2014-10-13 17:28:37.031 TRACE cinder.volume.manager ^[[01;35m^[[00mAttributeError: 'NoneType' object has no attribute 'service_content'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/127992
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=6ac6225e72bde92f66da8e92c563c140471b949b
Submitter: Jenkins
Branch: master

commit 6ac6225e72bde92f66da8e92c563c140471b949b
Author: Vipin Balachandran <email address hidden>
Date: Mon Oct 13 19:34:36 2014 +0530

    VMware: Fix initialization of datastore selector

    The WSDL URL of storage policy service is determined and a session is
    created using it in do_setup(). This session is later used to initialize
    the datastore selector property (ds_sel), which uses the session for all
    storage policy related API calls.

    After commit a8fa3ceb1e72bac2ab67f569a2ca009f995f59fd (Integrate
    OSprofiler and Cinder), the properties defined in vmdk module are called
    before do_setup(). As a result, the ds_sel (datastore selector) property
    is initialized with a session instance containing a 'None' PBM (storage
    policy service) WSDL URL. This results in failures of all storage policy
    related APIs invoked using datastore selector. This patch fixes the
    problem by re-initializing the property in do_setup().

    Change-Id: Ibdf8b23f9e215000cf9053b81d374066fabd6851
    Closes-Bug: #1380675

Changed in cinder:
status: In Progress → Fix Committed
Mike Perez (thingee)
Changed in cinder:
milestone: none → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/130213

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

Reviewed: https://review.openstack.org/130213
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=7270e3fbfb0272ac7812fa3032cafcabec6d3742
Submitter: Jenkins
Branch: stable/juno

commit 7270e3fbfb0272ac7812fa3032cafcabec6d3742
Author: Vipin Balachandran <email address hidden>
Date: Mon Oct 13 19:34:36 2014 +0530

    VMware: Fix initialization of datastore selector

    The WSDL URL of storage policy service is determined and a session is
    created using it in do_setup(). This session is later used to initialize
    the datastore selector property (ds_sel), which uses the session for all
    storage policy related API calls.

    After commit a8fa3ceb1e72bac2ab67f569a2ca009f995f59fd (Integrate
    OSprofiler and Cinder), the properties defined in vmdk module are called
    before do_setup(). As a result, the ds_sel (datastore selector) property
    is initialized with a session instance containing a 'None' PBM (storage
    policy service) WSDL URL. This results in failures of all storage policy
    related APIs invoked using datastore selector. This patch fixes the
    problem by re-initializing the property in do_setup().

    Change-Id: Ibdf8b23f9e215000cf9053b81d374066fabd6851
    Closes-Bug: #1380675
    (cherry picked from commit 6ac6225e72bde92f66da8e92c563c140471b949b)

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-1 → 2015.1.0
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.