Skip to content

Bug 2070805: pkg/cvo/updatepayload: Restore shell for rm globbing#767

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
wking:shell-for-job-rm-glob
Apr 28, 2022
Merged

Bug 2070805: pkg/cvo/updatepayload: Restore shell for rm globbing#767
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
wking:shell-for-job-rm-glob

Conversation

@wking
Copy link
Copy Markdown
Member

@wking wking commented Apr 27, 2022

Some background on recent changes:

This commit returns to using the shell to invoke the rm call, so we get pathname expansion back. But I avoid the possibility of unquoted argument injection by using workingDir to bring in baseDir.

Some background on recent changes:

* 507b474 (pkg/cvo/updatepayload: Prune previous payload downloads,
  2022-04-03, openshift#760) attempted to add CVO-side directory removal, but
  that failed because the CVO mounts the shared volume 'readOnly:
  true'.

* a5af89d (pkg/cvo/updatepayload: Shift previous-download removal
  into the job, 2022-04-18, openshift#765) shifted removal into the job itself.
  As far as I can tell, this worked.

* c45a981 (pkg/cvo/updatepayload: Use initContainers instead of
  shell &&-chains, 2022-04-20, openshift#765) addressed concerns with unquoted
  shell arguments by pivoting to initContainers and dropping the
  shell.  This broke the * pathname expansion that rm depends on to
  find directories to remove.

This commit returns to using the shell to invoke the rm call, so we
get pathname expansion back [1].  But I avoid the possibility of
unquoted argument injection by using workingDir to bring in baseDir.

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_06
@wking wking changed the title pkg/cvo/updatepayload: Restore shell for rm globbing Bug 2070805: pkg/cvo/updatepayload: Restore shell for rm globbing Apr 27, 2022
@openshift-ci openshift-ci Bot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Apr 27, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 27, 2022

@wking: This pull request references Bugzilla bug 2070805, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.11.0) matches configured target release for branch (4.11.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @evakhoni

Details

In response to this:

Bug 2070805: pkg/cvo/updatepayload: Restore shell for rm globbing

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 Apr 27, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 27, 2022

@wking: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@jottofar
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 28, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jottofar, wking

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:

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

@openshift-merge-robot openshift-merge-robot merged commit 4e07488 into openshift:master Apr 28, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 28, 2022

@wking: All pull requests linked via external trackers have merged:

Bugzilla bug 2070805 has been moved to the MODIFIED state.

Details

In response to this:

Bug 2070805: pkg/cvo/updatepayload: Restore shell for rm globbing

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants