When a `dataPool` is passed while creating a volume, there is a
`%!s(MISSING)` piece added to a debug log message. When concatinating
strings, the `%s` formatter is not needed.
Updates: #5103
Signed-off-by: Niels de Vos <ndevos@ibm.com>
VolumeGroupReplicationContent controller needs `get`, `list` and `watch`
access control for resource `VolumeGroupReplicationContents`. And `get`
access control for resource `VolumeGroupReplicationClasses`.
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit adds new controller that watches for the
VolumeGroupReplicationContent and regenerates the OMAP data if
it doesn't exists.
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit adds `RegenerateVolumeGroupJournal` to Manager
interface. RegenerateVolumeGroupJournal regenerate the omap
data for the volume group.
This performs the following operations:
- extracts clusterID and Mons from the cluster mapping
- Retrieves pool and journalPool parameters from the VolumeGroupReplicationClass
- Reserves omap data
- Add volumeIDs mapping to the reserved volume group omap object
- Generate new volume group handle
Returns the generated volume group handler.
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit adds groupUUID param for `ReserveName` to be used for
OMAP name reserve instead of auto-generating.
This is useful for mirroring and metro-DR ensuring that mirrored
resources have consistent OMAP names across mirrored clusters.
Signed-off-by: Praveen M <m.praveen@ibm.com>
The attribute and variable `csiID` ise used for at least two different
things:
- name of the driver instance, used for journalling metadata
- objects of the CSIIdentifier struct, composing a volume-handle
By changing the name of the `csiID` attribute for driver instances to
`driverInstance`, any confusion should be prevented.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This patch adds the functionality to map the k8s volumesnapshots
to the cephfs/rbd snapshots.
This patch also adds a wrapper around oc/kubectl called `kube_client`
which will help get rid of code duplication.
Closes: #3344
Signed-off-by: Niraj Yadav <niryadav@redhat.com>
Instead of passing lazy_itable_init=1 and lazy_journal_init=1 to
mkfs.ext4, pass assume_storage_prezeroed=1 which is
stronger and allows the filesystem to skip inode table zeroing
completely instead of simply doing it lazily.
The support for this flag is checked by trying to format a fake
temporary image with mkfs.ext4 and checking its STDERR.
Closes: #4948
Signed-off-by: Niraj Yadav <niryadav@redhat.com>
Bumps the k8s-dependencies group with 1 update in the /api directory: [k8s.io/api](https://github.com/kubernetes/api).
Updates `k8s.io/api` from 0.31.3 to 0.32.1
- [Commits](https://github.com/kubernetes/api/compare/v0.31.3...v0.32.1)
---
updated-dependencies:
- dependency-name: k8s.io/api
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: k8s-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
Issue: When an RBD image is created in a non-default namespace,
the OMAP data for the PersistentVolume fails to regenerate
because it still attempts to locate the RBD image in the default
namespace.
This commit ensures the correct radosNamespace is retrieved from
the ceph-csi-config.
Signed-off-by: Praveen M <m.praveen@ibm.com>
Volume Replication has been added to csi-addons
as a feature in it sometime back. But the doc still
uses the volume replication operator to enable
mirroring and create related resources for
disaster recovery.
this commit updates the document to use csi-addons
instead of creating volumereplication sidecar.
Signed-off-by: yati1998 <ypadia@redhat.com>
The Kubernetes CSI sidecars have had several releases that were not
included in deployments by Rook yet, update them to the versions that
are available today:
- csi-node-driver-registrar:v2.13.0
- csi-provisioner:v5.1.0
- csi-attacher:v4.8.0
Signed-off-by: Niels de Vos <ndevos@ibm.com>
Problem: When the encryptionType is not specified in the StorageClass,
the default type (block) is used and stored in OMAP. However, during
OMAP regeneration in a secondary cluster, the default type is incorrectly
set to none. This discrepancy leads to errors during PVC cloning,
with the message: `cannot create encrypted volume from unencrypted volume.`
Solution: Update the default encryption type to consistently use
block instead of none.
Signed-off-by: Praveen M <m.praveen@ibm.com>
The `offlineExpansion` option enables tests that try to expand volumes
in the CSI Controller (provisioner). This is only possible for BlockMode
volumes, as a FileMode volume needs run a filesystem resizer while the
volume is attached.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
this commit adds a check to getVolumeReplicationInfo
to include status not found error while getting the
remote status.
This helps the failover to be done even if remote site status
is not found
Signed-off-by: yati1998 <ypadia@redhat.com>
CephFS uses the parameter `volumeGroupNamePrefix` for creating VolumeGroups.
This commit renames `groupNamePrefix` to `volumeGroupNamePrefix` for RBD
VolumeGroup creation to ensure consistent naming.
Signed-off-by: Praveen M <m.praveen@ibm.com>
Once the version we use for upgrade testing does
not depend on adminID and adminKey we should update
the tests to use just the userID and userKey.
Signed-off-by: Niraj Yadav <niryadav@redhat.com>
This patch modifies the code to use userID and
userKey for provisioning of both static and dynamic
PVs.
In case user credentials are not found admin credentials
are used as a fallback and for backwards compatibility.
Signed-off-by: Niraj Yadav <niryadav@redhat.com>