Open thanusiak opened 2 years ago
that hostname line has not been touched for very long time and that file should exist in Linux.
I see that file when I run the image:
~$ docker run -it icr.io/ext/logdna-agent:3.5.2 bash
Unable to find image 'icr.io/ext/logdna-agent:3.5.2' locally
3.5.2: Pulling from ext/logdna-agent
54e56e6f8572: Pull complete
4f8ddd7f5a75: Pull complete
769927f5652f: Pull complete
1e852efbf2ff: Pull complete
Digest: sha256:1bb082da732c6e2d6bda583832c4f4dd3f2891cd824682b61c80988d52dc0dcb
Status: Downloaded newer image for icr.io/ext/logdna-agent:3.5.2
[root@ec6a9b7c3744 work]# cat /etc/hostname
ec6a9b7c3744
If you run it via docker locally or on standard Linux box it will be present, however it will not be present when run off a CoreOs worker (Openshift). See similar discussion (it does not seem to be specific to FCOS): https://ask.fedoraproject.org/t/location-of-etc-hostname-on-coreos/13426
ic, you are using FCOS.
Probably something todo with FCOS vs RHCOS.
Red Hat Enterprise Linux CoreOS (RHCOS) is the only operating system supported on the OpenShift control plane nodes. https://cloud.redhat.com/blog/red-hat-enterprise-linux-coreos-customization
@c-nixon ?
@dkhokhlov Im referring to RHCOS, just couldnt find any discussion specific to it.
ic. might be OCP 4 vs OCP 3. some search on RH portal: https://access.redhat.com/search/#/?q=%22%2Fetc%2Fhostname%22%20openshift
@thanusiak
are you happy with proc/sys/kernel/hostname
solution?
It seems to works as expected, so Im good with this solution
Testing agent-resources-openshift.yaml with: Server Version: 4.10.18
I got the following error:
due to
Not sure when the change happened in OCP, but workers in fact don't have the hostname file by default.
Replacing
path: /etc/hostname
with :path: /proc/sys/kernel/hostname
seems to resolve the problem.