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

osd: add privileged support (back) to blkdevmapper securityContext (work-around) #9191

Merged
merged 1 commit into from Nov 17, 2021

Conversation

Omar007
Copy link
Contributor

@Omar007 Omar007 commented Nov 17, 2021

Description of your changes:
The blockdevmapper securityContext was changed to request a minimal set of required capabilities for its operation and drop running as privileged.
While the base change works and is valid in terms of the container's copy operation, it turns out that OpenShift may require some additional configuration not currently covered by the limited securityContext and the capabilities granted.

To not break those OpenShift deployments, make the blkdevmapper securityContext listen to the ROOK_HOSTPATH_REQUIRES_PRIVILEGED flag again to set privileged mode.
This flag is true on OpenShift deployments and running as privileged works around the (missing) configuration problem for now.
To properly drop privileged completely some additional investigation needs to be done on OpenShift deployments without relying on privileged execution.

This resolves the immediate problem of #9186 but just running everything privileged is not and should not be the proper solution long-term.
According to @travisn in said issue, PR #9175 might be relevant here.

Which issue is resolved by this Pull Request:
Resolves #9186

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

…ork-around)

The blockdevmapper securityContext was changed to request a minimal set of
required capabilities for its operation and drop running as privileged.
While the base change works and is valid in terms of the container's copy operation,
it turns out that OpenShift may require some additional configuration not
currently covered by the limited securityContext and the capabilities granted.

To not break those OpenShift deployments, make the blkdevmapper securityContext
listen to the ROOK_HOSTPATH_REQUIRES_PRIVILEGED flag again to set privileged mode.
This flag is true on OpenShift deployments and running as privileged
works around the (missing) configuration problem for now.
To properly drop privileged completely some additional investigation needs
to be done on OpenShift deployments without relying on privileged execution.

Signed-off-by: Omar Pakker <Omar007@users.noreply.github.com>
@travisn travisn merged commit 075b82b into rook:master Nov 17, 2021
mergify bot added a commit that referenced this pull request Nov 17, 2021
osd: add privileged support (back) to blkdevmapper securityContext (work-around) (backport #9191)
@Omar007 Omar007 deleted the fix/blkdevmapper-openshift-fallback branch November 17, 2021 15:30
@travisn travisn mentioned this pull request Nov 24, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Having to add privileged:true in osd deployment spec for blkdevmapper to fix permission denied
2 participants