-
Notifications
You must be signed in to change notification settings - Fork 2.4k
move plugin-specific init code into plugin hooks #2217
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
Conversation
|
/cc @dashpole still testing this, but wanted to get it opened for early review |
|
the first commit simply restores the manager.New signature and logic... the remaining commits make it easy to see the imports getting whittled away |
|
I'll open a WIP PR in kubernetes as well to exercise vendoring and CI there |
|
/retest |
|
/test pull-cadvisor-e2e |
|
thanks for taking care of this @liggitt. glad we were able to go back to the old signature! |
|
/lgtm |
|
kube PR to exercise CI is at kubernetes/kubernetes#76355 |
|
I like this :-)
…On Tue, Apr 9, 2019 at 9:33 PM Jordan Liggitt ***@***.***> wrote:
kube PR to exercise CI is at kubernetes/kubernetes#76355
<kubernetes/kubernetes#76355>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2217 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AF8dbPMFT1ST19zD9jOauReK9f71ArAvks5vfT9ogaJpZM4cl44U>
.
|
|
yay for CI:
since the Context type was used in the plugin interface, moved it to the os-neutral fs/types.go file |
|
/retest |
|
I'm out for a couple weeks. If this needs attention soon, @derekwaynecarr or @tallclair will need to review it. Otherwise, I'll take a look when I get back. |
|
thanks for the heads up. yeah, would like to avoid letting the signature change linger in cadvisor master |
|
/lgtm /assign @tallclair @derekwaynecarr |
|
kube CI was green with this (kubernetes/kubernetes#76355) |
|
I am fine with this change. |
container/docker/install/install.go
Outdated
| err := container.RegisterPlugin("docker", container.PluginFn{ | ||
| InitializeContextFn: func(context *fs.Context) error { | ||
| docker.SetTimeout(dockerClientTimeout) | ||
| // Try to connect to docker indefinitely on startup. |
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.
Is the Docker plugin the only one that retries the initialization because of the design of Docker itself? or were you planning on adding this connection retry logic for the other plugins at a later time? I'm just curious why the docker plugin is different from the others... thanks in advance for your answer!
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.
this is simply moving the existing behavior, I'll defer to the cadvisor maintainers on the reason for the current behavior
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.
Ah, cool. Sorry, didn't realize it was the existing behaviour...
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.
historical context: #1871
It was fixing a specific bug with docker. Not sure if the same bug could exist in the other runtimes...
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.
LGTM, just a couple stylistic points - take 'em or leave 'em.
container/docker/install/install.go
Outdated
| err := container.RegisterPlugin("docker", container.PluginFn{ | ||
| InitializeContextFn: func(context *fs.Context) error { | ||
| docker.SetTimeout(dockerClientTimeout) | ||
| // Try to connect to docker indefinitely on startup. |
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.
historical context: #1871
It was fixing a specific bug with docker. Not sure if the same bug could exist in the other runtimes...
This config struct is now used in the plugin InitializeContext method, so it should be defined in the os-neutral types.go file
655e1c1 to
f8a73e0
Compare
|
comments addressed... diff visible at https://github.com/google/cadvisor/compare/655e1c19b6a3e679c0ecff2cb40b57fc2716f09d..f8a73e018b9690a8c6f0c5ce05c367d6bb59bb66 |
|
/lgtm @tallclair can we please merge this? would be good to try to get a full weekends worth of CI testing in k/k |
manager.Newsignature from before Reorganize code to allow conditional enablement of runtimes #2209 was mergedDockerImages()andDockerInfo()methods, doesn't automatically run the docker collector)github.com/cadvisor/container/installpackage that installs all optional container collectors/cc @dims