Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1508761

Summary: [CRI-O] pod has no "HOSTNAME" environment variable
Product: OpenShift Container Platform Reporter: weiwei jiang <wjiang>
Component: ContainersAssignee: Mrunal Patel <mpatel>
Status: CLOSED ERRATA QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.7.0CC: aos-bugs, jhonce, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 14:09:47 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 weiwei jiang 2017-11-02 07:57:36 UTC
Description of problem:
Cri-o pod has no "HOSTNAME" environment variable

Version-Release number of selected component (if applicable):
# openshift version 
openshift v3.7.0-0.188.0
kubernetes v1.7.6+a08f5eeb62
etcd 3.2.8
crio -v
crio version 1.0.2
commit: "29077fa6fbd85f0ca9c453ab1bf1ff7b02bc3f5c"

How reproducible:
Always

Steps to Reproduce:
1.oc run hello --image=aosqe/hello-openshift
2.oc exec -it hello-1-jd2bx env|grep -i hostname
3.

Actual results:
2. Output has no "HOSTNAME" 

Expected results:
2. Output should display "HOSTNAME=balabala"

Additional info:
For docker runtime, have no this issue.

Comment 1 Mrunal Patel 2017-11-02 17:24:30 UTC
https://github.com/kubernetes-incubator/cri-o/pull/1113 is the PR for fixing it. This will be available in next release of 1.0.3

Comment 3 weiwei jiang 2018-01-03 06:33:51 UTC
Checked with v3.9.0 which cri-o is enabled, and env HOSTNAME work well now.
# oc version 
oc v3.9.0-0.9.0
kubernetes v1.8.1+0d5291c
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://172.16.120.75:8443
openshift v3.9.0-0.9.0
kubernetes v1.8.1+0d5291c

Comment 6 errata-xmlrpc 2018-03-28 14:09:47 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-2018:0489