Skip to content

daemon: Bind /run/secrets/ in so we can see SA tokens - #370

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
cgwalters:token-rotate
Feb 4, 2019
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
cgwalters:token-rotate

Conversation

@cgwalters

Copy link
Copy Markdown
Member

Because we chroot() we need to ensure that we can still see
the service account tokens injected into our pod.

Closes: #358

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 2, 2019
@cgwalters

Copy link
Copy Markdown
Member Author

(Not tested locally yet, just tossing this up as I was thinking about a fix)

Comment thread pkg/daemon/daemon.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: filepath.Join

@runcom

runcom commented Feb 2, 2019 •

Copy link
Copy Markdown
Member

Just a utopic point here, cause of the complexity maybe, but is there any way we can add a test for this to make sure we won't regress in the future? (my understanding is also that this was working before). I'm seeing the errors everywhere on my clusters as well though.

@cgwalters

Copy link
Copy Markdown
Member Author

This appears to not have worked, I still see the error in the mcd logs in this PR.

but is there any way we can add a test for this to make sure we won't regress in the future?

Yeah...I think we could scrape the MCD logs in make test-e2e.

(my understanding is also that this was working before)

Not sure...but I doubt it, I suspect the rebase added an error message? Nothing in how the MCD works here changed recently.

@cgwalters cgwalters changed the title daemon: Bind /run/secrets/ in so we can see SA tokens WIP: daemon: Bind /run/secrets/ in so we can see SA tokens Feb 3, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 3, 2019
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 3, 2019
@jlebon

jlebon commented Feb 4, 2019

Copy link
Copy Markdown
Member

Yeah, I think that makes sense. Actually, given that we mount the whole rootfs and chroot, we're not really making use of the other mountpoints defined in the daemonset either. We should probably document that.

Related: #6

@jlebon

jlebon commented Feb 4, 2019

Copy link
Copy Markdown
Member

#377

Because we `chroot()` we need to ensure that we can still see
the service account tokens injected into our pod.

Closes: openshift#358
@cgwalters

Copy link
Copy Markdown
Member Author

OK, figured it out I think - we needed --rbind since the secrets are also mount points.

@cgwalters cgwalters changed the title WIP: daemon: Bind /run/secrets/ in so we can see SA tokens daemon: Bind /run/secrets/ in so we can see SA tokens Feb 4, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 4, 2019
@jlebon

jlebon commented Feb 4, 2019

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2019
@cgwalters

Copy link
Copy Markdown
Member Author
$ oc logs -c test pods/e2e-aws-op
clusterversion.config.openshift.io/version condition met
go test -timeout 20m -v${WHAT:+ -run="$WHAT"} ./test/e2e/
=== RUN   TestMCDToken
--- PASS: TestMCDToken (2.24s)
=== RUN   TestOperatorLabel
--- PASS: TestOperatorLabel (0.04s)
PASS
ok      github.com/openshift/machine-config-operator/test/e2e   2.298s

🎊

@ashcrow ashcrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashcrow, cgwalters, jlebon

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [ashcrow,cgwalters,jlebon]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuqi-zhang yuqi-zhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
Confirm fixes: #358

@ashcrow

ashcrow commented Feb 4, 2019

Copy link
Copy Markdown
Member
level=fatal msg="failed to initialize the cluster: timed out waiting for the condition"

/retest

@openshift-merge-robot
openshift-merge-robot merged commit 80407c7 into openshift:master Feb 4, 2019
ptalgulk01 pushed a commit to ptalgulk01/machine-config-operator that referenced this pull request May 15, 2026
daemon: Bind /run/secrets/ in so we can see SA tokens
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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants