Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1102568 - Wrong path of default secrets docker tries to open
Wrong path of default secrets docker tries to open
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Daniel Walsh
Virtualization Bugs
: Extras
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-29 04:41 EDT by Luwen Su
Modified: 2015-03-04 22:18 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-04 22:18:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0623 normal SHIPPED_LIVE Low: docker security, bug fix, and enhancement update 2015-03-05 10:28:35 EST

  None (edit)
Description Luwen Su 2014-05-29 04:41:08 EDT
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 07:06:04 EDT
https://github.com/lsm5/docker/commit/3253dbcc06be3b9cfc34b414d22e0e5ab39ebdf2 should fix it
Comment 3 Lokesh Mandvekar 2014-05-29 09:22:00 EDT
(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 05:47:10 EDT
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 10:33:26 EDT
Hi,

this should be fixed with docker-0.11.1-19.el7 available in RHEL7
Comment 6 Luwen Su 2014-06-17 01:30:07 EDT
(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-04 22:18:52 EST
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

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