AvailabilityZoneFilter is not working in manila-scheduler

Bug #1515624 reported by Ben Swartzlander
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Goutham Pacha Ravi

Bug Description

From https://bugzilla.redhat.com/show_bug.cgi?id=1278919

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': {}}}

Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Steps to Reproduce:

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

Main thing is missing - what arguments for "create" command were used? Then, what happened and what was expected to happen?

Also, statement "AvailabilityZoneFilter is not working in manila-scheduler" is ambiguos.

"it fixed the issue." - what issue?

Is it correct to say "AvailabilityZoneFilter does not make filtering, and share can be scheduler to different AZ than requested one"?

Revision history for this message
Ben Swartzlander (bswartz) wrote :

Valeriy, the original reporter of this bug was creating manila shares using a heat template. Since the heat templates for manila are somewhat old, I think it's safe to say that no AZ input was provided.

Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Looks like Heat does not use "AZ" indeed, according to source code [1].

[1] https://github.com/openstack/heat/blob/0e3399c3/heat/engine/resources/openstack/manila/share.py#L216

Revision history for this message
ifeoktistov (ifeoktistov) wrote :

There is actually two issues with AZ:

1. AvailabilityZoneFilter does not make filtering, and share can be scheduler to different AZ than requested one

My observation is that the filter code expects availability_zone_id in resource_properties. However, it's in share_instance_properties.
Attached patch makes it work.

2. AZ is not available in Heat resource

Changed in manila:
assignee: nobody → NidhiMittalHada (nidhimittal19)
Changed in manila:
assignee: NidhiMittalHada (nidhimittal19) → nobody
Changed in manila:
milestone: none → mitaka-3
importance: Undecided → Medium
Changed in manila:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
status: New → In Progress
Changed in manila:
assignee: Goutham Pacha Ravi (gouthamr) → Alex Meade (alex-meade)
assignee: Alex Meade (alex-meade) → Goutham Pacha Ravi (gouthamr)
Changed in manila:
assignee: Goutham Pacha Ravi (gouthamr) → Alex Meade (alex-meade)
Changed in manila:
assignee: Alex Meade (alex-meade) → Goutham Pacha Ravi (gouthamr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/273727
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=41e0b0949197786292d474c960693243bebbca07
Submitter: Jenkins
Branch: master

commit 41e0b0949197786292d474c960693243bebbca07
Author: Alex Meade <email address hidden>
Date: Thu Jan 28 14:31:36 2016 -0500

    Fix scheduling with instance properties

    Currently, the scheduler will ignore any properties
    that are specific to the share instance. This is because
    they are not passed into the scheduler filters as part of
    the resource properties.

    Change-Id: I8c3274e4d2779562dd8ee529473dd7cad521dbee
    Closes-Bug: #1515624

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila 2.0.0.0b3

This issue was fixed in the openstack/manila 2.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/306057

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (stable/liberty)

Change abandoned by Alex Meade (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/306057

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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