create volume from source volume fails if different volume type

Bug #1874076 reported by michael-mcaleer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
Unassigned

Bug Description

==================================================
Reproduced on master branch dated today 21/04/2020
Latest Commit: https://opendev.org/openstack/cinder/commit/3e958207ab88db31d221125db4abffcdf57ec59e
Running Ubuntu 18.04.4 LTS with Python 3.6.9
==================================================

When creating a volume from a source volume if the volume-type differs the new volume creation will fail due to the scheduler determining no-weighed backends available.

This issue can be seen when using the Cinder CLI, OpenStack Volume CLI, and the Horizon UI.

1. Create vol_a with volume-type X
2. Create vol_b from source vol_a with volume-type X -- OPERATION SUCCESSFUL
3. Create vol_c from source vol_a with no volume-type specified (default volume-type Y selected) -- OPERATION UNSUCCESSFUL
4. Confirm default volume-type Y is valid, create vol_d with volume-type Y -- OPERATION SUCCESSFUL
5. Create vol_e from source vol_a with volume-type Z -- OPERATION UNSUCCESSFUL
6. Confirm default volume-type Z is valid, create vol_f with volume-type Z -- OPERATION SUCCESSFUL
7. Using Horizon UI, create vol_g from source vol_a, cannot pick volume-type via UI, default is automatically selected -- OPERATION UNSUCCESSFUL

The scheduler is the cause of the unsuccessful operations here, each time it is the same 'no weighed backends found', but these pools are all available when 'cinder get-pools' is run and all have headroom.

Apr 21 13:00:32 dev-master cinder-scheduler[5579]: DEBUG cinder.scheduler.filter_scheduler [None req-ef9d31e4-fa4a-43f8-88dc-407ec073d560 admin None] Filtered [host 'dev-master@POWERMAX_ISCSI_NONE#None+None+SRP_1+000111222333':free_capacity_gb: 95068.15999999999, total_capacity_gb: 98037.76,allocated_capacity_gb: 1, max_over_subscription_ratio: 20.0,reserved_percentage: 10, provisioned_capacity_gb: 19281.92,thin_provisioning_support: True, thick_provisioning_support: False,pools: None,updated at: 2020-04-21 12:00:10.789259] {{(pid=5579) _get_weighted_candidates /opt/stack/cinder/cinder/scheduler/filter_scheduler.py:348}}
    Apr 21 13:00:32 dev-master cinder-scheduler[5579]: DEBUG cinder.scheduler.base_weight [None req-ef9d31e4-fa4a-43f8-88dc-407ec073d560 admin None] Weigher CapacityWeigher returned, weigher value is {max: 1931670.28, min: 1931670.28} {{(pid=5579) get_weighed_objects /opt/stack/cinder/cinder/scheduler/base_weight.py:153}}
    Apr 21 13:00:32 dev-master cinder-scheduler[5579]: DEBUG cinder.scheduler.host_manager [None req-ef9d31e4-fa4a-43f8-88dc-407ec073d560 admin None] Weighed [WeighedHost [host: dev-master@POWERMAX_ISCSI_NONE#None+None+SRP_1+000111222333, weight: 0.0]] {{(pid=5579) get_weighed_backends /opt/stack/cinder/cinder/scheduler/host_manager.py:502}}
    Apr 21 13:00:32 dev-master cinder-scheduler[5579]: WARNING cinder.scheduler.filter_scheduler [None req-ef9d31e4-fa4a-43f8-88dc-407ec073d560 admin None] No weighed backend found for volume with properties: {'id': '7c71f33f-fc8b-4ee0-b72f-ee73286e9cd1', 'name': 'POWERMAX_ISCSI_NONE', 'description': None, 'is_public': True, 'projects': [], 'extra_specs': {'volume_backend_name': 'POWERMAX_ISCSI_NONE', 'pool_name': 'None+None+SRP_1+000111222333'}, 'qos_specs_id': None, 'created_at': '2020-04-21T09:34:07.000000', 'updated_at': None, 'deleted_at': None, 'deleted': False}
    Apr 21 13:00:32 dev-master cinder-scheduler[5579]: INFO cinder.message.api [None req-ef9d31e4-fa4a-43f8-88dc-407ec073d560 admin None] Creating message record for request_id = req-ef9d31e4-fa4a-43f8-88dc-407ec073d560
    Apr 21 13:00:32 dev-master cinder-scheduler[5579]: ERROR cinder.scheduler.flows.create_volume [None req-ef9d31e4-fa4a-43f8-88dc-407ec073d560 admin None] Failed to run task cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create: No valid backend was found. No weighed backends available: cinder.exception.NoValidBackend: No valid backend was found. No weighed backends available
    Apr 21 13:00:32 dev-master cinder-scheduler[5579]: DEBUG cinder.volume.flows.common [None req-ef9d31e4-fa4a-43f8-88dc-407ec073d560 admin None] Setting Volume d6b36b26-b446-4369-8d44-1ccb47a79632 to error due to: No valid backend was found. No weighed backends available {{(pid=5579) error_out /opt/stack/cinder/cinder/volume/flows/common.py:83}}

I have attached a file with all CLI commands run, output from each where it provides relevant information, all available pools for the environment, and excerpts from the scheduler logs where no weighed backend warnings where logged.

Revision history for this message
michael-mcaleer (mmcaleer) wrote :
Revision history for this message
Helen Walsh (walshh2) wrote :

Discussed at weekly cinder meeting 10 Sep and this is as designed.

Changed in cinder:
status: New → Invalid
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.