-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Collection version
29.10.0
Environment information
quay.io/ibmmas/cli:15.13.0What happened?
when installing minio using ansible role minio, if the cluster where it is installed does not contain any of the known default classes, then the installation fails.
the default classes are defined in https://github.com/ibm-mas/python-devops/blob/stable/src/mas/devops/mas.py
for example if your cluster has rook-cephfs and rook-ceph-block as storage classes, since they are not listed in the function getDefaultStorageClasses(), the installation will fail (see relevant log output section)
workaround: edit the file /opt/app-root/lib/python3.9/site-packages/mas/devops/mas.py in the container to add your storage class to the function, for example:
elif storageClass.metadata.name in ["rook-cephfs", "rook-ceph-block"]:
result.provider = "rook"
result.providerName = "rook"
result.rwo = "rook-ceph-block"
result.rwx = "rook-cephfs"
break
the role should include a varialbe to define the storage class to use.
Relevant log output
TASK [ibm.mas_devops.minio : default-storage-classes : Lookup default storage classes]
ok: [localhost] => {"changed": false, "message": "Failed to find any default supported storage classes", "provider": null, "providerName": null, "rwo": null, "rwx": null, "success": false}
TASK [ibm.mas_devops.minio : default-storage-classes : Debug default storage classes]
ok: [localhost] => {
"msg": [
"Provider ............................... ",
"Default RWX ............................ ",
"Default RWO ............................ "
]
}
TASK [ibm.mas_devops.minio : determine-storage-classes : Default Primary Storage if not set by user]
ok: [localhost] => {"ansible_facts": {"primary_storage_class": ""}, "changed": false}
TASK [ibm.mas_devops.minio : determine-storage-classes : Assert that primary storage class has been defined]
fatal: [localhost]: FAILED! => {
"assertion": "primary_storage_class is defined and primary_storage_class != \"\"",
"changed": false,
"evaluated_to": false,
"msg": "primary_storage_class must be defined"
}