Bug 53252 - univention-register-network-address returns error if nothing needs to be done
Summary: univention-register-network-address returns error if nothing needs to be done
Status: NEW
Alias: None
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UMC maintainers
QA Contact: UMC maintainers
URL: https://git.knut.univention.de/univen...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-12 11:47 CEST by Arvid Requate
Modified: 2025-04-28 12:08 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.051
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2025042821000159
Bug group (optional):
Customer ID: 02149
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2021-05-12 11:47:52 CEST
univention-register-network-address returns an error in case the IP address is already registered to the host. IMHO the UMC call should show idempotent behavior. If for some reason the UMC call cannot do this, then the script should properly handle it, confirming that the task is actually done and return without error.

Current behavior:

root@replica:~# /usr/sbin/univention-register-network-address --verbose
BadRequest: 400 on master50.ucs50pt1.dev (command/ip/change): {'status': 400, 'message': 'The IP address is already in use by host record(s) for: replica', 'traceback': None, 'location': 'https://master50.ucs50pt1.dev/univention/command'}
Comment 1 Philipp Hahn univentionstaff 2023-05-23 17:35:55 CEST
the service is always in an unclean state when DHCP is used, which is a nuisance when looking for (other) errors:

# systemctl status univention-network-common.service 
● univention-network-common.service - Register current IP addresses in LDAP directory
   Loaded: loaded (/lib/systemd/system/univention-network-common.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2023-05-23 13:43:01 CEST; 3h 51min ago
  Process: 2892 ExecStart=/usr/sbin/univention-register-network-address (code=exited, status=1/FAILURE)
 Main PID: 2892 (code=exited, status=1/FAILURE)

Mai 23 13:43:00 os0-136 systemd[1]: Starting Register current IP addresses in LDAP directory...
Mai 23 13:43:01 os0-136 systemd[1]: univention-network-common.service: Main process exited, code=exited, status=1/FAILURE
Mai 23 13:43:01 os0-136 systemd[1]: univention-network-common.service: Failed with result 'exit-code'.
Mai 23 13:43:01 os0-136 systemd[1]: Failed to start Register current IP addresses in LDAP directory.
Comment 2 Philipp Hahn univentionstaff 2023-11-09 08:39:46 CET
A variant where the hosts fails with its S4 SRV record:

# /usr/sbin/univention-register-network-address --verbose
BadRequest: 400 on master095.autotest095.test (command/ip/change):
{
 'status': 400,
 'message': 'The IP address is already in use by host record(s) for: gc._msdcs, DomainDnsZones, ForestDnsZones, slave095',
 'traceback': None,
 'location': 'https://master095.autotest095.test/univention/command/ip'
}

# samba-tool dns query localhost "$(dnsdomainname)" @ ALL -U Administrator%univention
  Name=, Records=7, Children=0
    NS: master095.autotest095.test. (flags=600000f0, serial=1, ttl=900)
    NS: slave095.autotest095.test. (flags=600000f0, serial=1, ttl=900)
    SOA: serial=87, refresh=28800, retry=7200, expire=604800, minttl=3600, ns=master095.autotest095.test., email=root.autotest095.test. (flags=600000f0, serial=87, ttl=10800)
    A: 10.201.0.223 (flags=600000f0, serial=1, ttl=900)
    A: 10.201.2.108 (flags=600000f0, serial=1, ttl=900)
    AAAA: fda1:dead:beef:0000:f816:3eff:fe9f:8820 (flags=600000f0, serial=1, ttl=900)
    AAAA: fda1:dead:beef:0000:f816:3eff:fee9:a276 (flags=600000f0, serial=1, ttl=900)
  Name=_kerberos, Records=1, Children=0
    TXT: "AUTOTEST095.TEST" (flags=f0, serial=1, ttl=900)
  Name=_msdcs, Records=1, Children=0
    NS: master095.autotest095.test. (flags=f0, serial=1, ttl=900)
  Name=_sites, Records=0, Children=1
  Name=_tcp, Records=0, Children=7
  Name=_udp, Records=0, Children=2
  Name=DomainDnsZones, Records=0, Children=2
  Name=ForestDnsZones, Records=0, Children=2
  Name=master095, Records=2, Children=0
    A: 10.201.0.223 (flags=f0, serial=1, ttl=900)
    AAAA: fda1:dead:beef:0000:f816:3eff:fe9f:8820 (flags=f0, serial=1, ttl=900)
  Name=SLAVE095, Records=2, Children=0
    A: 10.201.2.108 (flags=f0, serial=1, ttl=900)
    AAAA: fda1:dead:beef:0000:f816:3eff:fee9:a276 (flags=f0, serial=1, ttl=900)
  Name=ucs-sso, Records=1, Children=0
    A: 10.201.0.223 (flags=f0, serial=1, ttl=900)
Comment 4 Mirac Erdemiroglu univentionstaff 2025-04-28 12:07:02 CEST
Customer affected 2025042821000159

systemctl status
univention-network-common.service
● univention-network-common.service - Register current IP addresses in
LDAP directory
    Loaded: loaded
(/lib/systemd/system/univention-network-common.service; enabled; vendor
preset: enabled)
    Active: failed (Result: exit-code) since Mon 2025-04-28 10:33:51
CEST; 23min ago
   Process: 6740 ExecStart=/usr/sbin/univention-register-network-address
(code=exited, status=1/FAILURE)
  Main PID: 6740 (code=exited, status=1/FAILURE)

Apr 28 10:33:50 me01 systemd[1]: Starting Register current IP
addresses in LDAP directory...
Apr 28 10:33:51 me01 systemd[1]: univention-network-common.service:
Main process exited, code=exited, status=1/FAILURE
Apr 28 10:33:51 me01 systemd[1]: univention-network-common.service:
Failed with result 'exit-code'.
Apr 28 10:33:51 me01 systemd[1]: Failed to start Register current
IP addresses in LDAP directory.
Comment 5 Mirac Erdemiroglu univentionstaff 2025-04-28 12:08:22 CEST
/var/log/univention/management-console-module-ipchange.log):

-------------------------------------------------------------------
28.04.25 10:33:50.982  DEBUG_INIT
28.04.25 10:33:51.279  MODULE      ( PROCESS ) : Setting user LDAP DN:
'cn=e132-me01,cn=memberserver,cn=computers,ou=uni,dc=edu,dc=vention,dc=de'
28.04.25 10:33:51.279  MODULE      ( PROCESS ) : Setting auth type: None
28.04.25 10:33:51.279  MODULE      ( PROCESS ) : Received request
'ip/change': ('e132-me01$', None, None, 'de_DE.UTF-8')
28.04.25 10:33:51.292  MODULE      ( PROCESS ) : The IP address is
already in use by host record(s) for: me01