Univention Bugzilla – Bug 46533
ucsschool43 HTTP-API import: celeryd start script doesn't work anymore
Last modified: 2018-06-04 10:28:52 CEST
The celeryd workers are not started anymore in 4.3.
The underlying problem is: ------------------------------------------------------------------------ # /usr/share/pyshared/ucsschool/http_api/manage.py check SystemCheckError: System check identified some issues: ERRORS: import_api.UserImportJob.log_file: (fields.E304) Reverse accessor for 'UserImportJob.log_file' clashes with reverse accessor for 'UserImportJob.password_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.log_file' or 'UserImportJob.password_file'. import_api.UserImportJob.log_file: (fields.E304) Reverse accessor for 'UserImportJob.log_file' clashes with reverse accessor for 'UserImportJob.summary_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.log_file' or 'UserImportJob.summary_file'. import_api.UserImportJob.log_file: (fields.E305) Reverse query name for 'UserImportJob.log_file' clashes with reverse query name for 'UserImportJob.password_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.log_file' or 'UserImportJob.password_file'. import_api.UserImportJob.log_file: (fields.E305) Reverse query name for 'UserImportJob.log_file' clashes with reverse query name for 'UserImportJob.summary_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.log_file' or 'UserImportJob.summary_file'. import_api.UserImportJob.password_file: (fields.E304) Reverse accessor for 'UserImportJob.password_file' clashes with reverse accessor for 'UserImportJob.log_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.password_file' or 'UserImportJob.log_file'. import_api.UserImportJob.password_file: (fields.E304) Reverse accessor for 'UserImportJob.password_file' clashes with reverse accessor for 'UserImportJob.summary_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.password_file' or 'UserImportJob.summary_file'. import_api.UserImportJob.password_file: (fields.E305) Reverse query name for 'UserImportJob.password_file' clashes with reverse query name for 'UserImportJob.log_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.password_file' or 'UserImportJob.log_file'. import_api.UserImportJob.password_file: (fields.E305) Reverse query name for 'UserImportJob.password_file' clashes with reverse query name for 'UserImportJob.summary_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.password_file' or 'UserImportJob.summary_file'. import_api.UserImportJob.summary_file: (fields.E304) Reverse accessor for 'UserImportJob.summary_file' clashes with reverse accessor for 'UserImportJob.log_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.summary_file' or 'UserImportJob.log_file'. import_api.UserImportJob.summary_file: (fields.E304) Reverse accessor for 'UserImportJob.summary_file' clashes with reverse accessor for 'UserImportJob.password_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.summary_file' or 'UserImportJob.password_file'. import_api.UserImportJob.summary_file: (fields.E305) Reverse query name for 'UserImportJob.summary_file' clashes with reverse query name for 'UserImportJob.log_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.summary_file' or 'UserImportJob.log_file'. import_api.UserImportJob.summary_file: (fields.E305) Reverse query name for 'UserImportJob.summary_file' clashes with reverse query name for 'UserImportJob.password_file'. HINT: Add or change a related_name argument to the definition for 'UserImportJob.summary_file' or 'UserImportJob.password_file'. ------------------------------------------------------------------------ Those errors may be introduced by the upgrade of Django from 1.8 to 1.10.
(In reply to Daniel Tröder from comment #1) > Those errors may be introduced by the upgrade of Django from 1.8 to 1.10. Yes: downgrading to 1.8.18-1~bpo8+1A~4.2.0.201712111108 (from 4.2/ucsschool_20180112151618) made the above errors vanish and the celery workers are started by the init script again. I will now verify if the HTTP-API import works in 4.3 with Django 1.8. If it does, I'll see if it also works with 1.10, if I fix the above errors (required change is simple: did it with other software upgrading to Django 1.10).
The functionality of the HTTP-API import (server + client) was OK, when running with Django 1.8. Nonetheless even version 1.10 is not supported by the Django Project anymore. So I adapted the code to handle the above error. For the errors to be fixed, only the "related_name" changes in models.UserImportJob were necessary. But having changed the name of the reverse accessor made more changes necessary. All together are in e8db8dc2. With 1cd2e7ac the original init.d script in Stretch and ours are as similar as possible. [4.3 edef5176] Bug #46533: increase startup verbosity [4.3 1cd2e7ac] Bug #46533: adapt to Stretch init script [4.3 e8db8dc2] Bug #46533: fix name clashes with reverse accessor (adapt to Django 1.10) ucs-school-import (16.0.1-5A~4.3.0.201803081512)
DB migrations are missing.
[4.3 b7898738] Bug #46533: add DB migrations [4.3 3feaf30f] Bug #46533: workaround displayName not set when ou==displayName [4.3 a42b4119] Bug #46533: depend on current postgres [4.3 9f0119c2] Bug #46533: manage.py now supports a -c argument to run Python code from cmdline ucs-school-import (16.0.1-7) → uploaded to test appcenter
(In reply to Daniel Tröder from comment #5) > [4.3 9f0119c2] Bug #46533: manage.py now supports a -c argument to run > Python code from cmdline I suggest to create a helper script next time, that can be called by the join script (or manually). OK: code change OK: functional change ??: tests OK: Installation test ??: Update test 4.2→4.3
(In reply to Sönke Schwardt-Krummrich from comment #6) > (In reply to Daniel Tröder from comment #5) > > [4.3 9f0119c2] Bug #46533: manage.py now supports a -c argument to run > > Python code from cmdline > > I suggest to create a helper script next time, that can be called by the > join script (or manually). > > OK: code change > OK: functional change > ??: tests > OK: Installation test > ??: Update test 4.2→4.3 OK: tests OK: Installation test OK: Update test 4.2→4.3
(In reply to Sönke Schwardt-Krummrich from comment #7) > (In reply to Sönke Schwardt-Krummrich from comment #6) > > (In reply to Daniel Tröder from comment #5) > > > [4.3 9f0119c2] Bug #46533: manage.py now supports a -c argument to run > > > Python code from cmdline > > > > I suggest to create a helper script next time, that can be called by the > > join script (or manually). There already exists a bug for that: Bug #45163.
UCS@school 4.3 v1 has been released. https://docs.software-univention.de/release-notes-ucsschool-4.3v1-de.html If this error occurs again, please clone this bug.