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

overlay: update selinux update script from 05rhcos #583

Conversation

MattPOlson
Copy link

remove version check from script so that it will run in fcos

remove version check from script so that it will run
in fcos
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 18, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 18, 2023

Hi @MattPOlson. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@vrutkovs
Copy link
Member

/ok-to-test
/approve
/lgtm
/cherrypick release-4.13

Thank you!

@openshift-cherrypick-robot

@vrutkovs: once the present PR merges, I will cherry-pick it on top of release-4.13 in a new PR and assign it to you.

In response to this:

/ok-to-test
/approve
/lgtm
/cherrypick release-4.13

Thank you!

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 ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 18, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 18, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MattPOlson, vrutkovs

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 18, 2023
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 1d969f9 and 2 for PR HEAD 7249872 in total

@MattPOlson
Copy link
Author

/retest-required

@vrutkovs
Copy link
Member

Apr 18 18:57:26.064527 localhost systemd[1]: Starting rhcos-selinux-policy-upgrade.service - RHEL CoreOS Rebuild SELinux Policy If Necessary...
Apr 18 18:57:26.067994 localhost rhcos-rebuild-selinux-policy[884]: RHEL_VERSION=Assuming we have new enough ostree

that doesn't seem to have worked :/

This way `cp` will track files within one overlay only, allowing us to overwrite files in follow-up overlays without triggering overwrite prompts
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 19, 2023
@vrutkovs
Copy link
Member

It now runs - but fails:

Apr 19 09:25:10.267311 localhost rhcos-rebuild-selinux-policy[842]: ls: cannot access '/usr/etc/selinux/targeted/policy/policy.31': No such file or directory
Apr 19 09:25:10.267311 localhost rhcos-rebuild-selinux-policy[842]: ls: cannot access '/etc/selinux/targeted/policy/policy.31': No such file or directory

@MattPOlson
Copy link
Author

Would this work to account for different policy version numbers in different releases.

ls -al /{usr/,}etc/selinux/targeted/policy/policy.*
if ! cmp --quiet /{usr/,}etc/selinux/targeted/policy/policy.*; then

@vrutkovs
Copy link
Member

I don't like the idea off using wildcards tbh, especially in a non-critical path where its easy to miss this failure. Lets use hardcoded .33 for now and update this later when we'll make sure this reliably works?

@MattPOlson
Copy link
Author

Yea that sounds good to me.

@vrutkovs
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 19, 2023
@vrutkovs
Copy link
Member

That's better:

Apr 19 11:51:51.887877 localhost systemd[1]: Starting rhcos-selinux-policy-upgrade.service - RHEL CoreOS Rebuild SELinux Policy If Necessary...
Apr 19 11:51:51.890901 localhost systemd[1]: Starting rhcos-usrlocal-selinux-fixup.service - RHCOS Fix SELinux Labeling For /usr/local/sbin...
Apr 19 11:51:51.893218 localhost rhcos-rebuild-selinux-policy[851]: -rw-r--r--. 1 root root 3585058 Apr 19 11:51 /etc/selinux/targeted/policy/policy.33
Apr 19 11:51:51.893218 localhost rhcos-rebuild-selinux-policy[851]: -rw-r--r--. 2 root root 3585058 Jan  1  1970 /usr/etc/selinux/targeted/policy/policy.33
Apr 19 11:51:51.893458 localhost chcon[852]: changing security context of '/usr/local/sbin'
Apr 19 11:51:51.893971 localhost systemd[1]: Starting systemd-journal-catalog-update.service - Rebuild Journal Catalog...
Apr 19 11:51:51.899511 localhost systemd[1]: Starting systemd-resolved.service - Network Name Resolution...
Apr 19 11:51:51.903153 localhost systemd[1]: Starting systemd-update-utmp.service - Record System Boot/Shutdown in UTMP...
Apr 19 11:51:51.908000 localhost audit[857]: SYSTEM_BOOT pid=857 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="systemd-update-utmp" exe="/usr/lib/systemd/systemd-update-utmp" hostname=? addr=? terminal=? res=success'
Apr 19 11:51:51.911602 localhost systemd[1]: Finished rhcos-selinux-policy-upgrade.service - RHEL CoreOS Rebuild SELinux Policy If Necessary.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 19, 2023

@MattPOlson: 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.

@MattPOlson
Copy link
Author

Looks good, thanks!

@openshift-merge-robot openshift-merge-robot merged commit b8c8bbc into openshift:master Apr 19, 2023
4 checks passed
@openshift-cherrypick-robot

@vrutkovs: new pull request created: #584

In response to this:

/ok-to-test
/approve
/lgtm
/cherrypick release-4.13

Thank you!

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.

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants