Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1456583

Summary: hostname command not found
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: seb
Component: ContainerAssignee: Sébastien Han <shan>
Status: CLOSED ERRATA QA Contact: Vasishta <vashastr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.3CC: dang, gmeno, hchen, hnallurv, jim.curtis, kdreyer, pprakash
Target Milestone: rc   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhceph:ceph-3.0-rhel-7-docker-candidate-71465-20170804220045 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-05 23:18:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description seb 2017-05-29 16:48:33 UTC
Description of problem:

While setting the weight of a container we use the 'hostname' command to determine the hostname of the container. This command does not exist on the rhel7.3 container image.

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


How reproducible:

Always

Steps to Reproduce:
1.
2.
3.

Actual results:

No hostname is set

Expected results:

Hostname should be set

Additional info:

Comment 2 seb 2017-05-29 16:51:09 UTC
upstream PR: https://github.com/ceph/ceph-docker/pull/655

Comment 3 seb 2017-05-30 14:43:52 UTC
Harish, what does QE think about this?
Thanks.

Comment 4 Harish NV Rao 2017-05-30 14:50:31 UTC
Sebastien, is this a must fix for 2.3? We just have very few days to QE completion....

Comment 5 seb 2017-05-30 16:38:11 UTC
This is not a must-fix. I'm just not sure how this is working... but seems to be working without this patch. I'm still investigating though.

Comment 6 Ken Dreyer (Red Hat) 2017-06-01 16:19:50 UTC
The hostname package is probably part of an RPM that ceph pulls in. 

rpm -qf /usr/bin/hostname
hostname-3.13-3.el7.x86_64

Try "yum remove hostname" in a running container to find out exactly what the dependency chain is.

Comment 7 seb 2017-06-02 09:59:40 UTC
This is strange, see:

[root@leseb-tarox ~]# docker run -ti --entrypoint=/bin/bash brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/rhceph:ceph-2-rhel-7-docker-candidate-20170417171705
[root@2b84e3c1ac9a /]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
[root@2b84e3c1ac9a /]# ceph -v
ceph version 10.2.7-6.el7cp (750b38d01c7e11bf8c9cc48664dd79085f76c94c)
[root@2b84e3c1ac9a /]# hostname
bash: hostname: command not found
[root@2b84e3c1ac9a /]# rpm -qf /usr/bin/hostname
error: file /usr/bin/hostname: No such file or directory

Comment 8 Ken Dreyer (Red Hat) 2017-06-02 12:39:43 UTC
Oh, got it, then PR 655 looks like the way to avoid installing the hostname RPM.

Comment 9 seb 2017-06-12 10:02:01 UTC
merge upstream, backport in progress

Comment 13 Vasishta 2017-09-06 14:48:41 UTC
Hi all,

Moving the BZ to VERIFIED state.

$  sudo docker exec d6153ad10e34 hostname
magna025
$  sudo docker exec d6153ad10e34 rpm -qf /usr/bin/hostname
hostname-3.13-3.el7.x86_64

Regards,
Vasishta

Comment 16 errata-xmlrpc 2017-12-05 23:18:20 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/RHEA-2017:3388