[Users] No FQDN hostname for COS7/RHEL7 containers?
Scott Dowdle
dowdle at montanalinux.org
Thu Aug 6 07:54:32 PDT 2015
Greetings,
----- Original Message -----
> I know that rhel6 has no /etc/hostname and it was not my question
> unless you wanted to explain that we should not run rhel7/cos7
> containers on rhel6 based openvz kernel hardware node.
> It works as expected, if I remove the lines from the script
> "/etc/vz/dists/scripts/redhat-set_hostname.sh" where the
> /etc/hostname of the container is changed...
Ok, I did some verification on a CentOS 6 OpenVZ host node by creating a CentOS 7 container. Here's what I found... verifying what you had said.
If I create the container with --hostname {fqdn} the container DOES NOT have an /etc/hostname file... and running the hostname command within the container returns the fqdn. If I run "hostnamectl set-hostname {fqdn}" inside of the container, that creates an /etc/hostname with the fqdn inside of it... but when I restart... if /etc/hostname exists, it gets overwritten with the host portion only... and the hostname command returns ony the short name. So... to avoid the problem, don't have an /etc/hostname... but ideally the script you mentioned that is provided by vzctl should be fixed.
File a bug if one does not exist already.
TYL,
--
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]
More information about the Users
mailing list