Bug 43103 - import_networks does not create missing dhcp subnet object
import_networks does not create missing dhcp subnet object
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Sönke Schwardt-Krummrich
Florian Best
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-02 12:50 CET by Sönke Schwardt-Krummrich
Modified: 2016-12-12 13:10 CET (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.137
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback, Workaround is available
Max CVSS v3 score:


Attachments
Preliminary patch (1.87 KB, patch)
2016-12-02 12:51 CET, Sönke Schwardt-Krummrich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2016-12-02 12:50:34 CET
Customer feedback via forum:
http://forum.univention.de/viewtopic.php?f=44&t=6276&p=23527

UCS-Master 4.1-4 (multi server environment) errata350 with UCS@school 4.1 R2 v8 and Samba4

The customer called:
- create_ou EXAMPLE dcex01 dcex01v
- import_networks $FILE

Result:

infile is  : network.csv
verify ou for school nr EXAMPLE
generate network 10.20.30.0/24
iprange: 10.20.30.10-10.20.30.250
defaultrouter: 10.20.30.1
nameserver: 10.20.30.3
netbiosserver: 10.20.30.3
creating object cn=example-10.20.30.0,cn=networks,ou=EXAMPLE,dc=univention,dc=local
setting default router
ERROR: Unable to set policy for dhcp subnet because it does not exist: cn=10.20.30.0,cn=example,cn=dhcp,ou=EXAMPLE,dc=univention,dc=local
setting netbios server
ERROR: Unable to set policy for dhcp subnet because it does not exist: cn=10.20.30.0,cn=example,cn=dhcp,ou=EXAMPLE,dc=univention,dc=local
setting nameserver
ERROR: Unable to set policy for dhcp subnet because it does not exist: cn=10.20.30.0,cn=example,cn=dhcp,ou=EXAMPLE,dc=univention,dc=local

The DHCP subnet object is missing. The problem is located in /usr/share/ucs-school-import/scripts/ucs-school-import in create_network.

A preliminary patch is attached that fixes the problem but does not address irritating console output.

Workaround:
1) Join school slave first
2) install univention-dhcp on that slave (if not already done during installation)
3) call import_networks

The join script of univention-dhcp creates the missing DHCP subnet.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2016-12-02 12:51:56 CET
Created attachment 8282 [details]
Preliminary patch
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2016-12-09 15:48:04 CET
This is a regression since at least 4.1-4:

http://jenkins.knut.univention.de:8080/job/UCSschool%204.1/job/UCSschool%204.1%20(R2)%20Singleserver/316/ImportTests=ImportTests,SambaVersion=s3/testReport/90_ucsschool/37_import-networks_via_cli/test/

An improved version of the patch has been applied. In my test environment
37_import-networks_via_cli ran without problems.

The irritating messages ("Creating object None") are only cosmetic problems and caused by bug 43150.

ucs-school-import.yaml:
r75165 | Bug #43103: fixed regression in import_networks
r75166 | Bug #43103: updated advisory

ucs-school-import (14.0.16-41):
r75165 | Bug #43103: fixed regression in import_networks

Package: ucs-school-import
Version: 14.0.16-41.332.201612091542
Branch: ucs_4.1-0
Scope: ucs-school-4.1r2
Comment 4 Florian Best univentionstaff 2016-12-12 10:54:30 CET
OK: Code change
OK: ucs-test
OK: YAML
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2016-12-12 13:10:26 CET
UCS@school 4.1 R2 v9 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.1R2v9-de.html