Bug 42373 - ucs-school-import: errors in configuration files are not written to logfile
ucs-school-import: errors in configuration files are not written to logfile
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v4-errata
Assigned To: Alexander Steffen
Ole Schwiegert
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-13 12:50 CEST by Daniel Tröder
Modified: 2023-12-19 16:01 CET (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.023
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 Daniel Tröder univentionstaff 2016-09-13 12:50:55 CEST
Errors in configuration files are not written to logfile, only to the console. 
The problem is, that the filename of the logfile is stored in the configuration object being constructed.

Use a fixed filename (default logfile name is /var/log/univention/ucs-school-import.log) to write (append) InitialisationErrors to.


------ UCS@school import tool starting ------
Reading configuration from '/usr/share/ucs-school-import/configs/global_defaults.json'...
Reading configuration from '/var/lib/ucs-school-import/configs/global.json'...
Reading configuration from '/usr/share/ucs-school-import/configs/user_import_defaults.json'...
Reading configuration from '/var/lib/ucs-school-import/configs/user_import.json'...
Reading configuration from '/tmp/34_import-users_via_cli_v2.mNklZB/config.YD87cw'...
InitialisationError: Error in configuration file '/tmp/34_import-users_via_cli_v2.mNklZB/config.YD87cw': Expecting , delimiter: line 1 column 668 (char 668).
InitialisationError: InitialisationError("Error in configuration file '/tmp/34_import-users_via_cli_v2.mNklZB/config.YD87cw': Expecting , delimiter: line 1 column 668 (char 668).",)
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/frontend/cmdline.py", line 106, in main
    self.setup_config()
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/frontend/cmdline.py", line 72, in setup_config
    self.config = setup_configuration(configs, **self.args.settings)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/configuration.py", line 42, in setup_configuration
    config = Configuration(conffiles)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/configuration.py", line 135, in __new__
    cls._instance = cls.__SingleConf(filename)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/configuration.py", line 126, in __init__
    raise InitialisationError("Error in configuration file '{}': {}.".format(filename, ve))
InitialisationError: Error in configuration file '/tmp/34_import-users_via_cli_v2.mNklZB/config.YD87cw': Expecting , delimiter: line 1 column 668 (char 668).
Comment 1 Daniel Tröder univentionstaff 2016-09-13 13:17:06 CEST
r72538: created (currently deactivated) test for this
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2019-02-05 21:14:30 CET
This issue has been filled against UCS@school 4.1 (R2). The maintenance with bug 
and security fixes for UCS@school 4.1 (R2) has ended on 5th of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3 (or later). 
Please contact your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug"
or simply reopen the issue. In this case please provide detailed information on
how this issue is affecting you.
Comment 3 J Leadbetter univentionstaff 2023-10-23 12:05:18 CEST
This is still an issue in 5.0-5. Re-opening.
Comment 4 Ole Schwiegert univentionstaff 2023-12-12 10:06:22 CET
Fixed with

ucs-school-import (18.0.38)
Comment 5 Johannes Königer univentionstaff 2023-12-19 16:01:56 CET
Errata updates for UCS@school 5.0 v4 have been released.

https://docs.software-univention.de/ucsschool-changelog/5.0v4/en/changelog.html
https://docs.software-univention.de/ucsschool-changelog/5.0v4/de/changelog.html

If this error occurs again, please clone this bug.