vscsi driver pre_live_migration_on_destination may not be handling hdisk discovery correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nova-powervm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
In nova_powervm.
1 # Iterate through host vios list to find valid hdisks.
2 for vios_w in vios_wraps:
3 status, device_name, udid = self._discover_
4 vios_w, volume_id)
5 # If we found one, no need to check the others.
6 found = found or hdisk.good_
7 # if valid udid is returned save in mig_data
8 volume_key = 'vscsi-' + volume_id
9 if udid is not None:
10 mig_data[
11
12 if not found or volume_key not in mig_data:
13 ex_args = dict(volume_
14 instance_
15 raise p_exc.VolumePre
- What does the comment on line 5 mean? We're still "checking the others" I think. Should there be a 'break' there? (But then we wouldn't be setting volume_key - see below.)
- We *shouldn't* have empty vios_wraps, but if we did, volume_key would be unset and line 12 would break.
- Line 12 is only checking the *last* volume_key we found. Is that right? Should lines 12-15 be inside the loop?
Thanks for auto-spacing that for me. Let's try again:
1 # Iterate through host vios list to find valid hdisks. volume_ on_vios( discovery( status, device_name) volume_ key] = udid id=volume_ id, name=self. instance. name) MigrationFailed (**ex_args)
2 for vios_w in vios_wraps:
3 status, device_name, udid = self._discover_
4 vios_w, volume_id)
5 # If we found one, no need to check the others.
6 found = found or hdisk.good_
7 # if valid udid is returned save in mig_data
8 volume_key = 'vscsi-' + volume_id
9 if udid is not None:
10 mig_data[
11
12 if not found or volume_key not in mig_data:
13 ex_args = dict(volume_
14 instance_
15 raise p_exc.VolumePre