Project

Profile

Help

Issue #8186

closed

systemctl show-environment fails without sudo on Centos

Added by rob.wagner76 about 3 years ago. Updated almost 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
OS:
CentOS 7
Triaged:
Yes
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 95
Quarter:

Description

roles/pulp_common/tasks/main.yml executes command systemctl show-environment, which fails on a freshly installed CentOS 7.7 or 7.9 box.

fatal: [localhost]: FAILED! => {"changed": false, "cmd": "set -o pipefail\nsystemctl show-environment | grep -E '^PATH=' | sed 's/PATH=//g'\n", "delta": "0:00:00.009917", "end": "2021-02-01 11:35:20.328111", "msg": "non-zero return code", "rc": 1, "start": "2021-02-01 11:35:20.318194", "stderr": "Failed to get environment: Operation not permitted", "stderr_lines": ["Failed to get environment: Operation not permitted"], "stdout": "", "stdout_lines": []}

Adding become: true to this step fixes the issue,

Actions #1

Updated by mdepaulo@redhat.com about 3 years ago

  • Assignee set to ppicka
  • Triaged changed from No to Yes
  • Groomed changed from No to Yes

We will verify that it is fixed by using Vagrant, because we believe that molecule is using the docker connection as root.

Actions #2

Updated by pulpbot about 3 years ago

  • Status changed from NEW to POST
Actions #3

Updated by ppicka about 3 years ago

  • Sprint set to Sprint 93
Actions #4

Updated by rchan about 3 years ago

  • Sprint changed from Sprint 93 to Sprint 94
Actions #5

Updated by rchan almost 3 years ago

  • Sprint changed from Sprint 94 to Sprint 95

Added by ppicka almost 3 years ago

Revision 33ca4449 | View on GitHub

Privilege escalation

for some CentOS envs we need escalate privileges for systemctl show-environment

closes: #8186 https://pulp.plan.io/issues/8186

Added by ppicka almost 3 years ago

Revision 33ca4449 | View on GitHub

Privilege escalation

for some CentOS envs we need escalate privileges for systemctl show-environment

closes: #8186 https://pulp.plan.io/issues/8186

Actions #6

Updated by ppicka almost 3 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by ttereshc almost 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Sprint/Milestone set to 3.12.2

Also available in: Atom PDF