Bug 33839 - provide possibility to update system in Appliance Mode
provide possibility to update system in Appliance Mode
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: System setup
UCS 3.2
Other Linux
: P5 enhancement (vote)
: UCS 4.0
Assigned To: Dirk Wiesenthal
Florian Best
: interim-3
: 25592 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-03 16:22 CET by Michel Smidt
Modified: 2014-11-26 06:56 CET (History)
3 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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Smidt 2014-01-03 16:22:56 CET
Steps like in #33582.
Installed DC Master ((81) [UCS: 3.2-0 amd64 - generic] via ucs-kt-get
) in Appliance Mode and run updates.
Joining during System Setup of Member-Server fails.

/var/log/univention/join.log:
Configure 35univention-management-console-module-appcenter.inst Fri Jan  3 14:03:22 CET 2014
[...]
Object exists: cn=ldapschema,cn=univention,dc=host,dc=com
ERROR: Registered package version 3.0.50-16.229.201312021426 is newer, refusing registration.

Workaround:
"Ungejoint Fortfahren" -> After restart connect to UMC -> Update packages in "Modul Software-Aktualisierung" -> Restart -> In Modul "Domänenbeitritt" execute "Alle ausstehenden Join-Skripte ausführen"

Idea:
The possibility to choose "Update system after installation" during Appliance Mode just like in Installation overview (http://docs.univention.de/manual-3.2.html#installation:overview) during Appliance Mode
Comment 1 Stefan Gohmann univentionstaff 2014-01-07 11:18:40 CET
(In reply to Michel Smidt from comment #0)
> Steps like in #33582.
> Installed DC Master ((81) [UCS: 3.2-0 amd64 - generic] via ucs-kt-get
> ) in Appliance Mode and run updates.
> Joining during System Setup of Member-Server fails.

That should always be possible and is the real problem. We will fix it with Bug #33582.

I think an additional update button makes the interface more complicated.
Comment 2 Ingo Steuwer univentionstaff 2014-01-07 12:05:36 CET
(In reply to Stefan Gohmann from comment #1)
> I think an additional update button makes the interface more complicated.

The idea here was to provide the same functionality like durin installation, where the system installs available updates automatically. I think this should also be possible in the appliance mode, i.e. in EC2 or Vmware images.
Comment 3 Stefan Gohmann univentionstaff 2014-01-07 12:13:21 CET
(In reply to Ingo Steuwer from comment #2)
> (In reply to Stefan Gohmann from comment #1)
> > I think an additional update button makes the interface more complicated.
> 
> The idea here was to provide the same functionality like durin installation,
> where the system installs available updates automatically. I think this
> should also be possible in the appliance mode, i.e. in EC2 or Vmware images.

OK, that is like Bug #25592.

But that would not solve the original problem because the upgrade will be done after the setup was done. Upgrade the system before the installation would highly increase the test effort.
Comment 4 Ingo Steuwer univentionstaff 2014-01-07 13:24:45 CET
(In reply to Stefan Gohmann from comment #3)
> (In reply to Ingo Steuwer from comment #2)
> > (In reply to Stefan Gohmann from comment #1)
> > > I think an additional update button makes the interface more complicated.
> > 
> > The idea here was to provide the same functionality like durin installation,
> > where the system installs available updates automatically. I think this
> > should also be possible in the appliance mode, i.e. in EC2 or Vmware images.
> 
> OK, that is like Bug #25592.
> 
> But that would not solve the original problem because the upgrade will be
> done after the setup was done. Upgrade the system before the installation
> would highly increase the test effort.

That's true; feel free to close this as duplicate of Bug #25592 or vice versa.
Comment 5 Stefan Gohmann univentionstaff 2014-01-07 13:26:20 CET
*** Bug 25592 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Gohmann univentionstaff 2014-08-25 15:35:29 CEST
I think we should update by default. It should be possible to disable the update by setting a profile variable.
Comment 7 Stefan Gohmann univentionstaff 2014-08-27 10:46:00 CEST
The UCS 3.2 script is here:
  ucs-3.2-3/base/univention-installer/scripts/90_upgrade.sh
Comment 8 Dirk Wiesenthal univentionstaff 2014-09-02 10:56:32 CEST
Added a checkbox in
  univention-system-setup 8.0.35-2.661.201409021041

Does univention-upgrade. As this command does not give useful output, I just write "This might take a while depending on the number of pending updates."

I would have to somehow fork and tail -f /var/log/univention/updater.log which is too much of a hassle at the moment.
Comment 9 Stefan Gohmann univentionstaff 2014-09-03 06:42:05 CEST
The text "Alle für UCS 4.0 verfügbaren Aktualisierungen nach der Einrichtung installieren" sound a little bit complicated. The old installer used "System nach der Installation aktualisieren". Maybe you could use the old variant or something similar.
Comment 10 Dirk Wiesenthal univentionstaff 2014-09-03 12:20:56 CEST
Fixed wording
Comment 11 Florian Best univentionstaff 2014-09-05 12:30:08 CEST
OK: Wording
~OK~: progress state is currently also buggy (See also Bug #35715)
REOPEN: The univention-ssh calls can be combined into 1 call.
REOPEN: If univention-ssh fails univention-upgrade is called with --updateto=-.
(REOPEN: no error log output, e.g. stderr of univention-ssh)
REOPEN: exit code is always 0 even if update fails.
OK: unjoined slave systems will only update to patchlevel 0 (probably due to problems in the past).
~OK/REOPEN: The variable content must be "True", should we allow 'yes', 'on' etc. like UCR? or lowercase? (When writing profile by hand this should behave like other vars).
Comment 12 Stefan Gohmann univentionstaff 2014-09-22 07:34:17 CEST
The upgrade should be started after the system has been joined. On a DC master it looks like the system was upgraded before the join scripts were executed.
Comment 13 Dirk Wiesenthal univentionstaff 2014-10-17 10:03:48 CEST
(In reply to Florian Best from comment #11)
> REOPEN: The univention-ssh calls can be combined into 1 call.

Done

> REOPEN: If univention-ssh fails univention-upgrade is called with
> --updateto=-.

Done

> (REOPEN: no error log output, e.g. stderr of univention-ssh)

Done

> REOPEN: exit code is always 0 even if update fails.

Not done.
  1) It seems the exit code is not evaluated => Not important.
  2) If it is evaluated in some point in the future (run-parts --exit-on-failure) I would recommend to not return 1 either.
  3) If univention-upgrade fails there is little we can do about it. Re-running will probably result in the very same error. The user will have to use the Software Update module or (more likely) will have to use the command line to fix things.
Feel free to REOPEN if you do not agree.

> ~OK/REOPEN: The variable content must be "True", should we allow 'yes', 'on'
> etc. like UCR? or lowercase? (When writing profile by hand this should
> behave like other vars).

Done
Comment 14 Stefan Gohmann univentionstaff 2014-10-19 19:52:48 CEST
Move all unfinished MS1 and MS2 bugs to RC.
Comment 15 Florian Best univentionstaff 2014-10-20 13:28:12 CEST
(In reply to Dirk Wiesenthal from comment #13)
> (In reply to Florian Best from comment #11)
> > REOPEN: The univention-ssh calls can be combined into 1 call.
> 
> Done
OK

> > REOPEN: If univention-ssh fails univention-upgrade is called with
> > --updateto=-.
> 
> Done
OK

> > (REOPEN: no error log output, e.g. stderr of univention-ssh)
> 
> Done
REOPEN:
############################################################
=== 90_postjoin/20upgrade (2014-10-03 13:16:01) ===
__NAME__:90_postjoin/20upgrade Aktualisiere das System
__MSG__:Abhängig von der Anzahl der austehenden Updates, kann dies einige Zeit dauern.
WARNING: Getting version from DC Master failed! Running normal upgrade: univention-upgrade --noninteractive --updateto 4.0-0

Starting univention-upgrade. Current UCS version is 4.0-0 errata0
#############################################################
→ still no log output, maybe 2>&1 instead of 2>>/var/log/univention/setup.log?
→ please add full path to univention-ssh call (/usr/sbin)

> > REOPEN: exit code is always 0 even if update fails.
> 
> Not done.
>   1) It seems the exit code is not evaluated => Not important.
>   2) If it is evaluated in some point in the future (run-parts
> --exit-on-failure) I would recommend to not return 1 either.
>   3) If univention-upgrade fails there is little we can do about it.
> Re-running will probably result in the very same error. The user will have
> to use the Software Update module or (more likely) will have to use the
> command line to fix things.
> Feel free to REOPEN if you do not agree.
OK

> > ~OK/REOPEN: The variable content must be "True", should we allow 'yes', 'on'
> > etc. like UCR? or lowercase? (When writing profile by hand this should
> > behave like other vars).
> 
> Done
OK
Comment 16 Dirk Wiesenthal univentionstaff 2014-10-22 09:31:47 CEST
Could not reproduce the PATH problem. Added absolute paths anyway. stderr output changed.
Comment 17 Florian Best univentionstaff 2014-11-04 11:13:46 CET
DC Master: OK

A slave always fails:
__NAME__:90_postjoin/20upgrade Aktualisiere das System
__MSG__:Abhängig von der Anzahl der austehenden Updates, kann dies einige Zeit dauern.
E: unknown action "repository/online=yes", see --help
WARNING: Getting version from DC Master failed! Running normal upgrade: univention-upgrade --noninteractive --updateto 4.0-0
Comment 18 Florian Best univentionstaff 2014-11-04 11:31:01 CET
root@slave6:~# version=$(/usr/sbin/univention-ssh /etc/machine.secret $hostname\$@$ldap_server_name "echo $(/usr/sbin/ucr get version/version)-$(/usr/sbin/ucr get version/patchlevel)" 2>&1)
root@slave6:~# echo $?
0
root@slave6:~# echo "$version"
Warning: Permanently added 'slave6.ucs.dev,10.200.27.6' (RSA) to the list of known hosts.
Could not chdir to home directory /dev/null: Not a directory
4.0-0

→ I reverted the 2>&1 to 2>>/var/log/univention/setup.log
Comment 19 Florian Best univentionstaff 2014-11-04 12:50:36 CET
Well, still this error remains:

=== 90_postjoin/20upgrade (2014-11-04 12:45:49) ===
__NAME__:90_postjoin/20upgrade Aktualisiere das System
__MSG__:Abhängig von der Anzahl der austehenden Updates, kann dies einige Zeit dauern.
E: unknown action "repository/online=yes", see --help
WARNING: Getting version from DC Master failed! Running normal upgrade: univention-upgrade --noninteractive --updateto 4.0-0

Starting univention-upgrade. Current UCS version is 4.0-0 errata0
Comment 20 Dirk Wiesenthal univentionstaff 2014-11-04 13:11:06 CET
I fixed a typo in the script.
Comment 21 Florian Best univentionstaff 2014-11-04 16:22:54 CET
OK: typo
OK: the server tries now to connect to ldap/master instead of ldap/server/name.
Comment 22 Stefan Gohmann univentionstaff 2014-11-26 06:56:02 CET
UCS 4.0-0 has been released:
 http://docs.univention.de/release-notes-4.0-0-en.html
 http://docs.univention.de/release-notes-4.0-0-de.html

If this error occurs again, please use "Clone This Bug".