Bug 54735 - Traceback from set_nt_acl_on_shares when joining a Backup Node into ucs-school-singlemaster
Traceback from set_nt_acl_on_shares when joining a Backup Node into ucs-schoo...
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v2
Assigned To: Daniel Tröder
Tobias Wenzel
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-05-09 15:43 CEST by Arvid Requate
Modified: 2022-07-15 08:31 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2022-05-09 15:43:07 CEST
When trying to join a Backup Node into a ucs-school-singlemaster (for Bug 52758), the joinscript 62ucs-school-singlemaster fails due to this traceback:

```
Configure 62ucs-school-singlemaster.inst Mon May  9 15:24:35 CEST 2022
[...]
Traceback (most recent call last):
  File "/usr/share/ucs-school-metapackage/scripts/set_nt_acl_on_shares", line 124, in <module>
    main(options)
  File "/usr/share/ucs-school-metapackage/scripts/set_nt_acl_on_shares", line 66, in main
    lo = get_lo(options)
  File "/usr/share/ucs-school-metapackage/scripts/set_nt_acl_on_shares", line 57, in get_lo
    return lo
UnboundLocalError: local variable 'lo' referenced before assignment
```

The code shows that the script doesn't consider the possibility that the UCS variable server/role is domaincontroller_backup.
Comment 1 Daniel Tröder univentionstaff 2022-05-10 17:14:39 CEST
Fixed in branch dtroeder/54735_set_nt_acl_on_shares.

We should try to include this into 5.0v1 for customers trying to upgrade from 4.4.
Comment 2 Daniel Tröder univentionstaff 2022-05-10 17:17:35 CEST
> join a Backup Node into a ucs-school-singlemaster

Is that a supported scenario?
Comment 3 Florian Best univentionstaff 2022-05-10 17:24:43 CEST
(In reply to Daniel Tröder from comment #2)
> > join a Backup Node into a ucs-school-singlemaster
> 
> Is that a supported scenario?

Why not?
Every master must support backup2master compatibility.

Interesting is, why this error was not detected. Seems no Jenkins tests exists.
Comment 4 Tobias Wenzel univentionstaff 2022-05-16 11:02:55 CEST
reopen for merge + build

QA (copy from gitlab)

- MR -> already approved by fbest, also ok for me
- manual test: before traceback, after no traceback when running the script. I had some issue while joining, but that was due to my env.

-> please merge + build
Comment 5 Daniel Tröder univentionstaff 2022-05-19 12:01:20 CEST
Merged and built.

[5.0] 8a6874412 Bug #54735: fix set_nt_acl_on_shares script on backup directory nodes
[5.0] 9a0418abd Bug #54735: advisory

ucs-school-metapackage (13.0.15)
Comment 6 Tobias Wenzel univentionstaff 2022-05-20 11:53:15 CEST
qa: All ok, verify.
Comment 7 Tobias Wenzel univentionstaff 2022-07-15 08:31:09 CEST
UCS@school 5.0 v2 has been released.

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

If this error occurs again, please clone this bug.