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 1463824 - rpm tries to stop docker containers during fresh install (no upgrade)
Summary: rpm tries to stop docker containers during fresh install (no upgrade)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Frantisek Kluknavsky
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
: 1456344 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-21 20:11 UTC by Dusty Mabe
Modified: 2019-03-06 02:06 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 00:11:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
rpm-install.txt (13.84 KB, text/plain)
2017-06-21 20:11 UTC, Dusty Mabe
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2344 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2017-08-08 22:51:38 UTC

Description Dusty Mabe 2017-06-21 20:11:30 UTC
Created attachment 1290300 [details]
rpm-install.txt

Description of problem:


See errors during fresh rpm install of docker. See attachment for full log. 

```
Stopping containers...
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
"docker stop" requires at least 1 argument(s).
See 'docker stop --help'.

Usage:  docker stop [OPTIONS] CONTAINER [CONTAINER...]

Stop one or more running containers
```


Version-Release number of selected component (if applicable):
```
[root@n9 ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[root@n9 ~]# 
[root@n9 ~]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

[root@n9 ~]# rpm -q docker
docker-1.12.6-28.git1398f24.el7.centos.x86_64
```




How reproducible:
Always

Steps to Reproduce:
1. yum install -y docker from a fresh machine

Comment 2 Ed Santiago 2017-06-22 17:07:12 UTC
This is a reopening of bug 1450172.

FWIW, bug confirmed in docker-1.12.6-32.git88a4867.el7. Bug is *not* present in any 7.4 docker build I tested, e.g. docker-1.12.6-39.1.git6ffd653.el7, because the 7.4 branch of the specfile doesn't seem to have the 'docker stop' step.

One possible suggestion for replacing the scriptlet:

    if systemctl --quiet is-active docker.service; then
        running=$(/usr/bin/docker ps -a -q)
        test -n "$running" && /usr/bin/docker stop $running
    fi

This solves two problems:

   1) Message when docker daemon not running (e.g. first install, or upgrade if daemon is stopped):

       Cannot connect to the Docker daemon. Is the docker daemon running on this host?

   2) Message when docker daemon _is_ running but there are no active containers:

       "docker stop" requires at least 1 argument(s).
       See 'docker stop --help'.

       Usage:  docker stop [OPTIONS] CONTAINER [CONTAINER...]

       Stop one or more running containers

Comment 3 Daniel Walsh 2017-06-30 15:17:58 UTC
Franticek any movement on this bug?

Comment 4 Frantisek Kluknavsky 2017-07-02 11:21:38 UTC
The offending part of the scriptlet was removed by Lokesh in 7.4 some time ago. I removed that part in 7.3 now.

Comment 5 Frantisek Kluknavsky 2017-07-04 14:44:15 UTC
Currently, in 7.4, updating docker with a running container (with systemd inside) results in:

Sending SIGKILL to remaining processes...
Halting system.
Exiting container.
Error response from daemon: Driver devicemapper failed to remove root filesystem a67fc08a170b5564a88a188f1ec5d25d78f89e4734e7f64bee09c54fc1c74059: failed to remove device 5f665fc469da1651fb1161b5bfc8c2b3937de89d2844919626ab39598f09d132:devicemapper: Can't set task name /dev/mapper/docker-253:2-67259921-pool

Comment 6 Frantisek Kluknavsky 2017-07-04 14:47:10 UTC
*** Bug 1456344 has been marked as a duplicate of this bug. ***

Comment 8 Luwen Su 2017-07-22 14:59:36 UTC
The fresh install is fine in docker-1.12.6-48.git0fdc778.el7.x86_64.rpm

Comment 10 errata-xmlrpc 2017-08-02 00:11:21 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://access.redhat.com/errata/RHBA-2017:2344


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