locale language not installed after first boot 22.04.1 LTS

Bug #1988768 reported by Jan-Philipp Jürgens
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
New User Experience Team
New
Undecided
Unassigned
Ubuntu Translations
New
Undecided
Unassigned
cloud-init
Incomplete
Undecided
Unassigned
subiquity
New
Undecided
Unassigned

Bug Description

using the 'locale: de_DE' cloud-init user-data option results in an ubuntu installation displaying en_US on first boot login screen. When checking the region and language options in the UI login screen is set to 'German' but when checking the above selection for languages no languages are installed with the system. Keyboard layout 'de nodeadkeys' was set and active as expected.

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

tried to add info via apport-collect but it only said that no additional info was collected

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

Might also affect task 'ubuntu-desktop-minimal^'

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :
Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

using localectl in curtin via sudo did not work as workaround

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

locale are generated about 10min after the first boot of the installed OS. Either locale generation is moved closer to the installation reboot, so a fluent switch from autoinstall to user interaction can take place w/o locale shenanigans, or graphical login is denied until the first boot commands of cloud init have been finished. Anything else close to the current way is a hook for confusion.

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

seems like I am unable to find the team on launchpad, that is responsible for piecing together first boot init and locale generation, would be nice if someone kind could add them to this report.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

"de_DE" is the name of the German latin1 locale. The German UTF-8 locale, which you probably want to use, is named "de_DE.UTF-8". Don't know if that has anything to do with it.

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

Thanks a lot Gunnar, last time I tried the installer (which was at ticket creation) I think my user-data did include 'locale: de_DE.UTF-8' but I am not 100% certain so I will try it out again tomorrow morning. I will also try localectl with your string.

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

Must have already been in either autoinstall or cloud-config. Same behavior.

Revision history for this message
Chad Smith (chad.smith) wrote :

On the affected machine exhibiting this problem, please run `sudo cloud-init collect-logs` and attach the tarfile of config artifacts and logs to this bug. It will help us see what cloud-init thinks it is setting up on the installed system. Note that the tarfile may contain sensitive information if you include user-data (which would have the primary user password if provided via your autoinstall.

Additionally from subiquity(the installer) standpoint, it may be helpful to `tar -cvf installer-logs.tar /var/log/installer`

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

Hi Chad, I will do so once I have my user_data back in a working state.

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote (last edit ):

will collect-logs also show the primary user password if I used a $6$-hashed one in my cloud-config?

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote (last edit ):

#10 I searched through the files and it seems non of them include any hashed or unhashed variant of my PW so here you go.
edit: These are form a freshly autoinstalled system about an hour old.

Revision history for this message
Alberto Contreras (aciba) wrote :

By cloud-init's logs the locale is correctly set to de_DE.UTF-8 in /etc/default/locale. Further investigation is required to determine what's happening.

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

Is there anything further I can do to help this?

Revision history for this message
James Falcon (falcojr) wrote :

"using the 'locale: de_DE' cloud-init user-data option"
Did you use locale as an autoinstall key, or under a `user-data:` section?

Are you able to post the entire config you used (minus any redactions)?

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

Both, as I tried a user data entry to fix it, but it did not help. In autoinstall I used the appropriate keys listed in the Ubuntu autoinstall reference. One configuring the locale via de_DE.UTF-8 the other one to configure the keymap as de variant nodeadkeys. The result adding a Curtin hook in user data executing localectl did not help with and without the outcome is the same as the examples above. Would you like to see a cloud-config example of my file stripped of off all private information?

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

I can also upload a compress tar including the qcow image of an installation with the shown behaviour. I would remove any private information for that install tho.

Revision history for this message
Alberto Contreras (aciba) wrote :

I did test cloud-init in isolation (without subiquity) with the following config:

#cloud-config
locale: de_DE

and the locale was correctly set in /etc/default/locale but did not take effect yet. I think this is expected behavior from cloud-init as a locale change cannot take effect in already running processes.

I repeated the test, forcing a reboot, with:

#cloud-config
locale: de_DE
power_state:
    mode: reboot

and the locale took effect.

Could you, Jan, try with the following subiquity config?

#cloud-config
autoinstall:
  user-data:
    locale: de_DE
    power_state:
      mode: reboot

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

Will do once home o7

Revision history for this message
Brett Holman (holmanb) wrote :

@seemax1991 - Any updates?

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

I will do this as soon as possible. I am currently down with flu, stomach cramps and all the funny bunch that comes along with that. Might take a week until I am okay again. One question für the mean time: when using the user-data: part I am starting to talk to cloud-init directly bypassing subiquity right?

Revision history for this message
Alberto Contreras (aciba) wrote :

The [autoinstall.user-data](https://ubuntu.com/server/docs/install/autoinstall-reference#user-data) section will be handed over to the installed target to be executed at boot time.

The config that I suggested is kind of a workaround to confirm cloud-init correctly sets the locale, but I think [autoinstall.locale](https://ubuntu.com/server/docs/install/autoinstall-reference#locale) should set it up correctly. So a config like:

#cloud-config
autoinstall:
  locale: de_DE

should also work, but maybe a reboot is also required to refresh the locale related env-var and processes consuming them by:

#cloud-config
autoinstall:
  locale: de_DE
  user-data:
    power_state:
      mode: reboot

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

I will test both by Friday this week.

Revision history for this message
Chad Smith (chad.smith) wrote :

Please mark cloud-init back to New bug status once updated report is available. That'll ensure we get eyes on it.

Changed in cloud-init:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers