Bug 1278919

Summary: AvailabilityZoneFilter is not working in manila-scheduler
Product: [Community] RDO Reporter: Dave Cain <dcain>
Component: openstack-manilaAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED EOL QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: LibertyCC: bswartz, ctatman, esker, marty.turner, mburns, morazi, scohen, sreichar, tkatarki
Target Milestone: ---   
Target Release: Kilo   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-19 15:43:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Cain 2015-11-06 18:32:19 UTC
Description of problem:
Looking at the code in availability_zone_filter.py I found that that it expects availability_zone_id in resource_properties of a request_spec.
I captured a request_spec and found that it misses the availability_zone_id attribute. However, this attribute is defined in share_instance_properties.
Please find the captured log below. 

If resource_properties is replaced with share_instance_properties in the filter code and it fixed the issue.


Version-Release number of selected component (if applicable): Liberty


How reproducible: Always


Steps to Reproduce:
1. Install RHEL7.1 host with latest updates.
2. Configure for rdo-release-liberty-2
3. Observe scheduling problem

Actual results:

Here is the request spec that was captured:

{u'share_id': u'da465418-3d18-4bb4-8dd7-e36a8d614b03', u'share_type': {u'name': u'default', u'deleted': u'False', u'created_at': u'2015-11-04T23:58:30.000000', u'updated_at': None, u'extra_specs': {u'snapshot_support': u'<is> True', u'driver_handles_share_servers': u'<is> False'}, u'is_public': True, u'deleted_at': None, u'id': u'732be6c2-108c-45b4-8bfb-04e9d46a53ba'}, u'consistency_group': None, u'share_properties': {u'availability_zone': None, u'updated_at': None, u'share_network_id': None, u'export_locations': [], u'share_server_id': None, u'instances': [], u'snapshot_id': None, u'deleted_at': None, u'id': u'da465418-3d18-4bb4-8dd7-e36a8d614b03', u'size': 1, u'user_id': u'7bbcca2c58c3487e914a46f49b69391d', u'export_location': None, u'display_description': None, u'consistency_group_id': None, u'project_id': u'264d251899be4b59aedb1386c2d44545', u'metadata': {}, u'status': None, u'share_type_id': u'732be6c2-108c-45b4-8bfb-04e9d46a53ba', u'deleted': u'False', u'host': None, u'is_public': False, u'task_state': None, u'snapshot_support': True, u'display_name': u'mytest6', u'name': u'share-da465418-3d18-4bb4-8dd7-e36a8d614b03', u'share_proto': u'NFS', u'created_at': u'2015-11-05T18:30:20.349830', u'share_metadata': [], u'source_cgsnapshot_member_id': None}, u'share_proto': u'NFS', u'share_instance_properties': {u'status': u'creating', u'share_id': u'da465418-3d18-4bb4-8dd7-e36a8d614b03', u'name': u'share-71027e24-e5ed-4e18-ab9e-0da057bae7e6', u'availability_zone': u'npc-us-west-30a', u'terminated_at': None, u'launched_at': None, u'availability_zone_id':  u'4116e57c-b99c-45a9-97ff-afae46b12cc0', u'export_location': None, u'updated_at': None, u'share_network_id': None, u'export_locations': [], u'share_server_id': None, u'deleted': u'False', u'host': u'', u'id': u'71027e24-e5ed-4e18-ab9e-0da057bae7e6', u'deleted_at': None, u'created_at': u'2015-11-05T18:30:20.387846', u'scheduled_at': u'2015-11-05T18:30:20.385909'}, u'snapshot_id': None, 'resource_properties': {u'status': None, u'share_type_id': u'732be6c2-108c-45b4-8bfb-04e9d46a53ba', u'share_metadata': [], u'display_name': u'mytest6', u'availability_zone': None, u'deleted': u'False', u'updated_at': None, u'share_network_id': None, u'export_locations': [], u'share_server_id': None, u'instances': [], u'host': None, u'snapshot_id': None, u'is_public': False, u'deleted_at': None, u'snapshot_support': True, u'id': u'da465418-3d18-4bb4-8dd7-e36a8d614b03', u'size': 1, u'task_state': None, u'user_id': u'7bbcca2c58c3487e914a46f49b69391d', u'name': u'share-da465418-3d18-4bb4-8dd7-e36a8d614b03', u'created_at': u'2015-11-05T18:30:20.349830', u'export_location': None, u'share_proto': u'NFS', u'display_description': None, u'consistency_group_id': None, u'source_cgsnapshot_member_id': None, u'project_id': u'264d251899be4b59aedb1386c2d44545', u'metadata': {}}}


Expected results:


Additional info:

Comment 1 Ben Swartzlander 2015-11-12 13:47:48 UTC
Copied this bug upstream https://bugs.launchpad.net/manila/+bug/1515624

Comment 2 Chandan Kumar 2016-05-19 15:43:18 UTC
This bug is against a Version which has reached End of Life.
If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.