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>
- gomnd is replaced by mnd in v1.58.0
- gosec exlcude G115 rule (Potential integer overflow when converting between integer types)
- disable new iface linter
- disable new recvcheck linter
Signed-off-by: Praveen M <m.praveen@ibm.com>
Fix status codes that are returned for Get/Delete RPC calls
for VolumeGroup/VolumeGroupSnapshot.
Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
Currently, CephCSI only uses listSnaps to determine
number of snapshots on a RBD image and uses snapshot
names as child image names to flatten them.
But child images may have different name(in case of
group snapshot) or they maybe in trash
(deleted k8s VolSnapshot with alive restored PVC).
The above problems are avoid by making use of both
snap and child image lists.
Signed-off-by: Rakshith R <rar@redhat.com>
This commit consolidates flatten logic checks for cloneDepth
and snapshotLimit in PrepareVolumeForSnapshot. This allows
the function to be called for both CreateSnapshot and
CreateVolumeGroupSnapshot.
Clone Depth check and flattening of grand parent image
now occurs before creation of snapshot starts.
This aligns better with how PVC-PVC clone and
PVC-restore process occurs currently.
Flattening the grandparent image once prevents
flattening of every newly created snapshot.
Snapshot in above para refers to k8s VolumeSnapshot
(which is backed by a rbd image).
Signed-off-by: Rakshith R <rar@redhat.com>
Remove the vsg flag present in the older snapshotter
which is meant only for the Alpha Release and we are
no longer installing Alpha CRD.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>