Bugzilla – Bug 4629
Cannot set timezone in automated installation
Last modified: 2009-03-19 09:44:13 UTC
You need to log in before you can comment on or make changes to this bug.
Created an attachment (id=772) [details] ai_combined_manifest.xml In automated installation, I used a manifest which specify the following line to set timezone to US/Mountain: <propval name="timezone" type="astring" value="US/Mountain"/> But after installation, the timezone is still the default value: PST (US/Pacific). I checked install_log and didn't find anything related to setting timezone. I also tried setting timzone value to Asia/Shanghai in manifest. The result is the same.
Created an attachment (id=773) [details] install_log
In LiveCD case, GUI takes care of setting timezone in following function: datetimezone-screen.c:datetimezone_set_system_clock(). Timezone is set on running system and changes are propagated to the target in /etc/default/init file. As different transfer mechanism is used for AI and we don't need to set timezone within AI environment, different mechanism will have to be implemented for AI - ICT seems to be the right place where we should take care of it. Should be release noted for 2008.11.
One of the reasons we set it immediately in the graphical installer is so that the installation logs will be in the "native" timezone, rather than whatever we happen to default the boot image to. I'd think the same reasoning would be applicable to automated installation.
It looks like orchestrator allows for setting the timezone via the OM_ATTR_TIMEZONE_INFO attribute. The GUI installer sets it and so does the automated installer. However, it turns out that this attribute is never looked up by the orchestrator let alone acted upon. Instead, out of band mechanisms are used to set the timezone. liborchestrator needs to be fixed to accomodate setting the timezone.
(In reply to comment #4) > It looks like orchestrator allows for setting the timezone via the > OM_ATTR_TIMEZONE_INFO attribute. The GUI installer sets it and so does the > automated installer. > > However, it turns out that this attribute is never looked up by the > orchestrator let alone acted upon. Instead, out of band mechanisms are used to > set the timezone. liborchestrator needs to be fixed to accomodate setting the > timezone. Orchestrator in om_perform_install() changed to call om_set_time_zone() when OM_ATTR_TIMEZONE_INFO attribute is set. Since time zone already set in GUI, removed setting of OM_ATTR_TIMEZONE_INFO attribute in GUI, so it will not be set in om_perform_install().
Fixed in changeset 446:aa40e990c57a
Should this be reopened as it appears the fix was backed out in changeset 447:749da9554f27?
Setting the timezone should be done in 3 places: 1) the local environment 2) the /etc/default/init of the running system 3) the /etc/default/init of the target system This was not being done correctly in the previous fix, and a SPARC regression was introduced (write to /etc/default/init was failing, since it is mounted read-only), so the fix was backed out. A workaround for this disables compression for the file: consequently, it is somehow writable. The code to perform this is in ai_sparc_image.xml 418: <base_include type="file" fiocompress="false">etc/default/init</base_include> om_set_time_zone() seems to accomplish 1) and 2). and set_timezone() should be able to accomplish 3) (although I have as yet not been able to locate this code - it is in libadmutil.so). Reopening and setting 2009.1H milestone.
Pushed in changeset 477:04c667d64a87 along with bug 5554 Cannot specify hostname in automated installation, it is always opensolaris