Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion magnum_cluster_api/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def get_object(self) -> dict:
"allowVolumeExpansion": True,
"kind": objects.StorageClass.kind,
"metadata": {
"name": "share-%s"
"name": "share-nfs-%s"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The good thing is that we can delete SC(StorageClass) in use without any issue.
So I'd prefer to check current SC's provisioner field and delete if that is old one(without proto prefix). And create a new one. And all those operations in the code, not manual.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upgrade is stuck with existing PVs that already have "provisioner" defined and which cannot be easily modified.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ricolin i am a bit lost, PV doesn't have provisioner field. It only includes StorageClass field.
So once you delete old storageclass and create new one using the same name, it should be ok, no?

Copy link
Member Author

@ricolin ricolin Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okozachenko1203
It's in PVC on

kind: PersistentVolumeClaim
metadata:
  annotations:
    ...
    volume.beta.kubernetes.io/storage-provisioner: manila.csi.openstack.org
    volume.kubernetes.io/storage-provisioner: manila.csi.openstack.org
    ...

And here in PV

apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    pv.kubernetes.io/provisioned-by: manila.csi.openstack.org
spec:
  ...
  csi:
    ...
    driver: manila.csi.openstack.org
    ...
    volumeAttributes:
      ...
      storage.kubernetes.io/csiProvisionerIdentity: 1722446784123-8081-manila.csi.openstack.org
    ...

% utils.convert_to_rfc1123(st.name),
},
"provisioner": "nfs.manila.csi.openstack.org",
Expand Down
4 changes: 2 additions & 2 deletions src/addons/cinder_csi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ impl ClusterAddon for Addon {
Self { cluster }
}

fn enabled(&self) -> bool {
self.cluster.labels.cinder_csi_enabled
fn enabled(&self) -> bool {
self.cluster.labels.cinder_csi_enabled.parse::<bool>().expect("failed to fetch cluster label")
}

fn secret_name(&self) -> Result<String, ClusterError> {
Expand Down
4 changes: 2 additions & 2 deletions src/addons/manila_csi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ impl ClusterAddon for Addon {
Self { cluster }
}

fn enabled(&self) -> bool {
self.cluster.labels.manila_csi_enabled
fn enabled(&self) -> bool {
self.cluster.labels.manila_csi_enabled.parse::<bool>().expect("failed to fetch cluster label")
}

fn secret_name(&self) -> Result<String, ClusterError> {
Expand Down
12 changes: 6 additions & 6 deletions src/magnum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ pub struct ClusterLabels {
pub cilium_ipv4pool: String,

/// Enable the use of the Cinder CSI driver for the cluster.
#[builder(default = true)]
#[pyo3(default = true)]
pub cinder_csi_enabled: bool,
#[builder(default = "true".to_owned())]
#[pyo3(default = "true".to_owned())]
pub cinder_csi_enabled: String,

/// The tag of the Cinder CSI container image to use for the cluster.
#[builder(default="v1.32.0".to_owned())]
#[pyo3(default="v1.32.0".to_owned())]
pub cinder_csi_plugin_tag: String,

/// Enable the use of the Manila CSI driver for the cluster.
#[builder(default = true)]
#[pyo3(default = true)]
pub manila_csi_enabled: bool,
#[builder(default = "true".to_owned())]
#[pyo3(default = "true".to_owned())]
pub manila_csi_enabled: String,

/// The tag of the Manila CSI container image to use for the cluster.
#[builder(default="v1.32.0".to_owned())]
Expand Down
Loading