origin icon indicating copy to clipboard operation
origin copied to clipboard

RUN-1933: test unprivileged builds

Open nalind opened this issue 3 years ago • 20 comments

Test builds where we set BUILD_PRIVILEGED=false in the environment to ask the build controller to ask nodes to run builds with fewer privileges.

Verify that builds run with lower privileges by looking for a diagnostic message that the builder logs at log level 2 or higher when it notices that it's running in a user namespace with ID mappings that aren't the node-level default mappings.

Add unprivileged variations to multiple tests that ensure that we can still pass secrets to the builder, and that it can read them properly.

Revise default-privileged cases that assumed the names of builds that now share a BuildConfig with an unprivileged test, since the tests, and their builds, can happen in unexpected sequence.

Depends on https://github.com/openshift/openshift-controller-manager/pull/173.

nalind avatar May 31 '22 19:05 nalind

Whoops, forgot to mark this as a WIP. /retitle WIP: test unprivileged builds

nalind avatar Jun 02 '22 14:06 nalind

/retest

nalind avatar Jun 13 '22 12:06 nalind

Test failures seem to have come down to a missing bit of SELinux policy that would allow us to use kernel overlay, and a kernel-side bug that causes an error when we try to fall back to using fuse-overlayfs. Removing the WIP label.

nalind avatar Jun 15 '22 12:06 nalind

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nalind Once this PR has been reviewed and has the lgtm label, please assign knobunc for approval by writing /assign @knobunc in a comment. For more information see:The Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

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

openshift-ci[bot] avatar Sep 01 '22 14:09 openshift-ci[bot]

@nalind: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-fips 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link true /test e2e-aws-fips
ci/prow/e2e-aws-single-node-upgrade 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-single-node-upgrade
ci/prow/e2e-gcp 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link true /test e2e-gcp
ci/prow/e2e-aws-single-node 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-single-node
ci/prow/e2e-aws-cgroupsv2 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-cgroupsv2
ci/prow/e2e-gcp-builds 88215b0c49be9d30d38a4f84133076238da2f882 link true /test e2e-gcp-builds
ci/prow/e2e-aws-ovn-fips 88215b0c49be9d30d38a4f84133076238da2f882 link true /test e2e-aws-ovn-fips
ci/prow/e2e-aws-ovn-serial 88215b0c49be9d30d38a4f84133076238da2f882 link true /test e2e-aws-ovn-serial
ci/prow/e2e-gcp-ovn 88215b0c49be9d30d38a4f84133076238da2f882 link true /test e2e-gcp-ovn
ci/prow/e2e-aws-ovn-single-node 88215b0c49be9d30d38a4f84133076238da2f882 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-aws-ovn-single-node-upgrade 88215b0c49be9d30d38a4f84133076238da2f882 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-gcp-ovn-upgrade 88215b0c49be9d30d38a4f84133076238da2f882 link true /test e2e-gcp-ovn-upgrade
ci/prow/e2e-aws-ovn-single-node-serial 88215b0c49be9d30d38a4f84133076238da2f882 link false /test e2e-aws-ovn-single-node-serial
ci/prow/e2e-aws-ovn-cgroupsv2 88215b0c49be9d30d38a4f84133076238da2f882 link false /test e2e-aws-ovn-cgroupsv2
ci/prow/e2e-metal-ipi-ovn-ipv6 88215b0c49be9d30d38a4f84133076238da2f882 link false /test e2e-metal-ipi-ovn-ipv6

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.

openshift-ci[bot] avatar Sep 07 '22 17:09 openshift-ci[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nalind Once this PR has been reviewed and has the lgtm label, please assign bparees for approval by writing /assign @bparees in a comment. For more information see:The Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

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

openshift-ci[bot] avatar Oct 12 '22 17:10 openshift-ci[bot]

@nalind: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-fips 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link true /test e2e-aws-fips
ci/prow/e2e-aws-single-node-upgrade 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-single-node-upgrade
ci/prow/e2e-gcp 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link true /test e2e-gcp
ci/prow/e2e-aws-single-node 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-single-node
ci/prow/e2e-aws-cgroupsv2 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-cgroupsv2
ci/prow/e2e-gcp-builds e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link true /test e2e-gcp-builds
ci/prow/e2e-metal-ipi-ovn-ipv6 e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link false /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-aws-ovn-single-node-upgrade e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-aws-ovn-single-node-serial e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link false /test e2e-aws-ovn-single-node-serial
ci/prow/e2e-agnostic-ovn-cmd e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link false /test e2e-agnostic-ovn-cmd
ci/prow/e2e-aws-ovn-fips e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link true /test e2e-aws-ovn-fips
ci/prow/e2e-aws-ovn-single-node e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-aws-ovn-cgroupsv2 e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link false /test e2e-aws-ovn-cgroupsv2
ci/prow/e2e-gcp-ovn-rt-upgrade e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link false /test e2e-gcp-ovn-rt-upgrade
ci/prow/e2e-gcp-ovn e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link true /test e2e-gcp-ovn
ci/prow/e2e-gcp-ovn-builds e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link true /test e2e-gcp-ovn-builds
ci/prow/e2e-gcp-ovn-image-ecosystem e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link true /test e2e-gcp-ovn-image-ecosystem

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.

openshift-ci[bot] avatar Nov 05 '22 01:11 openshift-ci[bot]

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-bot avatar Feb 04 '23 01:02 openshift-bot

/remove-lifecycle stale

nalind avatar Feb 06 '23 13:02 nalind

@nalind This needs a rebase.

coreydaley avatar Mar 03 '23 01:03 coreydaley

/retest

nalind avatar Apr 07 '23 03:04 nalind

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nalind Once this PR has been reviewed and has the lgtm label, please assign bparees for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

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

openshift-ci[bot] avatar Aug 01 '23 17:08 openshift-ci[bot]

/retest

nalind avatar Aug 07 '23 12:08 nalind

Gateway timeouts. /retest

nalind avatar Sep 13 '23 21:09 nalind

/retest

nalind avatar Sep 14 '23 12:09 nalind

Need to weed out some errors connecting to registries, which were hopefully transient problems. /retest

nalind avatar Sep 15 '23 19:09 nalind

/retitle RUN-1933: test unprivileged builds

nalind avatar Nov 09 '23 21:11 nalind

@nalind: This pull request references RUN-1933 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Test builds where we set BUILD_PRIVILEGED=false in the environment to ask the build controller to ask nodes to run builds with fewer privileges.

Verify that builds run with lower privileges by looking for a diagnostic message that the builder logs at log level 2 or higher when it notices that it's running in a user namespace with ID mappings that aren't the node-level default mappings.

Add unprivileged variations to multiple tests that ensure that we can still pass secrets to the builder, and that it can read them properly.

Revise default-privileged cases that assumed the names of builds that now share a BuildConfig with an unprivileged test, since the tests, and their builds, can happen in unexpected sequence.

Depends on https://github.com/openshift/openshift-controller-manager/pull/173.

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-robot avatar Nov 09 '23 21:11 openshift-ci-robot

/retest

nalind avatar Nov 10 '23 15:11 nalind

/retest

nalind avatar Nov 14 '23 10:11 nalind

/skip /retest

nalind avatar Nov 14 '23 19:11 nalind

/skip

nalind avatar Nov 14 '23 20:11 nalind

@nalind: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-fips 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link true /test e2e-aws-fips
ci/prow/e2e-aws-single-node-upgrade 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-single-node-upgrade
ci/prow/e2e-gcp 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link true /test e2e-gcp
ci/prow/e2e-aws-single-node 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-single-node
ci/prow/e2e-aws-cgroupsv2 49f289280e14b1d6b1af7a8c9cba05e34f692c39 link false /test e2e-aws-cgroupsv2
ci/prow/e2e-gcp-builds e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link true /test e2e-gcp-builds
ci/prow/e2e-gcp-ovn-image-ecosystem e2878c4ad5e0de7302ac0dcc4e3202ae4aa09566 link true /test e2e-gcp-ovn-image-ecosystem
ci/prow/e2e-azure-ovn-etcd-scaling d20b2361fb14560765938248d71b83cee814b1d6 link false /test e2e-azure-ovn-etcd-scaling
ci/prow/e2e-vsphere-ovn-etcd-scaling d20b2361fb14560765938248d71b83cee814b1d6 link false /test e2e-vsphere-ovn-etcd-scaling
ci/prow/e2e-aws-ovn-etcd-scaling d20b2361fb14560765938248d71b83cee814b1d6 link false /test e2e-aws-ovn-etcd-scaling
ci/prow/e2e-gcp-ovn-etcd-scaling d20b2361fb14560765938248d71b83cee814b1d6 link false /test e2e-gcp-ovn-etcd-scaling
ci/prow/e2e-openstack-ovn 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-openstack-ovn
ci/prow/e2e-agnostic-ovn-cmd 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-agnostic-ovn-cmd
ci/prow/e2e-gcp-csi 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-gcp-csi
ci/prow/e2e-gcp-ovn-upgrade 5be597dea306d0324edbb4755855651efd8651aa link true /test e2e-gcp-ovn-upgrade
ci/prow/e2e-gcp-ovn-rt-upgrade 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-gcp-ovn-rt-upgrade
ci/prow/e2e-metal-ipi-ovn-ipv6 5be597dea306d0324edbb4755855651efd8651aa link true /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-aws-ovn-upgrade 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-aws-ovn-upgrade
ci/prow/e2e-aws-csi 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-aws-csi
ci/prow/e2e-aws-ovn-serial 5be597dea306d0324edbb4755855651efd8651aa link true /test e2e-aws-ovn-serial
ci/prow/e2e-aws-ovn-cgroupsv2 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-aws-ovn-cgroupsv2
ci/prow/e2e-gcp-ovn-builds 5be597dea306d0324edbb4755855651efd8651aa link true /test e2e-gcp-ovn-builds
ci/prow/e2e-metal-ipi-sdn 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-metal-ipi-sdn
ci/prow/e2e-aws-ovn-single-node 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-aws-ovn-single-node
ci/prow/e2e-gcp-ovn 5be597dea306d0324edbb4755855651efd8651aa link true /test e2e-gcp-ovn
ci/prow/e2e-aws-ovn-single-node-serial 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-aws-ovn-single-node-serial
ci/prow/e2e-aws-ovn-single-node-upgrade 5be597dea306d0324edbb4755855651efd8651aa link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-aws-ovn-fips 5be597dea306d0324edbb4755855651efd8651aa link true /test e2e-aws-ovn-fips

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.

openshift-ci[bot] avatar Nov 15 '23 00:11 openshift-ci[bot]

/skip

nalind avatar Nov 28 '23 19:11 nalind

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-bot avatar Feb 27 '24 01:02 openshift-bot

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-bot avatar Mar 28 '24 08:03 openshift-bot