You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now if I do systemctl restart cloud-init , /etc/hostname is getting changed.
$ cat /etc/hostname
ph3dev.local
And hostname command return fqdn instead of short name. Isn't it incorrect to have fqdn in /etc/hostname?
I have prefer_fqdn_over_hostname = True in photon.py
I changed frequency = PER_ONCE in cc_set_hostname.py and it doesn't modify /etc/hostname after that and this is how it was in cloud-init <= v22.1 and even in v22.1 we have prefer_fqdn_over_hostname set in photon.py but it doesn't modify /etc/hostname file.
I doubt that #1365 has introduced this change, not sure though.
If it helps, I see the follwing entries in cloud-init-22.1 logs:
2022-08-08 06:58:38,498 - stages.py[DEBUG]: Running module set_hostname (<module 'cloudinit.config.cc_set_hostname' from '/usr/lib/python3.7/site-packages/cloudinit/config/cc_set_hostname.py'>) with frequency once-per-instance
And in cloud-init-22.2:
2022-08-08 07:00:38,512 - modules.py[DEBUG]: Running module set_hostname (<module 'cloudinit.config.cc_set_hostname' from '/usr/lib/python3.7/site-packages/cloudinit/config/cc_set_hostname.py'>) with frequency always
The text was updated successfully, but these errors were encountered:
Launchpad user Brett Holman(holmanb) wrote on 2022-08-19T16:37:39.691491+00:00
This bug is believed to be fixed in cloud-init in version 22.3. If this is still a problem for you, please make a comment and set the state back to New
This bug was originally filed in Launchpad as LP: #1983811
Launchpad details
Launchpad user Shreenidhi Shedi(sshedi) wrote on 2022-08-08T07:08:17.420811+00:00
Hi All,
Environment details:
cloud-init-22.2
Photon OS 3.0 and above
I am seeing something weird after upgrading to cloud-init-22.2
My /etc/hosts looks like this:
$ cat /etc/hosts
127.0.1.1 ph3dev.local ph3dev
127.0.0.1 localhost
And my /etc/hostname
$ cat /etc/hostname
ph3dev
Now if I do systemctl restart cloud-init , /etc/hostname is getting changed.
$ cat /etc/hostname
ph3dev.local
And hostname command return fqdn instead of short name. Isn't it incorrect to have fqdn in /etc/hostname?
I have prefer_fqdn_over_hostname = True in photon.py
I changed frequency = PER_ONCE in cc_set_hostname.py and it doesn't modify /etc/hostname after that and this is how it was in cloud-init <= v22.1 and even in v22.1 we have prefer_fqdn_over_hostname set in photon.py but it doesn't modify /etc/hostname file.
I doubt that #1365 has introduced this change, not sure though.
We discussed a bit about this issue in #1365.
If it helps, I see the follwing entries in cloud-init-22.1 logs:
And in cloud-init-22.2:
The text was updated successfully, but these errors were encountered: