-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add Events for operation_executor to show status of mounts, failed/successful to show in describe events #27778
Add Events for operation_executor to show status of mounts, failed/successful to show in describe events #27778
Conversation
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
3 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@k8s-bot ok to test |
@screeley44 Thanks for taking a crack at this. Would be really nice to get it in for 1.3. |
@@ -100,11 +103,16 @@ type OperationExecutor interface { | |||
func NewOperationExecutor( | |||
kubeClient internalclientset.Interface, | |||
volumePluginMgr *volume.VolumePluginMgr) OperationExecutor { | |||
|
|||
eventBroadcaster := record.NewBroadcaster() |
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.
Dependencies should be passed in. In this case, have NewOperationExecutor()
take a new parameter for the recorder. Plumb it all the way through from cmd/kube-controller-manager/app/controllermanager.go
for attach/detach controller and from kubelet for the kubelet volume manager.
@saad-ali - also, I still need to update the existing tests with right # of arg params ... just a reminder |
Ack. Let me know when it's ready for review, and I'll do another pass. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@saad-ali - can you begin review of this..I did not add an event for every single point where something is returned or logged, thought that might get too spammy... but I did get the major events (mountVolume, mountDevice, unmountVolume, unmountDevice, detachVolume). if you think I need to add additional let me know. Also not sure I fixed up the *_test.go files associated with this correctly, so check those out as well. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 782d7d9. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 782d7d9. |
GCE e2e build/test passed for commit 782d7d9. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 782d7d9. |
GCE e2e build/test passed for commit 782d7d9. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 782d7d9. |
Automatic merge from submit-queue |
Finally!! After several days fighting flakes :-( |
Thanks for the patch @screeley44 |
@saad-ali Do you still think this is needed for the 1.3 branch? I'm trying to understand what issue this fixes. Thanks. |
@fabioy - this PR fixes/adds the basic infrastructure to expose the true error surfaced from the failed mount so the user doesn't just see a generic meaningless error as shown in the referenced issue above #31768, and then have to go hunt through the logs to find the true root cause of the failure. As @saad-ali also mentioned in that issue this PR is a starting point and can be enhanced as we add more events for other volume functions (attach/detach, etc...). But I think it's pretty important from a UXP and error triage/resolution perspective. |
Automated cherrypick failed with conflicts. Please create a cherrypick PR for this. Thanks. |
I would argue getting this cherry picked is not a high priority. It adds events which helps usability, but is not fixing a bug. With 1.4 around the corner, I'd be ok not getting this cherry picked to 1.3, esp if it requires a non-trivial amount of work. @screeley44 if you'd like to prepare a cherry-pick feel free. If not, let me know and we can remove the cherrypick labels. |
@saad-ali - I'm ok with removing the cherrypick and putting this in 1.4 |
Fixes #27590
@saad-ali @pmorie @erinboyd
After talking with @pmorie last week about the above issue, I decided to poke around and see if I could remedy. The refactoring broke my previous UXP merged PR's that correctly showed failed mount errors in the describe events. However, Not sure I implemented correctly, but it tested out and seems to be working, let me know what I missed or if this is not the correct approach.
This change is