forked from ceph/ceph-csi
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syncing latest changes from upstream devel for ceph-csi #412
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updating csi-addons spec to the latest main which GetFenceClients API. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
register Capability_NetworkFence_ GET_CLIENTS_TO_FENCE capability and start a NetworkFence controllers as part of rbd nodeplugin. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
updating go-ceph to the latest commit to pull the new function to get client address Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
added GetAddrs to get the client Adress of the rados connection which is helpful for NetworkFencing Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
implemented GetFenceClients which connects to the ceph cluster and returns the ceph clusterID and the clientaddress that is used for rados connection. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
The address we get from ceph contains the ip in the format of 10.244.0.1:0/2686266785 we need to extract the client IP from this address, we already have a helper to extract it, This makes the helper more generic can be reused by multiple packages in the fence controller. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
When the image is not closed, it keeps a watch open. This prevents the CSI Controller to delete the Volume, as there is still a user of it. Fixes: f9ab14e "rbd: check if an image is part of a group before adding it" Signed-off-by: Niels de Vos <ndevos@ibm.com>
Commit 95733b3 introduced the `StoreGroupID()` function, but that unfortunately set an empty key in the journal. Passing the `csiGroupIDKey` key (with value `csi.groupid`) caused setting `csi.csi.groupid` as a key. Reading the value back with the right `csi.groupid` key always returned an empty value. Fixes: 95733b3 "journal: add option to store the groupID" Signed-off-by: Niels de Vos <ndevos@ibm.com>
…ot found Signed-off-by: Niels de Vos <ndevos@ibm.com>
Signed-off-by: Niels de Vos <ndevos@ibm.com>
Each object is responsible for maintaining a connection to the journal. By sharing a single journal, cleanup of objects becomes more complex as the journal is used in deferred functions and only the last should destroy the journal connection resources. Signed-off-by: Niels de Vos <ndevos@ibm.com>
The NewSnapshotByID() function makes it possible to clone a new Snapshot from an existing RBD-image and the ID of an RBD-snapshot on that image. This will be used by the VolumeGroupSnapshot feature, where the ID of an RBD-snapshot is obtained for the RBD-snapshot on the RBD-images. Signed-off-by: Niels de Vos <ndevos@ibm.com>
When the rbd.Manager creates a VolumeGroupSnapshot, each RBD-snapshot that is created as part of the RBD-group needs to be cloned into its own RBD-image that will be used as a CSI Snapshot. The VolumeGroup.CreateSnapshots() creates the RBD-group snapshot and returns a list of the Snapshot structs. Signed-off-by: Niels de Vos <ndevos@ibm.com>
The VolumeGroupSnapshot type will be used by the rbd.Manager to create, inspect and delete VolumeGroupSnapshos. Signed-off-by: Niels de Vos <ndevos@ibm.com>
A (CSI) VolumeGroupSnapshot object contains references to Snapshot IDs (or CSI Snapshot handles). In order to work with a VolumeGroupSnapshot struct, the Snapshot IDs need to be resolved into rbdSnapshot structs. Signed-off-by: Niels de Vos <ndevos@ibm.com>
Implement the CreateVolumeGroupSnapshot for the rbd.Manager. A Group Controller Server can use the rbd.Manager to create VolumeGroupSnapshots in an easy an idempotent way. Signed-off-by: Niels de Vos <ndevos@ibm.com>
The GetVolumeGroupSnapshotByID function makes it possible to get a VolumeGroupSnapshot object from the Manager by passing a request-id. This makes it simple for the Group Controller Server to check if a VolumeGroupSnapshot already exists, so it is not needed to try and re-create an existing one. Signed-off-by: Niels de Vos <ndevos@ibm.com>
The Group Controller Server may need to fetch a VolumeGroupSnapshot that was statically provisioned. In that case, only the name of the VolumeGroupSnapshot is known and should be resolved to an object. Signed-off-by: Niels de Vos <ndevos@ibm.com>
When creating a Snapshot with the new NewSnapshotByID() function, the name of the RBD-image that is created is the same as the name of the Snapshot. The `RbdImageName` points to the name of parent image, which causes deleting the Snapshot to delete the parent image instead. Correcting the `RbdImageName` and setting it to the `RbdSnapName` makes sure that upon deletion, the Snapshot RBD-image is removed, and not the parent image. Signed-off-by: Niels de Vos <ndevos@ibm.com>
Signed-off-by: Niels de Vos <ndevos@ibm.com>
When the GroupSnapGetInfo go-ceph function is supported by librbd, the Group Controller Servive and VolumeGroupSnapshot capabilities can be exposed to the Container Orchestrator. Signed-off-by: Niels de Vos <ndevos@ibm.com>
Without the SnapshotGroupID in the Snapshot object, Kubernetes CSI does not know that the Snapshot belongs to a group. In that case, it allows the deletion of the Snapshot, which should be denied. Signed-off-by: Niels de Vos <ndevos@ibm.com>
`reserveSnap()` can potentially fail halfway through, in that case it needs to undo the snapshot reservation and restore modified attributes of the snapshot. Fixes: ceph#4945 Signed-off-by: Niels de Vos <ndevos@ibm.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: df-build-team, Madhu-1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR containing the latest commits from upstream devel branch