apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2k stars 1.09k forks source link

XenServer, management server sends pool UUID instead of the PATH, as the SR name #4729

Closed andrijapanicsb closed 3 years ago

andrijapanicsb commented 3 years ago
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
4.14.0.0 tested
CONFIGURATION

Original Cloudplatform 4.7.1 with XenServer with preSetup storage (iscis) - all this is less relevant, see down

OS / ENVIRONMENT

NA

SUMMARY

After upgrading ACP 4.7.1 to ACS 4.14.0.0, preSetup storage type can not be mounted on XS servers, as ACS DB is sending UUID (instead of the pool name) to the XS to mount it - see details below

DB upgraded to 4.14, but the same data is in 4.7.1 before the upgrade - storage_pool table:

               id: 2
             name: XenServer-Primary
             **uuid: 1e189b97-974d-35b6-bc76-50bca7704ea0**
        pool_type: PreSetup
             port: 0
   data_center_id: 2
           pod_id: 2
       cluster_id: 3
       used_bytes: 28898754560
   capacity_bytes: 214714810368
     host_address: localhost
        user_info: NULL
             path: /XEN_PRIMARY
          created: 2021-02-24 10:38:37
          removed: NULL
      update_time: NULL
           status: Maintenance
           storage_provider_name: DefaultPrimary
            scope: CLUSTER
       hypervisor: NULL
          managed: 0
    capacity_iops: NULL

In CLoudPlatform 4.7.1. this used to work fine, "PATH" filed was sent as the SR name to the XS to mount it.

In CloudStack 4.14.0.0, mgmt server sends UUID (1e189b97-974d-35b6-bc76-50bca7704ea0) as the SR name parameter for XS when mounting it, instead of "path" (XEN_PRIMARY), so the SR mount fails:

2021-02-25 03:49:45,306 INFO [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-3:ctx-7a7ee26b job-118/job-119 ctx-6e3dd2e5) (logid:edf9d62a) Unable to contact resource. com.cloud.exception.StorageUnavailableException: Resource [StoragePool:2] is unreachable: Unable to create Vol[26|vm=26|ROOT]:There are 0 SRs with same name: 1e189b97-974d-35b6-bc76-50bca7704ea0

The workaround was (this is customer env) to replace UUID value with the value of the "PATH" field so that XS can mount it (what consequences this might have, is unknown)

DaanHoogland commented 3 years ago

@rhtyd @shwstppr , not sure if this should go in a point release. Looks like an extra version of the XS Resource(Base) it might be needed. cc @andrijapanicsb

andrijapanicsb commented 3 years ago

Current code puts the XS SR name (when doing preSetup storage) into the "UUID" field in DB...

rohityadavcloud commented 3 years ago

Fixed in https://github.com/apache/cloudstack/pull/4816