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 1376600 - atomic version won't work with system containers
Summary: atomic version won't work with system containers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-15 21:41 UTC by Qian Cai
Modified: 2016-11-04 09:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 09:07:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2628 0 normal SHIPPED_LIVE atomic bug fix and enhancement update 2016-11-03 18:17:14 UTC

Description Qian Cai 2016-09-15 21:41:36 UTC
Description of problem:
We really need a way to track image version for system containers like rpm -q for their counterparts.

# atomic images list
   REPOSITORY              TAG      IMAGE ID       CREATED            VIRTUAL SIZE   TYPE      
>  rhel7/flannel           latest   b67c81dd9cec   2016-09-14 14:49                  system       
>  rhel7/etcd              latest   ba648b580c2a   2016-09-14 19:14                  system    
>  rhel7/etcd3             latest   952d875b7808   2016-09-14 18:16                  system    
   rhel7/etcd-2.3.7        8        7ebe798bd215   2016-09-14 14:48                  system

# atomic version rhel7/etcd-2.3.7
g-io-error-quark: Refspec 'ociimage/7ebe798bd215024d20658f7f39394868647e08bf73bf9b1f5aaf8991bc489a11-latest' not found (1)

# atomic version rhel7/flannel
Image Name: rhel7/flannel
/bin/atomic version rhel7/flannel: too few arguments
Try '/bin/atomic version rhel7/flannel --help' for more information.

# atomic version c92f496bd9f0
Image Name: c92f496bd9f0
/bin/atomic version c92f496bd9f0: too few arguments
Try '/bin/atomic version c92f496bd9f0 --help' for more information.

# atomic version rhel7/etcd
Image Name: rhel7/etcd
/bin/atomic version rhel7/etcd: too few arguments
Try '/bin/atomic version rhel7/etcd --help' for more information.

# atomic version rhel7/etcd3
Image Name: rhel7/etcd3
/bin/atomic version rhel7/etcd3: too few arguments

Version-Release number of selected component (if applicable):
atomic-1.12.1-3.el7.x86_64

How reproducible:
always

Comment 1 Qian Cai 2016-09-16 16:17:02 UTC
Without this, the only viable workaround I can find so far is to start another process inside the running container to obtain the version information.

# runc exec etcd etcd --version

Comment 2 Alex Jia 2016-09-19 05:09:57 UTC
The same issue to non-system containers in atomic-1.12.2-2.el7.x86_64.

[cloud-user@atomic-host-001 ~]$ rpm -q atomic
atomic-1.12.2-2.el7.x86_64

[cloud-user@atomic-host-001 ~]$ sudo atomic version
atomic version: too few arguments
Try 'atomic version --help' for more information.

[cloud-user@atomic-host-001 ~]$ sudo atomic version docker.io/busybox
Image Name: docker.io/busybox
/bin/atomic version docker.io/busybox: too few arguments
Try '/bin/atomic version docker.io/busybox --help' for more information.

[cloud-user@atomic-host-001 ~]$ sudo atomic version -r docker.io/busybox
Image Name: docker.io/busybox
/bin/atomic version -r docker.io/busybox: too few arguments
Try '/bin/atomic version -r docker.io/busybox --help' for more information.

[cloud-user@atomic-host-001 ~]$ sudo atomic version --help
usage: atomic version [-h] [-r] image

positional arguments:
  image          container image

optional arguments:
  -h, --help     show this help message and exit
  -r, --recurse  recurse through all layers

atomic version displays the image version information, if it is provided

Comment 3 Alex Jia 2016-09-19 05:45:08 UTC
(In reply to Alex Jia from comment #2)
> The same issue to non-system containers in atomic-1.12.2-2.el7.x86_64.

s/non-system/non-RHEL/.

Comment 4 Giuseppe Scrivano 2016-09-19 21:23:27 UTC
PR upstream: https://github.com/projectatomic/atomic/pull/634

Comment 6 Alex Jia 2016-09-20 10:06:25 UTC
This bug has been fixed on atomic-1.12.2-3.el7.x86_64.

[cloud-user@atomic-00 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Atomic Host release 7.2

[cloud-user@atomic-00 ~]$ atomic host status
State: idle
Deployments:
● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
       Version: 7.2.6-1 (2016-08-18 16:01:03)
        Commit: dae35767902aad07b087d359be20f234d244da79fdd4734cd2fbc3ee39b12cf8
        OSName: rhel-atomic-host
      Unlocked: development

[cloud-user@atomic-00 ~]$ rpm -q atomic
atomic-1.12.2-3.el7.x86_64

[cloud-user@atomic-00 ~]$ sudo atomic version registry.access.redhat.com/rhel7/etcd:2.3.7
Image Name: registry.access.redhat.com/rhel7/etcd:2.3.7
distribution-scope: public
build-date: 2016-09-08T10:38:28.972667Z
RUN: /usr/bin/docker run -d $OPT1 -p 4001:4001 -p 7001:7001 -p 2379:2379 -p 2380:2380 --name $NAME $IMAGE $OPT2 $OPT3
Name: rhel7/etcd
Build_Host: rcm-img-docker02.build.eng.bos.redhat.com
vcs-type: git
architecture: x86_64
Summary: A highly-available key value store for shared configuration
vcs-ref: 37c024f260707c2b0c017345fd99aae8b2dd2747
release: 104
Version: 2.3.7
Architecture: x86_64
INSTALL: /usr/bin/docker run --rm $OPT1 --privileged -v /:/host -e HOST=/host -e NAME=$NAME -e IMAGE=$IMAGE $IMAGE $OPT2 /usr/bin/install.sh  $OPT3
Release: 5
Vendor: Red Hat, Inc.
BZComponent: etcd-docker
Authoritative_Registry: registry.access.redhat.com
com.redhat.build-host: rcm-img-docker02.build.eng.bos.redhat.com
UNINSTALL: /usr/bin/docker run --rm $OPT1 --privileged -v /:/host -e HOST=/host -e NAME=$NAME -e IMAGE=$IMAGE $IMAGE $OPT2 /usr/bin/uninstall.sh $OPT3

[cloud-user@atomic-00 ~]$ sudo atomic version registry.access.redhat.com/rhel7/etcd:latest
Image Name: registry.access.redhat.com/rhel7/etcd:latest
distribution-scope: public
build-date: 2016-09-08T10:38:28.972667Z
RUN: /usr/bin/docker run -d $OPT1 -p 4001:4001 -p 7001:7001 -p 2379:2379 -p 2380:2380 --name $NAME $IMAGE $OPT2 $OPT3
Name: rhel7/etcd
Build_Host: rcm-img-docker02.build.eng.bos.redhat.com
vcs-type: git
architecture: x86_64
Summary: A highly-available key value store for shared configuration
vcs-ref: 37c024f260707c2b0c017345fd99aae8b2dd2747
release: 104
Version: 2.3.7
Architecture: x86_64
INSTALL: /usr/bin/docker run --rm $OPT1 --privileged -v /:/host -e HOST=/host -e NAME=$NAME -e IMAGE=$IMAGE $IMAGE $OPT2 /usr/bin/install.sh  $OPT3
Release: 5
Vendor: Red Hat, Inc.
BZComponent: etcd-docker
Authoritative_Registry: registry.access.redhat.com
com.redhat.build-host: rcm-img-docker02.build.eng.bos.redhat.com
UNINSTALL: /usr/bin/docker run --rm $OPT1 --privileged -v /:/host -e HOST=/host -e NAME=$NAME -e IMAGE=$IMAGE $IMAGE $OPT2 /usr/bin/uninstall.sh $OPT3

Comment 8 errata-xmlrpc 2016-11-04 09:07: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/RHBA-2016-2628.html


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