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

[release-4.11] ci: set up separate homedir for Prow builder #1070

Closed
wants to merge 1 commit into from

Conversation

mike-nguyen
Copy link
Member

@mike-nguyen mike-nguyen commented Nov 22, 2022

This is a backport of the CI fix in the main branch. The 4.11 PR's are failing with the same error.

Currently, we try to fake that the OpenShift-allocated uid is a valid user by adding it to /etc/passwd and using a home dir of /home/builder. But that doesn't work because anything that wants to write to the home dir will get EACCES.

The exact error was:

+ cosa buildextend-extensions
Extracting a84ad9e41b55dae5dcdbad814604adc8973fcfb2681d27ab2908193ea54b4cd4
error: Permission denied (os error 13)

Using strace, the files it failed on were:

[pid  1498] mkdir("/home/builder/.cache", 0700 <unfinished ...>
[pid  1498] <... mkdir resumed>)        = -1 EACCES (Permission denied)
[pid  1498] openat(AT_FDCWD, "/home/builder/.cache/ostree/auth.json", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid  1498] <... openat resumed>)       = -1 EACCES (Permission denied)

Probably something to do with the container stack when invoked by rpm-ostree?

Anyway, there might be something to fix there, but for now hack around this by instead allocating a temporary separate homedir.

Currently, we try to fake that the OpenShift-allocated uid is a valid
user by adding it to `/etc/passwd` and using a home dir of
`/home/builder`. But that doesn't work because anything that wants to
write to the home dir will get `EACCES`.

The exact error was:

```
+ cosa buildextend-extensions
Extracting a84ad9e41b55dae5dcdbad814604adc8973fcfb2681d27ab2908193ea54b4cd4
error: Permission denied (os error 13)
```

Using strace, the files it failed on were:

```
[pid  1498] mkdir("/home/builder/.cache", 0700 <unfinished ...>
[pid  1498] <... mkdir resumed>)        = -1 EACCES (Permission denied)
[pid  1498] openat(AT_FDCWD, "/home/builder/.cache/ostree/auth.json", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid  1498] <... openat resumed>)       = -1 EACCES (Permission denied)
```

Probably something to do with the container stack when invoked by
rpm-ostree?

Anyway, there might be something to fix there, but for now hack around
this by instead allocating a temporary separate homedir.
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2022

@mike-nguyen: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

ci: set up separate homedir for Prow builder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mike-nguyen mike-nguyen changed the title ci: set up separate homedir for Prow builder [release-4.11] ci: set up separate homedir for Prow builder Nov 22, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2022

@mike-nguyen: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

[release-4.11] ci: set up separate homedir for Prow builder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2022

@mike-nguyen: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

[release-4.11] ci: set up separate homedir for Prow builder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2022

@mike-nguyen: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@HuijingHei HuijingHei left a comment

Choose a reason for hiding this comment

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

LGTM

@travier
Copy link
Member

travier commented Nov 22, 2022

/lgtm

@travier
Copy link
Member

travier commented Nov 22, 2022

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Nov 22, 2022
@travier
Copy link
Member

travier commented Nov 22, 2022

/label cherry-pick-approved

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. labels Nov 22, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuijingHei, mike-nguyen, travier

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [HuijingHei,mike-nguyen,travier]

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

@travier
Copy link
Member

travier commented Nov 22, 2022

/label valid-bug
This is for CI, we don't need a bug

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2022

@travier: The label(s) /label valid-bug cannot be applied. These labels are supported: platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, downstream-change-needed, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/label valid-bug
This is for CI, we don't need a bug

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@travier
Copy link
Member

travier commented Nov 22, 2022

@mrunalp Can we get an override for the bug validation? Thanks

@mike-nguyen
Copy link
Member Author

mike-nguyen commented Nov 22, 2022

/label bugzilla/valid-bug
/label jira/valid-bug

Attempt as seeing if the right label works.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2022

@mike-nguyen: Can not set label bugzilla/valid-bug: Must be member in one of these teams: [openshift-patch-managers openshift-staff-engineers]

In response to this:

/label bugzilla/valid-bug
/label jira/valid-bug

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 22, 2022

@mike-nguyen: Can not set label jira/valid-bug: Must be member in one of these teams: [openshift-patch-managers openshift-staff-engineers]

In response to this:

/label bugzilla/valid-bug
/label jira/valid-bug

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 21, 2023
@travier
Copy link
Member

travier commented Feb 21, 2023

/remove-lifecycle stale

@mike-nguyen For when you get back: Do we still need this one?

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 21, 2023
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 23, 2023
@mike-nguyen
Copy link
Member Author

/retest

@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 23, 2023
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 23, 2023

@openshift-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot closed this Jul 23, 2023
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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants