Skip to content

Bug : SharedMountPoint not working after StorPool plugin support #6455

@dhslove

Description

@dhslove

After adding support for StorPool in CloudStack version 4.17, Default Primary Storage of SharedMountPoint Type is no longer created. This Bug is related and caused by #6007

This is an issue caused by the StoragePoolType of the StorPoolStorageAdaptor.

Currently, the Pool Type of StorPoolStorageAdaptor is set to SharedMountPoint.
See the following code.

StorPoolStorageAdaptor :

@StorageAdaptorInfo(storagePoolType=StoragePoolType.SharedMountPoint)
public class StorPoolStorageAdaptor implements StorageAdaptor {
    public static void SP_LOG(String fmt, Object... args) {
    ......

For this reason, even if it is a Default SharedMountPoint type of storage other than StorPool, LibvirtStorageAdaptor is not selected by the following code, but StorPoolStorageAdaptor is selected and an error occurs.

KVMStoragePoolManager :

    private StorageAdaptor getStorageAdaptor(StoragePoolType type) {
        // type can be null: LibVirtComputingResource:3238
        if (type == null) {
            return _storageMapper.get("libvirt");
        }
        StorageAdaptor adaptor = _storageMapper.get(type.toString());
        if (adaptor == null) {
            // LibvirtStorageAdaptor is selected by default
            adaptor = _storageMapper.get("libvirt");
        }
        return adaptor;
    }

In my opinion, it is better to create a separate Pool Type for StorPoolStorageAdaptor like the LINSTOR Plugin.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
UI, API, Plugin
CLOUDSTACK VERSION
4.17.0
CONFIGURATION

3 Hosts, GFS2 Clustered File System, Shared Mount Point : /mnt/gfs2

OS / ENVIRONMENT

CentOS 8.5, CloudStack 4.17.0

SUMMARY
STEPS TO REPRODUCE
1. AddPrimaryStorage 
2. Select SharedMountPoint Protocol
3. Input Mount Directory
4. Select DefaultPrimary Provider
5. Submit 
EXPECTED RESULTS

Create Shared Mount Point Primary Storage

ACTUAL RESULTS

SharedMountPoint Primary Storage is recorded in DB, but the pool is not actually created because an appropriate StorageAdaptor is not selected.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions