Bug 1328876 - Atomic --help shouldn't try to connect /var/run/docker.sock
Summary: Atomic --help shouldn't try to connect /var/run/docker.sock
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-20 13:09 UTC by Alex Jia
Modified: 2016-08-19 21:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-19 21:35:27 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Alex Jia 2016-04-20 13:09:39 UTC
Description of problem:
Atomic -h/--help is a user layer help document, it doesn't depend on docker daemon running or not, so it needn't to connect /var/run/docker.sock.


Version-Release number of selected component (if applicable):
# rpm -q atomic
atomic-1.9-4.gitff44c6a.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. strace -e trace=network atomic -h


Actual results:

# strace -e trace=network atomic -h
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15204, si_status=0, si_utime=0, si_stime=0} ---
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15206, si_status=0, si_utime=0, si_stime=0} ---
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7
connect(7, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 7
connect(7, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15208, si_status=0, si_utime=0, si_stime=0} ---
socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/docker.sock"}, 22) = -1 ENOENT (No such file or directory)

<ignore/>

Expected results:


Additional info:

it seems it also shouldn't connect /var/run/nscd/socket.

Comment 2 Alex Jia 2016-06-23 03:27:04 UTC
atomic -h works well w/o docker daemon running on rhelah 7.2.5 now.

[cloud-user@atomic-00 ~]$ sudo atomic host status
  TIMESTAMP (UTC)         VERSION     ID             OSNAME               REFSPEC                                                   
* 2016-06-18 15:21:12     7.2.5       9bfe1fb650     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard

[cloud-user@atomic-00 ~]$ sudo systemctl stop docker

[cloud-user@atomic-00 ~]$ sudo atomic -h | grep 'Atomic host'
    host                execute Atomic host commands

[cloud-user@atomic-00 ~]$ sudo atomic info -h
usage: atomic info [-h] [--remote] image

positional arguments:
  image       container image

optional arguments:
  -h, --help  show this help message and exit
  --remote    ignore local images and only scan registries

atomic info attempts to read and display the LABEL information about an image


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