-
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
Trusty: support developer workflow on base image #22960
Conversation
Labelling this PR as size/M |
# We use the binary from the release tarball if they are not preinstalled, or if this is | ||
# a test cluster. | ||
if ! which kubelet > /dev/null || ! which kubectl > /dev/null; then | ||
cp /tmp/kubernetes/server/bin/kubelet /usr/bin |
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.
nit: Can we define variables for these paths instead of specifying them verbatim in multiple lines?
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.
Sounds good. I will correct it
GCE e2e build/test passed for commit 563908cb1ab3288c983eb06e7e09ef872e811be8. |
cp /tmp/kubernetes/server/bin/kubelet /home/kubernetes/bin | ||
cp /tmp/kubernetes/server/bin/kubectl /home/kubernetes/bin | ||
mount --bind /home/kubernetes/bin/kubelet /usr/bin/kubelet | ||
mount --bind -o remount,ro,^noexec /usr/bin/kubelet /usr/bin/kubelet |
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.
Why is ^
needed? Is noexec
necessary?
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 elif block will only be hit when using our customized images, which preinstalls kubelet and kubectl in /usr/bin but has a read-only /usr/bin. When creating /home/kubernetes/bin, it is non-executable. When bind mounting the binary to overwrite the preinstalled ones, we have to use ^noexec, otherwise, it does not work
Awesome @andyzheng0831! |
The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label? |
GCE e2e build/test passed for commit c3a1ad338b496c0d783eb70901c72ce9566cb184. |
Manual e2e test result: Summarizing 1 Failure: [Fail] Addon update [BeforeEach] should propagate add-on file changes Ran 159 of 266 Specs in 4274.885 seconds The failed one is expected, as the testing code only works for Debian. |
GCE e2e build/test failed for commit eee53df7921b350d9f6851d5fca686b63888736a. Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake. |
GCE e2e build/test passed for commit e276c8e. |
@zmerlynn would you please review this change? It is a blocker for our following works. Thanks! |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit e276c8e. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit e276c8e. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
Auto commit by PR queue bot (cherry picked from commit 5cc2bb3)
Commit 182f781 found in the "release-1.2" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this s an error find help to get your PR picked. |
Auto commit by PR queue bot (cherry picked from commit 5cc2bb3)
Auto commit by PR queue bot (cherry picked from commit 5cc2bb3)
Auto commit by PR queue bot (cherry picked from commit 5cc2bb3)
Auto commit by PR queue bot (cherry picked from commit 5cc2bb3)
This change will be helpful in two aspects: (1) Running k8s head in GKE e2e tests; (2) Allow k8s developers to manually run k8s e2e against their local changes. This change also simplifies the logic: no matter test or non-test cluster, binaries are in /usr/bin.
@roberthbailey @dchen1107 @vishh
cc/ @fabioy @wonderfly FYI
I have tested this change in four combinations of configurations: