Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1102568

Summary: Wrong path of default secrets docker tries to open
Product: Red Hat Enterprise Linux 7 Reporter: Luwen Su <lsu>
Component: dockerAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: dwalsh, gouyang, lsm5, mjenner, xhe
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 03:18:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luwen Su 2014-05-29 08:41:08 UTC
Description of problem:
With docker-0.11.1-6.el7.x86_64, the default secrets path is
#ll /var/lib/docker/secrets/
total 0
but the docker will try to find it in /etc/docker/secrets


Version-Release number of selected component (if applicable):
docker-0.11.1-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# docker run -t -d fedora /bin/bash
3a94dbcefd8d269af97376d37a103374c98c8418953c640e101e57d335ad3c4b
2014/05/29 16:33:08 Error: Cannot start container 3a94dbcefd8d269af97376d37a103374c98c8418953c640e101e57d335ad3c4b: open /etc/docker/secrets: no such file or directory

2.
#mkdir -p /etc/docker/secrets
#docker run -t -d fedora /bin/bash
f409532a826485cb823607d60273fe2d452860f5469c80938e0813e3d8a67544
# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
f409532a8264        fedora:20           /bin/bash           5 seconds ago       Up 4 seconds                            elegant_ardinghelli0   

3.RHEL version default location
#ll /var/lib/docker/secrets
total 0

Comment 2 Lokesh Mandvekar 2014-05-29 11:06:04 UTC
https://github.com/lsm5/docker/commit/3253dbcc06be3b9cfc34b414d22e0e5ab39ebdf2 should fix it

Comment 3 Lokesh Mandvekar 2014-05-29 13:22:00 UTC
(In reply to Lokesh Mandvekar from comment #2)
> https://github.com/lsm5/docker/commit/
> 3253dbcc06be3b9cfc34b414d22e0e5ab39ebdf2 should fix it

This is probably wrong. Will update asap.

Comment 4 Luwen Su 2014-06-04 09:47:10 UTC
Hello lsm5,

The command doesn't stop start container and the new option --grant-secret works too, but it still locate at /etc/docker. 

So few questions..
1.Is "/etc/docker" the final rhel version?
2.Doe the bug verifry with steps below or some new patches will go into the build?

With docker-0.11.1-15.el7.x86_64, 

# docker secret list
SECRET NAME           FROM HOST
etc-pki-entitlement   *
rhel7.repo            *

# ll /etc/docker/secrets/
total 0
lrwxrwxrwx. 1 root root 20 Jun  4 13:52 etc-pki-entitlement -> /etc/pki/entitlement
lrwxrwxrwx. 1 root root 28 Jun  4 13:52 rhel7.repo -> /etc/yum.repos.d/redhat.repo

# ll /var/lib/docker/secrets/
total 0

# docker run -t -d fedora /bin/bash
d2c87206918f45c0d255a1c94d73002634b0933e5f2f6671f7b227b9a5cde5f8
#docker run -t -d --grant-secret=etc-pki-entitlement fedora /bin/bash
decfac6b2af97bf86f24f5b34bd5ec06b08773f902959d7928652e2599c446e6

Comment 5 Lokesh Mandvekar 2014-06-13 14:33:26 UTC
Hi,

this should be fixed with docker-0.11.1-19.el7 available in RHEL7

Comment 6 Luwen Su 2014-06-17 05:30:07 UTC
(In reply to Lokesh Mandvekar from comment #5)
> Hi,
> 
> this should be fixed with docker-0.11.1-19.el7 available in RHEL7

Yes, make up the steps
# rpm -q docker
docker-0.11.1-19.el7.x86_64
# ll /etc/docker/
ls: cannot access /etc/docker/: No such file or directory
# ll /usr/share/rhel/secrets/
total 0
lrwxrwxrwx. 1 root root 20 Jun 11 16:32 etc-pki-entitlement -> /etc/pki/entitlement
lrwxrwxrwx. 1 root root 28 Jun 11 16:32 rhel7.repo -> /etc/yum.repos.d/redhat.repo

# docker run -t -d redhat/rhel7beta /bin/bash
ab4e81944d05bc12e13613b57df2674680f8934be660d862f83feec8f9eafbfd

Comment 9 errata-xmlrpc 2015-03-05 03:18:52 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://rhn.redhat.com/errata/RHSA-2015-0623.html