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

Do not fake /bin/bash, just use the real bash #55018

Merged
merged 2 commits into from Nov 29, 2017

Conversation

dims
Copy link
Member

@dims dims commented Nov 2, 2017

What this PR does / why we need it:

Looks like 0.6, we ended up with dash as the default shell, with
/bin/sh as well as /bin/dash ending up invoking dash.

We should not change the contract by faking a link to /bin/bash.
Let's install the actual bash package and make sure /bin/sh is
linked to /bin/bash as well.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #55012

Special notes for your reviewer:

Release note:

Fix problem with /bin/bash ending up linked to dash 

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 2, 2017
@ixdy
Copy link
Member

ixdy commented Nov 2, 2017

I guess this is fine for hyperkube, which already has a huge number of additional packages. Do you feel similarly, @tallclair?

# The samba-common, cifs-utils, and nfs-common packages depend on
# ucf, which itself depends on /bin/bash existing.
# It doesn't seem to actually need bash, however.
RUN ln -s /bin/sh /bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

I guess we could also remove the symlink after installing the packages, though that's a pretty ugly hack, too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right @ixdy

@tallclair
Copy link
Member

tallclair commented Nov 2, 2017

It means more maintenance burden on us to keep the packages up-to-date, but if it's required it's required...

EDIT: actually, we rebuild hyperkube with every release, so this isn't much of a burden. I'm fine with this.

@dims
Copy link
Member Author

dims commented Nov 16, 2017

/assign @luxas

@@ -38,3 +34,8 @@ RUN echo CACHEBUST>/dev/null && clean-install \
util-linux

COPY cni-bin/bin /opt/cni/bin

# The samba-common, cifs-utils, and nfs-common packages depend on
Copy link
Member

Choose a reason for hiding this comment

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

I think you need to do this before the clean-install step, as otherwise the package configuration step fails.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like i have to install bash separately too before installing the rest. will rework

@dims
Copy link
Member Author

dims commented Nov 16, 2017

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 16, 2017
@dims
Copy link
Member Author

dims commented Nov 16, 2017

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 16, 2017
@dims
Copy link
Member Author

dims commented Nov 17, 2017

/test pull-kubernetes-unit

@dims
Copy link
Member Author

dims commented Nov 20, 2017

@luxas @ixdy Can you please add milestone 1.9 and approve it for the milestone too?

Thanks,
Dims

@ixdy
Copy link
Member

ixdy commented Nov 20, 2017

Building the new hyperkube-base images now. You also need to update build/root/WORKSPACE and cluster/images/hyperkube/Makefile for the new tag.

@ixdy
Copy link
Member

ixdy commented Nov 20, 2017

/kind bug
/priority important-soon

Not sure which sig this is.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Nov 20, 2017
@@ -19,7 +19,7 @@

REGISTRY?=gcr.io/google-containers
IMAGE?=debian-hyperkube-base
TAG=0.6
TAG=0.7
Copy link
Member

Choose a reason for hiding this comment

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

hm, #52744 was supposed to bump this to 0.7, but it seems that got lost in a rebase. please bump this to 0.8 instead.

cc @rphillips

Copy link
Member Author

Choose a reason for hiding this comment

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

Ack

@enisoc enisoc added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Nov 21, 2017
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 24, 2017
@k8s-github-robot k8s-github-robot added milestone/needs-attention needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 26, 2017
@cblecker
Copy link
Member

/hold cancel
@dims needs rebase
@ixdy should these be updated too?:

tag = "0.7", # ignored, but kept here for documentation

BASEIMAGE=gcr.io/google-containers/debian-hyperkube-base-$(ARCH):0.7

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 28, 2017
Looks like 0.6, we ended up with dash as the default shell, with
/bin/sh as well as /bin/dash ending up invoking dash.

We should not change the contract by faking a link to /bin/bash.
Let's install the actual bash package and make sure /bin/sh is
linked to /bin/bash as well.
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 28, 2017
@dims
Copy link
Member Author

dims commented Nov 28, 2017

Done with rebase. I can push up another commit with those 2 locations when @ixdy confirms as i am not sure if those should be updated after we push an image to the registry.

@cblecker
Copy link
Member

@dims I re-read the whole PR, and it looks like he already did (I missed it too):
#55018 (comment)

Building the new hyperkube-base images now. You also need to update build/root/WORKSPACE and cluster/images/hyperkube/Makefile for the new tag.

@cblecker
Copy link
Member

/lgtm
/assign @zmerlynn @roberthbailey @mikedanese
for cluster approval

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2017
@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request Current

@cblecker @dims @ixdy @luxas @mikedanese @roberthbailey @zmerlynn

Note: This pull request is marked as priority/critical-urgent, and must be updated every 1 day during code freeze.

Example update:

ACK.  In progress
ETA: DD/MM/YYYY
Risks: Complicated fix required
Pull Request Labels
  • sig/node: Pull Request will be escalated to these SIGs if needed.
  • priority/critical-urgent: Never automatically move pull request out of a release milestone; continually escalate to contributor and SIG through all available channels.
  • kind/bug: Fixes a bug discovered during the current release.
Help

@mikedanese
Copy link
Member

/approve

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2017
Copy link
Member

@ixdy ixdy left a comment

Choose a reason for hiding this comment

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

/lgtm cancel

@@ -91,7 +91,7 @@ docker_pull(
digest = "sha256:1a05a58432254268c31ef5c8d9c21f3d01a40611b14707de6ac2772c0793bd13",
Copy link
Member

Choose a reason for hiding this comment

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

you need to update this, or else it's not going to have any effect on bazel builds.

Copy link
Member

Choose a reason for hiding this comment

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

update to sha256:fc1b461367730660ac5a40c1eb2d1b23221829acf8a892981c12361383b3742b and then this lgtm

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2017
@ixdy
Copy link
Member

ixdy commented Nov 29, 2017

I think I never got around to building the new base images since I discovered that we'd forgotten to bump to 0.7 previously. as currently written this will fail since the 0.8 tags don't yet exist.

@dims
Copy link
Member Author

dims commented Nov 29, 2017

/test pull-kubernetes-e2e-gce

@ixdy
Copy link
Member

ixdy commented Nov 29, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cblecker, dims, ixdy, mikedanese

Associated issue: 55012

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@dims
Copy link
Member Author

dims commented Nov 29, 2017

/retest

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 56497, 56500, 55018, 56544, 56425). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 216f6d1 into kubernetes:master Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

new hyperkube image fail silently! enviroment is broken, bash is a link to sh