Bug 38382 - Unconfigured system when using the text based installer
Unconfigured system when using the text based installer
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Setup wizard
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Drees Dormann
Alexander Kläser
:
Depends on:
Blocks: 38539 42402
  Show dependency treegraph
 
Reported: 2015-04-28 16:48 CEST by Alexander Kläser
Modified: 2016-09-15 12:30 CEST (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback, Troubleshooting
Max CVSS v3 score:


Attachments
Screenshot of join error (72.20 KB, image/png)
2015-05-11 11:29 CEST, Alexander Kläser
Details
/var/log/univention/system-setup-boot.log (440.98 KB, text/plain)
2015-05-11 11:30 CEST, Alexander Kläser
Details
/var/log/univention/config-registry.replog (24.58 KB, text/plain)
2015-05-11 11:30 CEST, Alexander Kläser
Details
/var/log/univention/setup.log (39.90 KB, text/plain)
2015-05-11 11:31 CEST, Alexander Kläser
Details
/var/log/installer/syslog (415.61 KB, text/plain)
2015-05-11 11:31 CEST, Alexander Kläser
Details
member system-setup-boot.log (343.70 KB, text/plain)
2015-05-12 12:05 CEST, Alexander Kramer
Details
member setup.log (27.42 KB, text/plain)
2015-05-12 12:05 CEST, Alexander Kramer
Details
member syslog (446.70 KB, text/plain)
2015-05-12 12:05 CEST, Alexander Kramer
Details
member system-setup-boot.log (343.70 KB, text/plain)
2015-05-12 12:06 CEST, Alexander Kramer
Details
More debug info (9.83 KB, text/plain)
2015-06-22 13:36 CEST, Drees Dormann
Details
Env Variables during setup-join.sh (806 bytes, text/plain)
2015-06-22 14:05 CEST, Drees Dormann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2015-04-28 16:48:40 CEST
[Ticket#2015042421000452]

A tester reported that he ended up with an unconfigured UCS system. In the setup.log file, it can be seen that apt could not access the DVD drive anymore. Consequently, 05_role/10role is not able to successfully install the corresponding UCS packages as apt-get seg-faults.

-------------------- 8< -------------------- 
File: /etc/ntp.conf
__MSG__:0% [Working]
__MSG__:0% [Connecting to updates.software-univention.de]
__MSG__:0% [Connecting to updates.software-univention.de (176.9.114.147)]
__MSG__:0% [Waiting for headers]
__MSG__:Get:1  
http://updates.software-univention.de/4.0/maintained/component/  
4.0-1-errata/amd64/ ldap-utils 2.4.40-1.184.201503171335 [334 kB]
__MSG__:0% [1 ldap-utils 5,474 B/334 kB 1%]
__MSG__:Media change: please insert the disc labeled
  'UCS GNU/Linux 4.0-1 _Ucs401_ - Official Release amd64 DVD Binary-1  
20150209-14:37'
in the drive '/media/cdrom/' and press enter
Error in function media_change
Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/apt/progress/text.py", line  
217, in media_change
     return raw_input() not in ('c', 'C')
EOFError: EOF when reading a line
/usr/lib/univention-system-setup/scripts/setup-join.sh: line 73:  6439  
Segmentation fault      
/usr/lib/univention-system-setup/scripts/05_role/10role
-------------------- 8< -------------------- 

It is not clear which exactly was the cause for this behaviour, maybe the DVD was removed before the setup wizard was executed?
Comment 1 Alexander Kläser univentionstaff 2015-04-29 09:39:48 CEST
The user reported that he ran the installation with the ISO image on a USB stick. The USB stick was apparently _not_ removed.
Comment 2 Alexander Kläser univentionstaff 2015-04-29 11:21:07 CEST
The log files show that both, the USB/DVD repository as well as the online repositories are enabled. I cannot reproduce the error, an installation from USB stick was fine. Even when I activate the online repository before starting the setup wizard, the installation is fine.

I can force the traceback via the following command:

> echo -n  | python -c 'import apt.progress.text as a; a.AcquireProgress().media_change("", "");'

Another option would be to catch the EOFError in python-apt:

--- /usr/share/pyshared/apt/progress/text.py.orig       2015-04-29 11:18:01.064024710 +0200
+++ /usr/share/pyshared/apt/progress/text.py    2015-04-29 11:19:51.204026617 +0200
@@ -211,10 +211,14 @@
     def media_change(self, medium, drive):
         """Prompt the user to change the inserted removable media."""
         base.AcquireProgress.media_change(self, medium, drive)
-        self._write(_("Media change: please insert the disc labeled\n"
-                      " '%s'\n"
-                      "in the drive '%s' and press enter\n") % (medium, drive))
-        return raw_input() not in ('c', 'C')
+        try:
+            self._write(_("Media change: please insert the disc labeled\n"
+                          " '%s'\n"
+                          "in the drive '%s' and press enter\n") % (medium, drive))
+            return raw_input() not in ('c', 'C')
+        except EOFError as e:
+            pass
+        return False
 
     def stop(self):
         """Invoked when the Acquire process stops running."""
Comment 3 Alexander Kläser univentionstaff 2015-05-08 18:23:07 CEST
(In reply to Alexander Kläser from comment #0)
> [...]
> It is not clear which exactly was the cause for this behaviour, maybe the
> DVD was removed before the setup wizard was executed?

I could reproduce the error via installation with the text based installer.
Comment 4 Alexander Kläser univentionstaff 2015-05-11 11:29:54 CEST
Created attachment 6888 [details]
Screenshot of join error

On an internal system, the installation procedure failed when choosing the text based debian installer in the advanced section of the bootloader.
Comment 5 Alexander Kläser univentionstaff 2015-05-11 11:30:30 CEST
Created attachment 6889 [details]
/var/log/univention/system-setup-boot.log
Comment 6 Alexander Kläser univentionstaff 2015-05-11 11:30:51 CEST
Created attachment 6890 [details]
/var/log/univention/config-registry.replog
Comment 7 Alexander Kläser univentionstaff 2015-05-11 11:31:04 CEST
Created attachment 6891 [details]
/var/log/univention/setup.log
Comment 8 Alexander Kläser univentionstaff 2015-05-11 11:31:22 CEST
Created attachment 6892 [details]
/var/log/installer/syslog
Comment 9 Alexander Kläser univentionstaff 2015-05-11 22:53:14 CEST
From the log files and some more tests that I carried out, it seems that the script startxwithfirefox is not executed when using the text installer. Bug 36968 introduced changes to fix this behaviour, however, on the latest 4.0-2 DVD (and presumably on a 4.0-1 DVD) the package di-univention-system-setup has been in a version prior to this change.
Comment 10 Alexander Kramer univentionstaff 2015-05-12 11:56:11 CEST
I reproduced this error with the current 4.0-2 DVD:
ucs_4.0-2-20150512-081431-dvd-amd64.iso

1) advanced options
2) textmode
3) english
4) english gb
--> after the reboot you will get bug #38512

5) switched the lang from eng gb to gb and used bremen as my city of choice
--> this will set the keyboard and locales to de_DE

6) joined the domain as member
7) picked no software
8) deselected updates

at the end i got the same error, see Screenshot join error


additional infos:
- i used dhcp for the network
- and i was able to reproduce this bug with role slave
Comment 11 Alexander Kramer univentionstaff 2015-05-12 12:05:03 CEST
Created attachment 6894 [details]
member system-setup-boot.log
Comment 12 Alexander Kramer univentionstaff 2015-05-12 12:05:23 CEST
Created attachment 6895 [details]
member setup.log
Comment 13 Alexander Kramer univentionstaff 2015-05-12 12:05:40 CEST
Created attachment 6896 [details]
member syslog
Comment 14 Alexander Kramer univentionstaff 2015-05-12 12:06:13 CEST
Created attachment 6897 [details]
member system-setup-boot.log
Comment 15 Alexander Kläser univentionstaff 2015-05-12 14:25:35 CEST
On (In reply to Alexander Kramer from comment #10)
> I reproduced this error with the current 4.0-2 DVD:
> ucs_4.0-2-20150512-081431-dvd-amd64.iso
> [...]

Thanks! I spotted the following message in /var/log/univention/management-console-module-setup.log:

> Locale en_US.UTF-8 is not supported, using fallback locale "C" instead.

I.e., this error case is handled correctly in the module process itself. AFAIS, we have the following options for a patch:

* Make sure that the error due to the incorrect locale is correctly caught in the method setup_i18n()

* Call the scripts 20_language/* at the beginning of setup-join.sh.

(In reply to Alexander Kläser from comment #0)
> [Ticket#2015042421000452]
> 
> A tester reported that he ended up with an unconfigured UCS system. In the
> setup.log file, it can be seen that apt could not access the DVD drive
> anymore. Consequently, 05_role/10role is not able to successfully install
> the corresponding UCS packages as apt-get seg-faults.
> 
> -------------------- 8< -------------------- 
> File: /etc/ntp.conf
> __MSG__:0% [Working]
> __MSG__:0% [Connecting to updates.software-univention.de]
> __MSG__:0% [Connecting to updates.software-univention.de (176.9.114.147)]
> __MSG__:0% [Waiting for headers]
> __MSG__:Get:1  
> http://updates.software-univention.de/4.0/maintained/component/  
> 4.0-1-errata/amd64/ ldap-utils 2.4.40-1.184.201503171335 [334 kB]
> __MSG__:0% [1 ldap-utils 5,474 B/334 kB 1%]
> __MSG__:Media change: please insert the disc labeled
>   'UCS GNU/Linux 4.0-1 _Ucs401_ - Official Release amd64 DVD Binary-1  
> 20150209-14:37'
> in the drive '/media/cdrom/' and press enter
> Error in function media_change
> Traceback (most recent call last):
>    File "/usr/lib/python2.7/dist-packages/apt/progress/text.py", line  
> 217, in media_change
>      return raw_input() not in ('c', 'C')
> EOFError: EOF when reading a line
> /usr/lib/univention-system-setup/scripts/setup-join.sh: line 73:  6439  
> Segmentation fault      
> /usr/lib/univention-system-setup/scripts/05_role/10role
> -------------------- 8< -------------------- 

I would not expect that this error will occur again, as /etc/apt/sources.list will be cleared with the call to startxwithfirefox (search for 'startxwithfirefox has been started' in attachment 6896 [details]).
Comment 16 Drees Dormann univentionstaff 2015-06-22 13:36:29 CEST
Created attachment 6976 [details]
More debug info

Part of the problem migth be that LC_ALL is unset during install. I attached a excerpt of the enviroment variables that are set while system-setup-boot is active
Comment 17 Drees Dormann univentionstaff 2015-06-22 14:05:49 CEST
Created attachment 6977 [details]
Env Variables during setup-join.sh

These are the enviroment variables during execution of setup-join.sh
Comment 18 Drees Dormann univentionstaff 2015-06-22 14:08:16 CEST
The generating of the locales has been moved to teh start of setup-join.sh to fix  the problem of the system beeing unconfigured after univention-system-setup.
(r61393)
Comment 19 Alexander Kläser univentionstaff 2015-06-22 14:13:35 CEST
(In reply to Drees Dormann from comment #17)
> Created attachment 6977 [details]
> Env Variables during setup-join.sh
> 
> These are the enviroment variables during execution of setup-join.sh

LANG=C → that might cause some problems.
Comment 20 Alexander Kläser univentionstaff 2015-07-02 14:42:33 CEST
(In reply to Alexander Kramer from comment #10)
> I reproduced this error with the current 4.0-2 DVD:
> ucs_4.0-2-20150512-081431-dvd-amd64.iso

I could reproduce the error, as well...

> 1) advanced options
> 2) textmode
> 3) english
> 4) english gb
> --> after the reboot you will get bug #38512
> 
> 5) switched the lang from eng gb to gb and used bremen as my city of choice
> --> this will set the keyboard and locales to de_DE

Correction: Switch language drop box from en-gb to en(-us) and search for Bremen.

> 6) joined the domain as member
> 7) picked no software
> 8) deselected updates
> 
> at the end i got the same error, see Screenshot join error

With the new order, the setup process seems to work fine in my tests.

→ VERIFIED
Comment 21 Alexander Kläser univentionstaff 2015-07-02 14:44:51 CEST
YAML files is fine, as well.
Comment 22 Janek Walkenhorst univentionstaff 2015-07-03 14:11:34 CEST
<http://errata.univention.de/ucs/4.0/220.html>