RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1793598 - podman commands failing and reporting "cannot chdir: Permission denied"
Summary: podman commands failing and reporting "cannot chdir: Permission denied"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.2
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1186913 1734579 1791165
TreeView+ depends on / blocked
 
Reported: 2020-01-21 16:09 UTC by Alex Schultz
Modified: 2023-09-07 21:32 UTC (History)
17 users (show)

Fixed In Version: podman-1.6.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1791165
Environment:
Last Closed: 2020-04-28 15:52:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-33601 0 None None None 2021-10-19 07:35:11 UTC
Red Hat Product Errata RHSA-2020:1650 0 None None None 2020-04-28 15:53:15 UTC

Description Alex Schultz 2020-01-21 16:09:07 UTC
Currently, we're getting reports of podman 1.4.2 reporting "cannot chdir: Permission denined" when running podman commands. We use a "podman image exists <container>" and "podman create" within this code. I've not been able to reproduce it myself, but we've had multiple customers report this issue.  See cloned BZ for additional cases.

+++ This bug was initially created as a clone of Bug #1791165 +++

Description of problem:

Undercloud installation failure in step "Start containers for step 1" due to "cannot chdir: Permission denied"

Version-Release number of selected component (if applicable):


How reproducible:
Always


Actual results:
Failing with "cannot chdir: Permission denied"

Expected results:
Undercloud install should work

Additional info:

# openstack undercloud install fails with below error

last log is:
TASK [Debug output for task: Start containers for step 1] *************************************************************************************************
2020-01-08 16:50:47.678 57001 WARNING tripleoclient.v1.tripleo_deploy.Deploy [  ] Wednesday 08 January 2020  16:50:47 +0100 (0:00:02.275)       0:21:21.291 *****
2020-01-08 16:50:47.726 57001 WARNING tripleoclient.v1.tripleo_deploy.Deploy [  ] fatal: [hostname]: FAILED! => {
2020-01-08 16:50:47.727 57001 WARNING tripleoclient.v1.tripleo_deploy.Deploy [  ]     "failed_when_result": true,
2020-01-08 16:50:47.727 57001 WARNING tripleoclient.v1.tripleo_deploy.Deploy [  ]     "outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))": [
2020-01-08 16:50:47.727 57001 WARNING tripleoclient.v1.tripleo_deploy.Deploy [  ]         "cannot chdir: Permission denied",

In the messages file, it corresponds to the execution of the following line
Jan  8 16:50:46 hostname python3[71223]: ansible-paunch Invoked with config=/var/lib/tripleo-config/hashed-container-startup-config-step_1.json config_id=['tripleo_step1'] action=apply container_cli=podman container_log_stdout_path=/var/log/containers/stdouts healthcheck_disabled=False managed_by=tripleo-Undercloud debug=False log_file=/var/log/paunch.log

The paunch.log shows errros:

2020-01-08 16:50:46.834 71223 WARNING paunch [  ] Did not find container with "['podman', 'ps', '-a', '--filter', 'label=container_name=memcached', '--filter', 'label=config_id=tripleo_step1', '--format', '{{.Names}}']" - retrying without config_id
2020-01-08 16:50:46.872 71223 WARNING paunch [  ] Did not find container with "['podman', 'ps', '-a', '--filter', 'label=container_name=memcached', '--format', '{{.Names}}']"
2020-01-08 16:50:46.910 71223 ERROR paunch [  ] Error running ['podman', 'create', '--name', 'memcached', '--label', 'config_id=tripleo_step1', '--label', 'container_name=memcached', '--label', 'managed_by=tripleo-Undercloud', '--label', 'config_data={"command": ["/bin/bash", "-c", "source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS"], "healthcheck": {"test": "/openstack/healthcheck"}, "image": "hostname.ctlplane.localdomain:8787/rhosp-beta/openstack-memcached:16.0-62", "net": "host", "privileged": false, "restart": "always", "start_order": 0, "volumes": ["/etc/hosts:/etc/hosts:ro", "/etc/localtime:/etc/localtime:ro", "/etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro", "/etc/pki/ca-trust/source/anchors:/etc/pki/ca-trust/source/anchors:ro", "/etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro", "/etc/pki/tls/certs/ca-bundle.trust.crt:/etc/pki/tls/certs/ca-bundle.trust.crt:ro", "/etc/pki/tls/cert.pem:/etc/pki/tls/cert.pem:ro", "/dev/log:/dev/log", "/etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro", "/etc/puppet:/etc/puppet:ro", "/var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro"]}', '--conmon-pidfile=/var/run/memcached.pid', '--detach=true', '--log-driver', 'k8s-file', '--log-opt', 'path=/var/log/containers/stdouts/memcached.log', '--net=host', '--privileged=false', '--volume=/etc/hosts:/etc/hosts:ro', '--volume=/etc/localtime:/etc/localtime:ro', '--volume=/etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro', '--volume=/etc/pki/ca-trust/source/anchors:/etc/pki/ca-trust/source/anchors:ro', '--volume=/etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro', '--volume=/etc/pki/tls/certs/ca-bundle.trust.crt:/etc/pki/tls/certs/ca-bundle.trust.crt:ro', '--volume=/etc/pki/tls/cert.pem:/etc/pki/tls/cert.pem:ro', '--volume=/dev/log:/dev/log', '--volume=/etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro', '--volume=/etc/puppet:/etc/puppet:ro', '--volume=/var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro', '--cpuset-cpus=0,1,2,3', 'hostname.ctlplane.localdomain:8787/rhosp-beta/openstack-memcached:16.0-62', '/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS']. [1]

2020-01-08 16:50:46.910 71223 ERROR paunch [  ] stdout:
2020-01-08 16:50:46.911 71223 ERROR paunch [  ] stderr: cannot chdir: Permission denied


Things tried so far

- Tried setting selinux to Permissive
- We have tried to set 'become: true' in the playbook which was failing
- We have cleaned up older containers and images.

Comment 1 Tom Sweeney 2020-01-21 19:04:23 UTC
I'll ask Matt to check this, but I wanted to verify that this is happening on RHEL 8.1?    I believe Podman is version 1.6.0+ on RHEL 8.1 and I suspect this issue has been cured in that version.

Comment 2 Alex Schultz 2020-01-21 19:07:01 UTC
My understanding is that podman 1.6 won't be available until early Feb. So this is 8.1 with 1.4

Comment 3 Daniel Walsh 2020-01-26 17:51:58 UTC
Permission denied usually indicates SELinux issues?  Are they chdir into a volume when this happens?

Comment 18 Daniel Walsh 2020-02-05 20:30:19 UTC
Fixed in the next release.

Comment 19 Tom Sweeney 2020-02-06 18:34:05 UTC
Sending this off to Jindrich to handle any packaging concerns.

Comment 24 errata-xmlrpc 2020-04-28 15:52:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1650


Note You need to log in before you can comment on or make changes to this bug.