Skip to content
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

journal: store CreationTime for VolumeGroups #4753

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

nixpanic
Copy link
Member

@nixpanic nixpanic commented Aug 7, 2024

VolumeGroupSnapshots expect to have a CreationTime attribute. This can not be obtained by any (go-ceph) API calls, so it need to be stored in the journal.

@nixpanic nixpanic requested a review from Madhu-1 August 7, 2024 12:43
@@ -118,6 +121,16 @@ func (rbdSnap *rbdSnapshot) toVolume() *rbdVolume {
}
}

func (rbdSnap *rbdSnapshot) ToCSI(ctx context.Context) (*csi.Snapshot, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make use of it here ?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, sure, this function actually was not required to be included, it is part of my VolumeGroupSnapshot work. I'll include it here so that it all gets a little cleaner.

func timestampToString(st *timestamppb.Timestamp) string {
return fmt.Sprintf("seconds:%d nanos:%d", st.GetSeconds(), st.GetNanos())
func timestampToString(st *time.Time) string {
return fmt.Sprintf("seconds:%d nanos:%d", st.Unix(), st.Nanosecond())
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we check on this one, Does Unix is equivalent to GetSeconds()?

Copy link
Member Author

Choose a reason for hiding this comment

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

@nixpanic
Copy link
Member Author

nixpanic commented Aug 8, 2024

/test ci/centos/k8s-e2e-external-storage/1.28

@nixpanic
Copy link
Member Author

nixpanic commented Aug 8, 2024

/test ci/centos/mini-e2e-helm/k8s-1.29

@nixpanic nixpanic requested review from Rakshith-R, Madhu-1 and a team August 8, 2024 12:29
@nixpanic nixpanic requested a review from a team August 9, 2024 07:04
@nixpanic
Copy link
Member Author

nixpanic commented Aug 9, 2024

@iPraveenParihar this adds the creation time to the journal, maybe you need to add that to #4750 as well?

Copy link
Contributor

mergify bot commented Aug 9, 2024

The PR description contains the unsupported [skip ci] command, please update the description and mark the PR ready for review again.

@mergify mergify bot marked this pull request as draft August 9, 2024 10:07
@Rakshith-R Rakshith-R marked this pull request as ready for review August 9, 2024 11:05
@nixpanic
Copy link
Member Author

nixpanic commented Aug 9, 2024

@Mergifyio rebase

Do not use protobuf types when there is no need. Just use the standard
time.Time format instead.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
Signed-off-by: Niels de Vos <ndevos@ibm.com>
After cloning the RBD snapshot, an rbdVolume is returned for the
CSI.Snapshot object. In order to use the rbdSnapshot.ToCSI() function,
the rbdVolume needs to be converted (back) to an rbdSnaphot.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
Copy link
Contributor

mergify bot commented Aug 9, 2024

rebase

✅ Branch has been successfully rebased

@nixpanic nixpanic force-pushed the volumegroupsnapshot/creation-time branch from 31de303 to a82b742 Compare August 9, 2024 11:21
Copy link
Contributor

@iPraveenParihar iPraveenParihar left a comment

Choose a reason for hiding this comment

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

Thanks!

@nixpanic
Copy link
Member Author

nixpanic commented Aug 9, 2024

@Mergifyio queue

Copy link
Contributor

mergify bot commented Aug 9, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 869aace

@mergify mergify bot added the ok-to-test Label to trigger E2E tests label Aug 9, 2024
@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.28

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.27

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.28

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.27

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.28

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.29

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.27

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.29

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.29

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.30

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Aug 9, 2024
@mergify mergify bot merged commit 869aace into ceph:devel Aug 9, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants