Bug 50484 - UMC Import Module cannot log into ucs-school-import.log
UMC Import Module cannot log into ucs-school-import.log
Status: RESOLVED DUPLICATE of bug 50515
Product: UCS@school
Classification: Unclassified
Component: UMC - User Import UI
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-11-12 15:04 CET by Marc Schwarz
Modified: 2019-11-18 17:23 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
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?: Yes
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 Marc Schwarz univentionstaff 2019-11-12 15:04:56 CET
After importing users via UMC Import Module, every ucs-school-import.log is empty. The file belongs to a non-existing user with the id 384. Maybe the UMC Import Module cannot log into the Logfile due to wrong access rights.

root@master:~# univention-app info
UCS: 4.4-2 errata330
Installed: ucsschool=4.4 v3
Upgradable: 

root@master:~# ls -la /var/lib/ucs-school-import/jobs/2019/4/ucs-school-import.log 
-rw------- 1 384 root 0 Nov 12 14:21 /var/lib/ucs-school-import/jobs/2019/4/ucs-school-import.log
root@master:~# cat /var/lib/ucs-school-import/jobs/2019/4/ucs-school-import.log
root@master:~# ls -la /var/lib/ucs-school-import/jobs/2019/                                                                                                                                         |
1/ 2/ 3/ 4/ 5/ 
root@master:~# ls -la /var/lib/ucs-school-import/jobs/2019/5/
total 84
drwx------  4 uas-import uas-import  4096 Nov 12 14:22 .
drwxr----x  7 root       root        4096 Nov 12 14:22 ..
-rw-r--r--  1 root       root         158 Okt  9 12:40 0_global_defaults.json
-rw-------  1 root       root       10257 Nov 12 14:22 1573564913-100users_ucs44_FiUbtqE.csv
-rw-r--r--  1 root       root           3 Nov 11 15:55 1_global.json
-rw-r--r--  1 root       root        1011 Okt  9 12:40 2_user_import_defaults.json
-rw-r--r--  1 root       root         547 Nov 12 14:18 3_user_import.json
-rw-r--r--  1 root       root         116 Okt  9 12:40 4_user_import_http-api.json
-rw-r--r--  1 root       root           3 Nov 11 15:55 5_user_import_http-api.json
drwxr-xr-x 18 root       root        4096 Nov 11 15:55 hooks
-rw-------  1 uas-import uas-import 10461 Nov 12 14:22 new_user_passwords.csv
drwxr-xr-x  2 root       root        4096 Mai 22 15:35 pyhooks
-rw-------  1        384 root           0 Nov 12 14:22 ucs-school-import.log
-rw-------  1 uas-import uas-import 19060 Nov 12 14:22 user_import_summary.csv

root@master:~# id 384
id: ‘384’: no such user
root@master:~# id uas-import                                                                          |
uid=120(uas-import) gid=127(uas-import) groups=127(uas-import)
root@master:~#
Comment 1 Daniel Tröder univentionstaff 2019-11-12 15:26:36 CET
Please run 

service celery-worker-ucsschool-import restart

and make a new Import. See if the problem persists.
Comment 2 Marc Schwarz univentionstaff 2019-11-12 15:31:19 CET
Problem still perstits:

root@master:~# service celery-worker-ucsschool-import restart
root@master:~# ls -la /var/lib/ucs-school-import/jobs/2019/
total 36
drwxr----x 9 root       root       4096 Nov 12 15:29 .
drwxr-x--- 3 uas-import uas-import 4096 Nov 12 13:30 ..
drwx------ 4 uas-import uas-import 4096 Nov 12 13:30 1
drwx------ 4 uas-import uas-import 4096 Nov 12 13:56 2
drwx------ 4 uas-import uas-import 4096 Nov 12 14:18 3
drwx------ 4 uas-import uas-import 4096 Nov 12 14:21 4
drwx------ 4 uas-import uas-import 4096 Nov 12 14:22 5
drwx------ 4 uas-import uas-import 4096 Nov 12 15:28 6
drwx------ 4 uas-import uas-import 4096 Nov 12 15:29 7
root@master:~# ls -la /var/lib/ucs-school-import/jobs/2019/7/
total 76
drwx------  4 uas-import uas-import  4096 Nov 12 15:29 .
drwxr----x  9 root       root        4096 Nov 12 15:29 ..
-rw-r--r--  1 root       root         158 Okt  9 12:40 0_global_defaults.json
-rw-------  1 root       root       10257 Nov 12 15:29 1573568935-100users_ucs44_WTpjUFz.csv
-rw-r--r--  1 root       root           3 Nov 11 15:55 1_global.json
-rw-r--r--  1 root       root        1011 Okt  9 12:40 2_user_import_defaults.json
-rw-r--r--  1 root       root         547 Nov 12 14:18 3_user_import.json
-rw-r--r--  1 root       root         116 Okt  9 12:40 4_user_import_http-api.json
-rw-r--r--  1 root       root           3 Nov 11 15:55 5_user_import_http-api.json
drwxr-xr-x 18 root       root        4096 Nov 11 15:55 hooks
-rw-------  1 uas-import uas-import    73 Nov 12 15:29 new_user_passwords.csv
drwxr-xr-x  2 root       root        4096 Mai 22 15:35 pyhooks
-rw-------  1        384 root           0 Nov 12 15:29 ucs-school-import.log
-rw-------  1 uas-import uas-import 19060 Nov 12 15:29 user_import_summary.csv
root@master:~# 
(In reply to Daniel Tröder from comment #1)
> Please run 
> 
> service celery-worker-ucsschool-import restart
> 
> and make a new Import. See if the problem persists.
Comment 3 Daniel Tröder univentionstaff 2019-11-12 17:54:36 CET
Something must be doing this. Probably a PyHook of the customer.

Please run:   ps axu | grep 384

during an import, to see if there is a process with that UID.

What is written in the celery log files in /var/log/univention/ucs-school-import/workers-*.log ?
Comment 4 Michael Grandjean univentionstaff 2019-11-12 20:29:04 CET
This is one of Marc's VMs in our test environment, installed as UCS 4.3-5, then upgraded to 4.4-2. The VM has no PyHooks.

I've seen this, too, at a customer environment lately. I will tag the customer.
Comment 8 Daniel Tröder univentionstaff 2019-11-18 17:23:57 CET
Forgot this bug exists, and created a new one. Commits are tagged with the other bug number, so marking this one as duplicate.

*** This bug has been marked as a duplicate of bug 50515 ***