instance path wrongfully trimmed during cold migration
Bug #1716862 reported by
Claudiu Belu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
compute-hyperv |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
During cold migration, the following happens:
1. source node stops the VMs, moves its file to a _revert path (\some\
2. the destination node gets the disk_info. If it was configured not to move the VM storage (multiple CSVs cluster scenario), it will copy the files from the _revert path to a path without the ending _revert (\some\
The issue is that string.rstrip function behaves in an unexpected way:
>>> "instance-
'instance-000000b'
This can lead to various errors.
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/503562 /git.openstack. org/cgit/ openstack/ compute- hyperv/ commit/ ?id=e00240f5d7e 2d8e385b8c0d6ea 18ed9eddd6e5d1
Committed: https:/
Submitter: Jenkins
Branch: master
commit e00240f5d7e2d8e 385b8c0d6ea18ed 9eddd6e5d1
Author: Claudiu Belu <email address hidden>
Date: Wed Sep 13 11:31:12 2017 +0300
Fixes cold migration path trimming issue
During cold migration, the following steps happen:
1. The source node will stop the VM, copy the VM files to a _revert path,
destroy the VM, and return the _revert path as disk_info.
2. The destination node will get that disk_info, and if it was configured
not to move the storage (multiple CSVs cluster scenario), it will just
copy the files to a path without the ending _revert.
The issue is that rstrip can strip more characters than desired. It will
remove all characters contained by "_revert" from the given path's ending.
For example:
"instance_ 000000be_ revert" .rstrip( "_revert" ) => "instance_000000b"
Change-Id: I784835800a961b e4ba755a4d51edb c931eccdc57
Closes-Bug: #1716862