I think the bug is here in cloudinit/distros/__init__.py:
def set_etc_timezone(tz, tz_file=None, tz_conf="/etc/timezone", tz_local="/etc/localtime"):
util.write_file(tz_conf, str(tz).rstrip() + "\n")
# This ensures that the correct tz will be used for the system
if tz_local and tz_file: util.copy(tz_file, tz_local)
return
/etc/localtime ought to be a symlink to the selected file in /usr/share/zoneinfo/, not a copy (it used to in the past due to the possibility of /usr/ being on a separate file system, but that got fixed by initramfs-tools in a better way now). So with the copy() the symlink doesn't get updated, and instead it clobbers the file in /usr/.
I think the bug is here in cloudinit/ distros/ __init_ _.py:
def set_etc_ timezone( tz, tz_file=None, tz_conf= "/etc/timezone" ,
tz_local= "/etc/localtime "): write_file( tz_conf, str(tz).rstrip() + "\n")
util.copy( tz_file, tz_local)
util.
# This ensures that the correct tz will be used for the system
if tz_local and tz_file:
return
/etc/localtime ought to be a symlink to the selected file in /usr/share/ zoneinfo/ , not a copy (it used to in the past due to the possibility of /usr/ being on a separate file system, but that got fixed by initramfs-tools in a better way now). So with the copy() the symlink doesn't get updated, and instead it clobbers the file in /usr/.