Bug 46278 - update to 4.3 with docker app fails
update to 4.3 with docker app fails
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Apache
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Dirk Wiesenthal
Felix Botner
: interim-2
: 40065 46106 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-13 11:58 CET by Felix Botner
Modified: 2018-03-14 14:37 CET (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
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 Felix Botner univentionstaff 2018-02-13 11:58:47 CET
see, http://jenkins.knut.univention.de:8080/job/UCS-4.3/job/UCS-4.3-0/job/Update%20Tests/test_system=update-from-4.0-5-with-horde/ws/test/updater.log/*view*/

/tmp/tmpjd_Bwj']' returned non-zero exit status 126
2018-02-12 15:54:57,198 ERROR:univention.appcenter.actions.upgrade-search:Command '['docker', 'exec', '42dd285061a58ff6a30ddbd179614bc274e0c1514dd69f7bbbaace0e452a1153', u'/usr/share/univention-docker-container-mode/update_available', '--app', u'horde', '--app_version', u'5.2.7-3', '--error_file', u'/var/univention/tmp/tmpjd_Bwj']' returned non-zero exit status 126
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 226, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/upgrade_search.py", line 60, in main
    upgrade_available = self._check_for_upgrades(app)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/docker_upgrade_search.py", line 50, in _check_for_upgrades
    output = self._execute_container_script(app, 'update_available', credentials=False, output=True)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/docker_base.py", line 154, in _execute_container_script
    return docker.execute_with_output(interface_file, *cmd_args, **cmd_kwargs)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/docker.py", line 293, in execute_with_output
    return execute_with_output(self.container, args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/docker.py", line 146, in execute_with_output
    return check_output(args)
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)

Update_available (in the container) fails after the update to 4.3 (maybe dockerd has to be restarted).


(1)

We need to catch CalledProcessError in _check_for_upgrades. I want to logs to look like

INFO:univention.appcenter.actions.upgrade-search:Executing interface update_available for horde
ERROR:...:update_available failed (126): stdout/stderr

(2)

We need to think about how to proceed if _check_for_upgrades. 

(3)

The appcenter should not log into the updater.log, something like

Checking for app updates (see appcenter.log)    done

is enough

(4)

add a logrotate snippent for /var/log/univention/appcenter.log, e.g.

-> more management/univention-directory-manager-modules/conffiles/etc/logrotate.d/univention-directory-manager 
@%@UCRWARNING=# @%@

@!@
import univention.lib.ucrLogrotate

name = "sync-memberuid"
settings = univention.lib.ucrLogrotate.getLogrotateConfig(name, configRegistry)
print "/var/log/univention/%s.log {" % name
for setting in settings.keys():
	print "\t%s" % settings[setting]
print "}"
Comment 1 Felix Botner univentionstaff 2018-02-13 11:59:29 CET
*** Bug 46106 has been marked as a duplicate of this bug. ***
Comment 2 Dirk Wiesenthal univentionstaff 2018-02-13 18:22:18 CET
Fixed in
  univention-appcenter 7.0.1-10A~4.3.0.201802131721

(1)

Output is printed out.

(2)

If the call fails, the operation does not abort. Instead, it behaves as if there was no upgrade found.

(3)

Done in
  univention-updater 13.0.1-15A~4.3.0.201802131723

We also fixed Bug#40065 with that.

(4)

Done in Bug#46274
Comment 3 Dirk Wiesenthal univentionstaff 2018-02-13 18:22:35 CET
*** Bug 40065 has been marked as a duplicate of this bug. ***
Comment 4 Felix Botner univentionstaff 2018-02-14 14:06:09 CET
(1)

OK, see http://jenkins.knut.univention.de:8080/job/UCS-4.3/job/UCS-4.3-0/job/Update%20Tests/test_system=update-from-4.0-5-with-horde/

(2)

OK, 

(3)

FAIL, i still see

Checking for app updates:                              2018-02-14 14:02:40,200 DEBUG:univention.appcenter.actions.upgrade-search:Calling upgrade-search
2018-02-14 14:02:40,201 DEBUG:univention.appcenter.actions.upgrade-search.progress:0
2018-02-14 14:02:40,202 DEBUG:univention.appcenter.actions.update:Calling update
2018-02-14 14:02:40,202 DEBUG:univention.appcenter.actions.update.progress:0
2018-02-14 14:02:40,206 INFO:univention.appcenter.actions.update:Downloading "https://appcenter.software-univention.de/meta-inf/categories.ini"...
2018-02-14 14:02:40,322 DEBUG:univention.appcenter.actions.update:  ... Not Modified
2018-02-14 14:02:40,325 INFO:univention.appcenter.actions.update:Downloading "https://appcenter.software-univention.de/meta-inf/rating.ini"...
2018-02-14 14:02:40,436 DEBUG:univention.appcenter.actions.update:  ... Not Modified
2018-02-14 14:02:40,439 INFO:univention.appcenter.actions.update:Downloading "https://appcenter.software-univention.de/meta-inf/license_types.ini"...
2018-02-14 14:02:40,550 DEBUG:univention.appcenter.actions.update:  ... Not Modified
2018-02-14 14:02:40,553 INFO:univention.appcenter.actions.update:Downloading "https://appcenter.software-univention.de/meta-inf/ucs.ini"...
2018-02-14 14:02:40,665 DEBUG:univention.appcenter.actions.update:  ... Not Modified
2018-02-14 14:02:40,668 INFO:univention.appcenter.actions.update:Downloading "https://appcenter.software-univention.de/meta-inf/4.3/index.json.gz"...
2018-02-14 14:02:40,778 DEBUG:univention.appcenter.actions.update:  ... Not Modified
2018-02-14 14:02:40,781 INFO:univention.appcenter.actions.update:Downloading "https://appcenter.software-univention.de/meta-inf/4.3/index.json.gz.gpg"...
2018-02-14 14:02:40,891 DEBUG:univention.appcenter.actions.update:  ... Not Modified
2018-02-14 14:02:40,893 INFO:univention.appcenter.actions.update:Downloading "https://appcenter.software-univention.de/meta-inf/4.3/all.tar.gpg"...
2018-02-14 14:02:41,000 DEBUG:univention.appcenter.actions.update:  ... Not Modified
2018-02-14 14:02:41,003 INFO:univention.appcenter.actions.update:Downloading "https://appcenter.software-univention.de/meta-inf/4.2/index.json.gz"...

in the updater.log
Comment 5 Dirk Wiesenthal univentionstaff 2018-02-14 14:56:59 CET
Yes, sorry. The updater defined a logging.basicConfig, so removing the appcenter log handler was not enough. I have narrowed down the logging in univention-upgrade from the root logger to getLogger("updater"), which should be fine.
Comment 6 Felix Botner univentionstaff 2018-02-14 16:11:47 CET
now there is no logging in updater.log at all
Comment 7 Dirk Wiesenthal univentionstaff 2018-02-14 17:25:50 CET
Fixed
Comment 8 Felix Botner univentionstaff 2018-02-15 10:24:38 CET
OK
Comment 9 Stefan Gohmann univentionstaff 2018-03-14 14:37:39 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

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