Bug 1277618 - Atomic run echo's docker command twice
Atomic run echo's docker command twice
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic (Show other bugs)
7.1
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: Lokesh Mandvekar
atomic-bugs@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-03 11:33 EST by Chris Evich
Modified: 2016-03-31 19:25 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-31 19:25:17 EDT
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)

  None (edit)
Description Chris Evich 2015-11-03 11:33:16 EST
Description of problem:
When running 'atomic install rhel7/rsyslog', the 'docker run ... /bin/install.sh' command is echoed back.  Not problem there.  However with 'atomic run' it echo's back the same command twice.

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

atomic-1.5-4.git7e4365f.el7.x86_64

# docker version
Client:
 Version:      1.8.2
 API version:  1.20
 Package Version: docker-1.8.2-8.el7.x86_64
 Go version:   go1.4.2
 Git commit:   a01dc02/1.8.2
 Built:        
 OS/Arch:      linux/amd64

Server:
 Version:      1.8.2
 API version:  1.20
 Package Version: 
 Go version:   go1.4.2
 Git commit:   a01dc02/1.8.2
 Built:        
 OS/Arch:      linux/amd64


How reproducible:
trivial

Steps to Reproduce:
1. atomic run rhel7/rsyslog (or any other layered image)

Actual results:
Docker run command is displayed twice

Expected results:
Docker run command is displayed once

Additional info:
also reproduced with atomic-1.6-1.gitca1e384.el7.x86_64
Comment 2 Daniel Walsh 2015-12-01 17:08:32 EST
Fixed in atomic-1.5-2.git191fb53.el7
Comment 3 Chris Evich 2015-12-02 11:35:27 EST
Added task for CI tests in https://trello.com/c/BlIJ0DP0
Comment 5 Alex Jia 2016-02-01 00:20:03 EST
Atomic run works well on atomic-1.8-6.git1bc3814.el7.x86_64, so move the bug VERIFIED status.

# atomic run rhel7/rsyslog 
docker run -d --privileged --name rsyslog --net=host --pid=host -v /etc/pki/rsyslog:/etc/pki/rsyslog -v /etc/rsyslog.conf:/etc/rsyslog.conf -v /etc/sysconfig/rsyslog:/etc/sysconfig/rsyslog -v /etc/rsyslog.d:/etc/rsyslog.d -v /var/log:/var/log -v /var/lib/rsyslog:/var/lib/rsyslog -v /run:/run -v /etc/machine-id:/etc/machine-id -v /etc/localtime:/etc/localtime -e IMAGE=rhel7/rsyslog -e NAME=rsyslog --restart=always rhel7/rsyslog /bin/rsyslog.sh

This container uses privileged security switches:

INFO: --net=host 
      Processes in this container can listen to ports (and possibly rawip traffic) on the host's network.

INFO: --pid=host 
      Processes in this container can see and interact with all processes on the host and disables SELinux within the container.

INFO: --privileged 
      This container runs without separation and should be considered the same as root on your system.

For more information on these switches and their security implications, consult the manpage for 'docker run'.

c5eb2d69dbfef3168985e15b35300635d7dc503e4b7cbf7e6b4a15d456a3a039
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.

# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
c5eb2d69dbfe        rhel7/rsyslog       "/bin/rsyslog.sh"   14 seconds ago      Up 12 seconds                           rsyslog
Comment 7 Chris Evich 2016-02-02 14:36:41 EST
(In reply to Daniel Walsh from comment #2)
> Fixed in atomic-1.5-2.git191fb53.el7

This fails verify for me on atomic-1.6-6.gitca1e384.el7.x86_64 (7.2.1) but passes in 1.8.  However, now there is _no_ command echo.  If this is a design-decision/change, that's fine. I just want to double-check:

1) What version of atomic did this really change in (1.7)?
2) Is not echo'ing any docker command intended or an error?

Latest behaviour:

-bash-4.2# atomic host status
  TIMESTAMP (UTC)         VERSION                ID             OSNAME               REFSPEC                                                                        
* 2016-02-01 01:13:15     7.2.internal.0.608     919337b3bf     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7.2/x86_64/continuous/buildmaster     
  2015-12-03 19:40:36     7.2.1                  aaf67b91fa     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard                     
-bash-4.2# rpm -q atomic
atomic-1.8.41-c893521978a2670ae1579b4e6eea8ccfa0c5e9f2.fcf70d203a56e7ca57e407cc0cea2abe008136dc.el7.x86_64
-bash-4.2# atomic --version
1.8
-bash-4.2# atomic run registry.access.redhat.com/rhel7/rhel-tools:latest
[root@rhelah72-2pjkve /]# 


Previous behavior (7.2.1):

-bash-4.2# docker images
REPOSITORY                                    TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
registry.access.redhat.com/rhel7/rhel-tools   latest              fd2acbeb2b97        8 weeks ago         1.159 GB
-bash-4.2# atomic --version
1.6
-bash-4.2# rpm -q atomic
atomic-1.6-6.gitca1e384.el7.x86_64
-bash-4.2# atomic run registry.access.redhat.com/rhel7/rhel-tools:latest
docker run -it --name rhel-tools --privileged --ipc=host --net=host --pid=host -e HOST=/host -e NAME=rhel-tools -e IMAGE=registry.access.redhat.com/rhel7/rhel-tools:latest -v /run:/run -v /var/log:/var/log -v /etc/localtime:/etc/localtime -v /:/host registry.access.redhat.com/rhel7/rhel-tools:latest
docker run -it --name rhel-tools --privileged --ipc=host --net=host --pid=host -e HOST=/host -e NAME=rhel-tools -e IMAGE=registry.access.redhat.com/rhel7/rhel-tools:latest -v /run:/run -v /var/log:/var/log -v /etc/localtime:/etc/localtime -v /:/host registry.access.redhat.com/rhel7/rhel-tools:latest

[root@rhelah72-2pjkve /]# exit

-bash-4.2# atomic host status
  TIMESTAMP (UTC)         VERSION   ID             OSNAME               REFSPEC                                                        
* 2015-12-03 19:40:36     7.2.1     aaf67b91fa     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     
  2015-11-10 16:11:46     7.2       ec85fba1bf     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     
-bash-4.2#
Comment 10 Chris Evich 2016-02-05 16:07:05 EST
Note: More playing with RHEL Atomic + upstream bits rebuilt on top.  This package seems to do 'the right thing':

# rpm -q atomic
atomic-1.8.41-c893521978a2670ae1579b4e6eea8ccfa0c5e9f2.fcf70d203a56e7ca57e407cc0cea2abe008136dc.el7.x86_64

# atomic --version
1.8

# atomic run rhel7/rhel-tools
Using default tag: latest
fd2acbeb2b97: Download complete 
6c3a84d798dc: Download complete 
Status: Image is up to date for docker.io/rhel7/rhel-tools:latest
docker.io/rhel7/rhel-tools: this image was pulled from a legacy registry.  Important: This registry version will not be supported in future versions of docker.

docker run -it --name rhel-tools --privileged --ipc=host --net=host --pid=host -e HOST=/host -e NAME=rhel-tools -e IMAGE=rhel7/rhel-tools -v /run:/run -v /var/log:/var/log -v /etc/localtime:/etc/localtime -v /:/host rhel7/rhel-tools

This container uses privileged security switches:

INFO: --ipc=host 
      Processes in this container can see and possibly interact with all semaphores and shared memory segments on the host as well as disables SELinux within the container.

INFO: --net=host 
      Processes in this container can listen to ports (and possibly rawip traffic) on the host's network.

INFO: --pid=host 
      Processes in this container can see and interact with all processes on the host and disables SELinux within the container.

INFO: --privileged 
      This container runs without separation and should be considered the same as root on your system.

For more information on these switches and their security implications, consult the manpage for 'docker run'.

So I've 'fudged' my test's version check for atomic > 1.7 should only echo command once.  It would still be helpful to confirm this is the right version and to confirm most recent builds actually still echo the command once or not.
Comment 11 Lokesh Mandvekar 2016-03-24 10:31:58 EDT
(In reply to Chris Evich from comment #7)
> (In reply to Daniel Walsh from comment #2)
> > Fixed in atomic-1.5-2.git191fb53.el7
> 
> This fails verify for me on atomic-1.6-6.gitca1e384.el7.x86_64 (7.2.1) but
> passes in 1.8.  However, now there is _no_ command echo.  If this is a
> design-decision/change, that's fine. I just want to double-check:
> 
> 1) What version of atomic did this really change in (1.7)?
> 2) Is not echo'ing any docker command intended or an error?


Dan, I guess you're the right person to comment on ^

> 
> Latest behaviour:
> 
> -bash-4.2# atomic host status
>   TIMESTAMP (UTC)         VERSION                ID             OSNAME      
> REFSPEC                                                                     
> 
> * 2016-02-01 01:13:15     7.2.internal.0.608     919337b3bf    
> rhel-atomic-host    
> rhel-atomic-host-ostree:rhel-atomic-host/7.2/x86_64/continuous/buildmaster  
> 
>   2015-12-03 19:40:36     7.2.1                  aaf67b91fa    
> rhel-atomic-host    
> rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard                  
> 
> -bash-4.2# rpm -q atomic
> atomic-1.8.41-c893521978a2670ae1579b4e6eea8ccfa0c5e9f2.
> fcf70d203a56e7ca57e407cc0cea2abe008136dc.el7.x86_64
> -bash-4.2# atomic --version
> 1.8
> -bash-4.2# atomic run registry.access.redhat.com/rhel7/rhel-tools:latest
> [root@rhelah72-2pjkve /]# 
> 
> 
> Previous behavior (7.2.1):
> 
> -bash-4.2# docker images
> REPOSITORY                                    TAG                 IMAGE ID  
> CREATED             VIRTUAL SIZE
> registry.access.redhat.com/rhel7/rhel-tools   latest             
> fd2acbeb2b97        8 weeks ago         1.159 GB
> -bash-4.2# atomic --version
> 1.6
> -bash-4.2# rpm -q atomic
> atomic-1.6-6.gitca1e384.el7.x86_64
> -bash-4.2# atomic run registry.access.redhat.com/rhel7/rhel-tools:latest
> docker run -it --name rhel-tools --privileged --ipc=host --net=host
> --pid=host -e HOST=/host -e NAME=rhel-tools -e
> IMAGE=registry.access.redhat.com/rhel7/rhel-tools:latest -v /run:/run -v
> /var/log:/var/log -v /etc/localtime:/etc/localtime -v /:/host
> registry.access.redhat.com/rhel7/rhel-tools:latest
> docker run -it --name rhel-tools --privileged --ipc=host --net=host
> --pid=host -e HOST=/host -e NAME=rhel-tools -e
> IMAGE=registry.access.redhat.com/rhel7/rhel-tools:latest -v /run:/run -v
> /var/log:/var/log -v /etc/localtime:/etc/localtime -v /:/host
> registry.access.redhat.com/rhel7/rhel-tools:latest
> 
> [root@rhelah72-2pjkve /]# exit
> 
> -bash-4.2# atomic host status
>   TIMESTAMP (UTC)         VERSION   ID             OSNAME              
> REFSPEC                                                        
> * 2015-12-03 19:40:36     7.2.1     aaf67b91fa     rhel-atomic-host    
> rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     
>   2015-11-10 16:11:46     7.2       ec85fba1bf     rhel-atomic-host    
> rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     
> -bash-4.2#
Comment 12 Daniel Walsh 2016-03-24 10:58:37 EDT
Atomic command is supposed to echo it once.
Comment 14 errata-xmlrpc 2016-03-31 19:25:17 EDT
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/RHBA-2016-0527.html

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