-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix CephFS Status updates #11453
Fix CephFS Status updates #11453
Conversation
c0d5da9
to
38d665f
Compare
6964f59
to
e9605ba
Compare
ac517f1
to
c5ad050
Compare
Ready for next set of reviews, @travisn please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits.
I see this is working and it will accomplish the goal of ensuring the status is updated, although I'm not thrilled that it causes a retry on the reconcile. In three tests of filesystem creation I tested with this change, the retry was needed twice, while the third test succeeded. So there appears to be a race condition to update the status immediately after updating the finalizer.
The operator log shows this sequence when the finalizer is updated and the status update follows immediately after:
2023-01-18 23:39:26.581251 I | ceph-spec: adding finalizer "cephfilesystem.ceph.rook.io" on "myfs"
2023-01-18 23:39:26.592879 D | ceph-spec: update event from a CR: "myfs"
2023-01-18 23:39:26.593120 D | ceph-spec: update event on CephFilesystem CR
2023-01-18 23:39:26.593297 D | ceph-spec: skipping resource "myfs" update with unchanged spec
2023-01-18 23:39:26.600239 W | ceph-file-controller: failed to set filesystem "myfs" status to "Progressing". failed to update object "rook-ceph/myfs" status: Operation cannot be fulfilled on cephfilesystems.ceph.rook.io "myfs": the object has been modified; please apply your changes to the latest version and try again
2023-01-18 23:39:26.600350 E | ceph-file-controller: failed to reconcile failed to update ceph filesystem status
2023-01-18 23:39:26.600416 E | ceph-file-controller: failed to reconcile CephFilesystem "rook-ceph/myfs". failed to update ceph filesystem status
2023-01-18 23:39:26.688853 D | ceph-spec: update event from a CR: "myfs"
2023-01-18 23:39:26.688896 D | ceph-spec: update event on CephFilesystem CR
2023-01-18 23:39:26.689881 D | ceph-file-controller: filesystem "myfs" status updated to "Progressing"
Notice that within 1/100th of a second we are updating the status after the finalizer is updated, and the query for the latest object isn't retrieving the latest version of the resource. I'd love to see a solution where the finalizer update actually returns the latest resource so the status can just use it, but that's for a separate PR.
CephFS object fails to do a initial status update. Operator shows the following error message in logs, 'Error while updation: Operation cannot be fulfilled on cephfilesystems.ceph.rook.io "myfs": the object has been modified; please apply your changes to the latest version and try again' Function 'updateStatus' now returns the new/updated CephFilesystem object if successfully updated or nil. Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
c5ad050
to
7e87c67
Compare
Fix CephFS Status updates (backport #11453)
CephFS object fails to do a initial status update.
Operator shows the following error message in logs,
'Error while updation: Operation cannot be fulfilled on
cephfilesystems.ceph.rook.io "myfs": the object has been
modified; please apply your changes to the latest version
and try again'
Function 'updateStatus' now returns the new/updated
CephFilesystem object if successfully updated or nil.
Signed-off-by: Arun Kumar Mohan amohan@redhat.com
Description of your changes:
Which issue is resolved by this Pull Request:
Resolves issue #10767
Checklist:
skip-ci
on the PR.