-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix: Migration target has no matching tags #3329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Migration target has no matching tags #3329
Conversation
The code prior to this commit was looking into storage tags at the storage_pool_details. However, it gets null (table is empty). It should select from storage_pool_tags, which would result on the storage pool tags. and then reflect on the code that matched the volume tags (e.g. 'aTag') with the storage pool tags (empty).
| if(! doesTargetStorageSupportDiskOffering(destPool, diskOffering)) { | ||
| throw new CloudRuntimeException("Migration target has no matching tags for volume '" +vol.getName() + "(" + vol.getUuid() + ")'"); | ||
| if (!doesTargetStorageSupportDiskOffering(destPool, diskOffering)) { | ||
| throw new CloudRuntimeException(String.format("Migration target pool [%s, tags:%s] has no matching tags for volume [%s, uuid:%s, tags:%s]", destPool.getName(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some details in the log message.
anuragaw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
though I approve of this change, I must add that tagging and tag checking should be implemented in a way transcending resource types (i.e. not only diskOfferings-storagePools, but also template/serviceOffering-host/cluster/pod etc).
|
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-2802 |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2805 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3598)
|
Description
The code prior to this commit was looking for the storage tags at the table
storage_pool_details, which is empty. It should select fromstorage_pool_tags, which contains the tags from each tagged storage.Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
Migrated a volume with a tag 'A' to a storage pool that also has the tag 'A'. Resulted on the following exception:
After update with the proposed fix, the volume got migrated successfully.