Bug #39100
closedUbuntu Autoinstall (preseed cloud-init) does not apply `time-zone`
Description
Summary:
When provisioning Ubuntu using the "Preseed Autoinstall cloud-init user data" template, the `time-zone` value configured via Host Group Parameters or Host Parameters is not reflected in the installed system. The same `time-zone` parameter is correctly applied when provisioning via Kickstart templates.
We configure `time-zone` (e.g. `Asia/Tokyo`) either on:
- Host Group Parameters: Configure -> Host Groups -> <target group> -> Parameters tab
or - Host Parameters: Hosts -> All Hosts -> <target host> -> Parameters tab
During provisioning of Ubuntu (Autoinstall / cloud-init based), the installed OS timezone remains the default (e.g. `Etc/UTC`) or is not set as expected.
This appears to be because the Ubuntu Autoinstall user-data template does not consume the `time-zone` parameter. In contrast, Kickstart provisioning does apply the same parameter correctly in our environment.
Steps to Reproduce:
1. Set the timezone parameter in Foreman WebUI using either of the following:
- A) Host Group Parameter:
- Navigate to: Configure -> Host Groups -> <target group> -> Parameters tab
- Add parameter:
- Name: time-zone
- Value: Asia/Tokyo (or any valid timezone)
- B) Host Parameter:
- Navigate to: Hosts -> All Hosts -> <target host> -> Parameters tab
- Add parameter:
- Name: time-zone
- Value: Asia/Tokyo (or any valid timezone)
2. Create/select an Ubuntu host that provisions via Autoinstall (cloud-init user-data) and uses:
- Provisioning template: Preseed Autoinstall cloud-init user data
3. Start provisioning.
4. After installation completes, check the timezone on the provisioned host (e.g. `timedatectl`).
Actual Behavior:
The installed host does not reflect `time-zone` from Host Group / Host parameters (often remains `Etc/UTC` or a default).
Expected Behavior:
Ubuntu Autoinstall provisioning should apply `time-zone` from Host Group / Host parameters, similarly to Kickstart provisioning.
Updated by Ondřej Gajdušek 3 months ago
- Target version changed from 3.17.1 to 3.19.0
- Found in Releases 3.17.0 added
I'll need to push this out of 3.17.1, as today is the release day of 3.17.1. Let's see if someone picks it up in 3.19 development time window.
Updated by Yusuke Hirota 3 months ago
Thanks for the update, Ondřej.
Apologies — the 3.17.1 target version was set by mistake on my side.
I’ll work on a patch for develop (3.19) (likely in the autoinstall/cloud-init user-data template) and open a PR.
Updated by The Foreman Bot 3 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/10892 added
Updated by Anonymous 3 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|88563ef440145cd6faf015180b5504b19ebd1a20.