Univention Bugzilla – Full Text Bug Listing |
Summary: | univention-self-service-master: No such package | ||
---|---|---|---|
Product: | UCS | Reporter: | Florian Best <best> |
Component: | System setup | Assignee: | Florian Best <best> |
Status: | CLOSED FIXED | QA Contact: | Felix Botner <botner> |
Severity: | normal | ||
Priority: | P5 | CC: | damrose, thorp-hansen, troeder |
Version: | UCS 4.2 | ||
Target Milestone: | UCS 4.2-3-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: | https://forge.univention.org/bugzilla/show_bug.cgi?id=44284 | ||
What kind of report is it?: | Bug Report | What type of bug is this?: | 6: Setup Problem: Issue for the setup process |
Who will be affected by this bug?: | 1: Will affect a very few installed domains | How will those affected feel about the bug?: | 3: A User would likely not purchase the product |
User Pain: | 0.103 | Enterprise Customer affected?: | |
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2017040321000372, 2017043021000151, 2017050121000356, 2017051721000326, 2017082521000314 | Bug group (optional): | External feedback |
Max CVSS v3 score: |
Description
Florian Best
2017-04-18 12:50:02 CEST
NEEDMOREINFO: Which installation medium was used (DVD, appliance, AWS instance)? I don't know. She didn't say. Duplicate of Bug #44284 ? (In reply to Florian Best from comment #3) > Duplicate of Bug #44284 ? It could be, but there may be another issue. To be a duplicate, the installation had to be done by an appliance the user created herself - thus the inquiry for the installation medium. Our appliances and AWS instances received separate fixes. I got this error yesterday while creating a 4.2 instance via "ucs-kt-get" on spoka. I wanted to install S4 and Self Service right at the installation and had to uncheck Self Service eventually because of the error. Afterwards, the Self Service UMC module was installed but not the server. I was able to "re"install the Self Service via the app-center. After that everything worked fine AFAIS. machine: 10.200.6.150 I just installed from a 4.2 DVD (/mnt/omar/vmwares/iso-images/ucs/4.2-0/UCS_4.2-0-amd64.iso) and univention-self-service-master was installed. So the fix is on the DVD. But when using it, I got an exception: ============================================================================= Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 178, in _recv self.handle(msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 178, in _recv self.handle(msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 290, in handle self.__handler.init() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 212, in init self.db = TokenDB(MODULE) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 53, in __init__ self.conn = self.open_db() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 120, in open_db db_name=DB_NAME, db_user=DB_USER, db_pw=password)) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: The initialization of the module failed: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 178, in _recv self.handle(msg) File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 290, in handle self.__handler.init() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 212, in init self.db = TokenDB(MODULE) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 53, in __init__ self.conn = self.open_db() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 120, in open_db db_name=DB_NAME, db_user=DB_USER, db_pw=password)) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: FATAL: Passwort-Authentifizierung für Benutzer »selfservice« fehlgeschlagen FATAL: Passwort-Authentifizierung für Benutzer »selfservice« fehlgeschlagen ============================================================================= The problem is, that the DB creation code in univention-self-service-passwordreset-umc.postinst didn't run: if [ "$1" = "configure" -a -z "$2" ] ; then echo "Fresh installation..." su - postgres -c "echo \"CREATE ROLE selfservice WITH LOGIN;\" | psql" su - postgres -c "createdb selfservice -E UTF8 -O selfservice -T template0" fi So no database was created in PostgreSQL. The code after that did run however, creating the password file. I can only assume it has to do with the way system-setup works. Closing this bug, as it's fixed with Bug #44284. Cloning a new one for the setup problem. 4.2-0 errata0 (Lesum) Version: 4.2-0 errata0 (Lesum) Version: 4.2-0 errata15 (Lesum) Remark: Konfiguration eines DC Masters im Appliance Mode mit Auswahl des Self Service, basierend auf unserer internen Test-Appliance (ucs-kt-get auf krus) → Please at least fix our test instance if it is no product error. Version: 4.2-1 errata144 (Lesum) Remark: Self-Service bei der Installation ausgewaehlt, im Folgenden trat dieser Fehler auf. (In reply to Daniel Tröder from comment #7) > The problem is, that the DB creation code in > univention-self-service-passwordreset-umc.postinst didn't run: > > if [ "$1" = "configure" -a -z "$2" ] ; then > echo "Fresh installation..." > su - postgres -c "echo \"CREATE ROLE selfservice WITH LOGIN;\" | psql" > su - postgres -c "createdb selfservice -E UTF8 -O selfservice -T template0" > fi > > So no database was created in PostgreSQL. > The code after that did run however, creating the password file. > > I can only assume it has to do with the way system-setup works. 1. What happens if postgres is down during the postinst? I think one of the commands causes an error. After another package upgrade -z "$2" will not fit anymore and the DB creation is never called again. 2. Why are these commands not part of the joinscript? Can't we move them to the joinscript? (In reply to Florian Best from comment #12) > 2. Why are these commands not part of the joinscript? Can't we move them to > the joinscript? Yes - absolutely. In the join script for the ucs-school-import-http-api is the code to handle for setting up a postgresql user, that can be called repeatedly. (In reply to Florian Best from comment #12) > (In reply to Daniel Tröder from comment #7) > > The problem is, that the DB creation code in > > univention-self-service-passwordreset-umc.postinst didn't run: > > > > if [ "$1" = "configure" -a -z "$2" ] ; then > > echo "Fresh installation..." > > su - postgres -c "echo \"CREATE ROLE selfservice WITH LOGIN;\" | psql" > > su - postgres -c "createdb selfservice -E UTF8 -O selfservice -T template0" > > fi > > > > So no database was created in PostgreSQL. > > The code after that did run however, creating the password file. > > > > I can only assume it has to do with the way system-setup works. > > 1. What happens if postgres is down during the postinst? I think one of the > commands causes an error. After another package upgrade -z "$2" will not fit > anymore and the DB creation is never called again. The error is the following: The package univention-self-service-master depends on univention-postgresql, but the other self-service packages don't. unfortunately univention-self-service-master is only installed by the appcenter. If you install univention-self-service univention-self-service-umc-passwordreset manually then no postgresql is installed and the database creation of course fails. (In reply to Florian Best from comment #14) > The error is the following: > The package univention-self-service-master depends on univention-postgresql, > but the other self-service packages don't. unfortunately > univention-self-service-master is only installed by the appcenter. If you > install univention-self-service univention-self-service-umc-passwordreset > manually then no postgresql is installed and the database creation of course > fails. Ah well - that's IMHO a user error. There is an App that should be installed. The only thing I can think of to do against that is to print a big fat warning in univention-self-service.postinst if server/role==dc_master. (And still move the pgsql code from postinst to join script.) OK. the code has been moved from postinst to the joinscript. univention-self-service.yaml 43e1f9770c09 | YAML Bug #44393 univention-self-service (2.0.16-10) 64e03f1cc15c | Bug #44393: move database creation into the joinscript univention-self-service (2.0.16-11) b10bd6b02fd1 | Bug #44393: don't check if any joinscript version was executed prior *** Bug 44419 has been marked as a duplicate of this bug. *** OK - univention-self-service OK - YAML |