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 1259829 - docker kill --name recommended in man atomic-stop(1) does not work
Summary: docker kill --name recommended in man atomic-stop(1) does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-03 15:07 UTC by Jan Pazdziora (Red Hat)
Modified: 2016-03-31 23:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-31 23:24:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0527 0 normal SHIPPED_LIVE atomic bug fix and enhancement update 2016-04-01 03:20:15 UTC

Description Jan Pazdziora (Red Hat) 2015-09-03 15:07:20 UTC
Description of problem:

I've realized I don't support atomic stop in my container. So I've read man atomic-stop(1) which recommends using

       If the container image has a LABEL STOP instruction like the following:

       CLABEL STOP /usr/bin/docker kill -s HUP --name $NAME $IMAGE

However, having that in my Dockerfile, atomic stop sssd fails with flag provided but not defined: --name.

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

atomic-1.0-108.el7.x86_64
docker-1.7.1-115.el7.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Run docker kill -s HUP --name sssd sssd for a container started with docker run --name sssd ...

Actual results:

flag provided but not defined: --name.

Expected results:

The man page probably ways to show

       LABEL STOP /usr/bin/docker kill -s HUP $NAME

Additional info:

Comment 2 Antonio Murdaca 2015-10-05 17:43:43 UTC
Fix is in https://github.com/projectatomic/atomic/pull/181

Comment 3 Daniel Walsh 2015-10-28 13:40:52 UTC
Should be fixed in atomic-1.5

Comment 5 Alex Jia 2016-01-20 10:02:28 UTC
Fix typos in PR 181, https://github.com/projectatomic/atomic/pull/290

Comment 6 Alex Jia 2016-01-20 10:08:30 UTC
1) w/o LABEL STOP

# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

# atomic images | grep centos
 docker.io/centos                                    latest c8a648134623 2015-12-24 23:30    196.63 MB 

# atomic stop centos
# echo $?
0

NOTE: no any output message, Is it an expected result?


2) w/ LABEL STOP

# cat Dockerfile.1
FROM centos
ENV container docker

LABEL STOP "/usr/bin/docker kill -s HUP \${NAME}"

# docker build -t centos_stop_label -f Dockerfile.1 .

# atomic info centos_stop_label | grep STOP
STOP: /usr/bin/docker kill -s HUP ${NAME}

# docker run -it centos_stop_label /bin/sh
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.
sh-4.2#

Open a new terminal window

# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1436872bf388        centos_stop_label   "/bin/sh"           6 seconds ago       Up 4 seconds                            condescending_gates

# atomic stop 1436872bf388
/usr/bin/docker kill -s HUP 1436872bf388
1436872bf388

Comment 7 Alex Jia 2016-02-01 03:46:29 UTC
It also works well on atomic-1.8-6.git1bc3814.el7.x86_64, move to the bug to VERIFIED status per comment 6.


# rpm -q atomic
atomic-1.8-6.git1bc3814.el7.x86_64

# man atomic-stop | grep "LABEL STOP /"
       LABEL STOP /usr/bin/docker kill -s HUP \${NAME}

Comment 9 errata-xmlrpc 2016-03-31 23:24:56 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-0527.html


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