Skip to content

Improvement request: scale vm with new service offering, despite of storage tags #5512

Closed

Description

@weizhouapache

Currently we can only scale vm to new service offering which have all the tags of current service offering.

It would be good to have an option to support vm upgrade to new service offering which do not have all the tags.

ISSUE TYPE
  • Bug Report
  • Improvement Request
COMPONENT NAME
API
CLOUDSTACK VERSION
master/4.16
CONFIGURATION
OS / ENVIRONMENT

N/A

SUMMARY

It was introduced by ba0503d

// Check that the service offering being upgraded to has all the tags of the current service offering.
final List<String> currentTags = StringUtils.csvTagsToList(currentServiceOffering.getTags());
final List<String> newTags = StringUtils.csvTagsToList(newServiceOffering.getTags());
if (!newTags.containsAll(currentTags)) {
throw new InvalidParameterValueException("Unable to upgrade virtual machine; the current service offering " + " should have tags as subset of " +
"the new service offering tags. Current service offering tags: " + currentTags + "; " + "new service " + "offering tags: " + newTags);
}

STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Activity

  1. slavkap commented on Nov 3, 2021

    @slavkap
    Contributor

    @weizhouapache, it will be great if this limitation is removed. There is the same case when we migrate a volume to a different storage pool, which I guess according to the comments is needed only for VMware

        // OfflineVmwareMigration: check storage tags on disk(offering)s in comparison to destination storage pool
        // OfflineVmwareMigration: if no match return a proper error now
        DiskOfferingVO diskOffering = _diskOfferingDao.findById(vol.getDiskOfferingId());
        if (diskOffering == null) {
            throw new CloudRuntimeException("volume '" + vol.getUuid() + "', has no diskoffering. Migration target cannot be checked.");
        }
        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(),
                    getStoragePoolTags(destPool), vol.getName(), vol.getUuid(), diskOffering.getTags()));
        }
    
  2. added this to the 4.17.0.0 milestone on Dec 16, 2021
  3. sureshanaparti commented on Dec 16, 2021

    @sureshanaparti
    Contributor

    @weizhouapache @slavkap I think, this can be addressed properly after decoupling the service and disk offerings (done in the PR: #5008).

  4. nvazquez commented on Feb 4, 2022

    @nvazquez
    Contributor

    @sureshanaparti @slavkap can this limitation be removed now? I see the PR mentioned is already merged

  5. sureshanaparti commented on Feb 4, 2022

    @sureshanaparti
    Contributor

    @sureshanaparti @slavkap can this limitation be removed now? I see the PR mentioned is already merged

    @nvazquez I think so, we have to check / confirm the current behavior in main as the service and disk offerings are decoupled. cc @harikrishna-patnala

  6. slavkap commented on Feb 4, 2022

    @slavkap
    Contributor

    @nvazquez, I didn't have the chance to test it, but I will do it and let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions