Bug 38617 - "No module named base" during UMC-Webserver postinst
"No module named base" during UMC-Webserver postinst
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Florian Best
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-28 14:58 CEST by Florian Best
Modified: 2015-05-28 16:45 CEST (History)
1 user (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
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-05-28 14:58:41 CEST
The update to the internal latest erratum update currently logs a traceback because a UMC-Webserver can't be stopped during prerm.
This does not break any functionality but logs a traceback.

umcv=7.1.63-16.858.201504091208
umcfv=4.1.106-60.1044.201504231500
apt-get install univention-management-console-server=$umcv python-univention-management-console=$umcv univention-management-console=$umcv univention-management-console-frontend=$umcfv univention-management-console-web-server=$umcfv
rm /usr/lib/pymodules/python2.7/univention/management/console/base.py* /usr/share/pyshared/univention/management/console/base.py*
univention-upgrade

→ updater.log contains:
Vorbereitung zum Ersetzen von univention-management-console-web-server 4.1.106-60.1044.201504231500 (durch 
.../univention-management-console-web-server_4.1.106-63.1050.201505201223_all.deb) ...
Stopping Univention Management Console Web Server.
Traceback (most recent call last):
  File "/usr/sbin/univention-management-console-web-server", line 55, in <module>
    import univention.management.console.protocol as umcp
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/__init__.py", line 187, in <mod
ule>
    from session import *
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session.py", line 73, in <modul
e>
    from ..base import Base, UMC_Error
ImportError: No module named base
done.

Triggering python-support in the preinst of python-univention-management-console should fix it.
Comment 1 Florian Best univentionstaff 2015-05-28 15:41:05 CEST
Discussed with Stefan+Alex:
Setting a pre-dependency in univention-management-console-web-server to python-univention-management-console-server should work.

https://www.debian.org/doc/debian-policy/ch-relationships.html (Pre-Depends).

I am currently building a package to test this.
Comment 2 Florian Best univentionstaff 2015-05-28 15:44:50 CEST
Btw. the prerm scripts are stopping services even if the package is only upgraded. Should we create a bug for changing that it is called only on package removal, too?

# Automatically added by dh_installinit
if [ -x "/etc/init.d/univention-management-console-web-server" ]; then
        invoke-rc.d univention-management-console-web-server stop || exit $?
fi
Comment 3 Janek Walkenhorst univentionstaff 2015-05-28 15:47:44 CEST
(In reply to Florian Best from comment #2)
> Btw. the prerm scripts are stopping services even if the package is only
> upgraded. Should we create a bug for changing that it is called only on
> package removal, too?
I think stopping and starting during upgrades makes sense, otherwise the daemon would still use the old code.
Also in general having the services stopped during upgrades can avoid problems due to the inconsistency of the filesystem when changing the files.
Comment 4 Florian Best univentionstaff 2015-05-28 15:53:06 CEST
YAML: 2015-05-28-univention-management-console-frontend.yaml
Fix: svn r60923
Comment 5 Dirk Wiesenthal univentionstaff 2015-05-28 16:22:44 CEST
Code: OK
YAML: OK
Behaviour: OK

I was unable to reproduce it on every machine, though...
Comment 6 Janek Walkenhorst univentionstaff 2015-05-28 16:45:25 CEST
<http://errata.univention.de/ucs/4.0/205.html>