Bug 1400228

Summary: Ability to disable subscription-manager-into-containers host-wide
Product: Red Hat Enterprise Linux 7 Reporter: Tim Waugh <twaugh>
Component: dockerAssignee: smahajan <smahajan>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: amurdaca, lsm5, lsu
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 20:44:03 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:

Description Tim Waugh 2016-11-30 17:28:59 UTC
Description of problem:
When docker starts containers it allows subscription-manager inside the containers to use subscriptions available on the host.

It should be possible to disable this. For instance, atomic-reactor needs much better control over images it builds and needs to be able to control the entire set of repositories available to the build container it starts.

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

How reproducible:
100%

Steps to Reproduce:
1.Subscribe host
2.Start a rhel7 docker container and run 'yum repolist' inside it

Actual results:
Lists host-subscribed repositories.

Expected results:
Should be possible to disable this behaviour.

Comment 1 Daniel Walsh 2016-11-30 18:24:36 UTC
Do you want to be able to disable the secrets patch daemon wide or per container?

Comment 3 Tim Waugh 2016-12-02 10:53:24 UTC
Ideally daemon-wide I think.

Comment 4 Daniel Walsh 2016-12-02 20:59:50 UTC
Shishir can you see about adding a daemon flag for disabling the secrets patch in our version of docker. 

--enable-secrets

Enabled by default

Comment 5 smahajan@redhat.com 2016-12-05 15:41:34 UTC
https://github.com/projectatomic/docker/pull/215

Shishir

Comment 6 Antonio Murdaca 2016-12-05 16:56:16 UTC
fixed in docker-1.12.3 (and newer branches)

Comment 8 Luwen Su 2017-01-10 03:33:35 UTC
The container could use the content of subscription that the host has.

# docker run -it --rm  rhel7:latest /bin/bash
[root@e2f3fab6cd24 /]# yum repolist
...
rhel-7-fast-datapath-htb-rpms/x86_64                                                 | 4.0 kB  00:00:00     
rhel-7-fast-datapath-htb-rpms/x86_64/group                                           |  104 B  00:00:00     
rhel-7-fast-datapath-htb-rpms/x86_64/updateinfo                                      |  921 B  00:00:00     
rhel-7-fast-datapath-htb-rpms/x86_64/primary_db                                      |  16 kB  00:00:00     
rhel-7-fast-datapath-rpms/7Server/x86_64                                             | 4.0 kB  00:00:00     
rhel-7-fast-datapath-rpms/7Server/x86_64/group                                       |  104 B  00:00:00     
rhel-7-fast-datapath-rpms/7Server/x86_64/updateinfo                                  | 2.9 kB  00:00:00     
rhel-7-fast-datapath-rpms/7Server/x86_64/primary_db                                  |  11 kB  00:00:00     
rhel-7-server-aus-rpms/7Server/x86_64                                                | 3.5 kB  00:00:00     
rhel-7-server-aus-rpms/7Server/x86_64/group                                          |  104 B  00:00:00     
....

In docker-1.12.5-9.el7.x86_64, move to verified.

Comment 10 errata-xmlrpc 2017-01-17 20:44:03 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-2017-0116.html