Bug 34035 - Traceback when a computer's networks/network's netmask is set to 255.255.255.0 instead of 24
Traceback when a computer's networks/network's netmask is set to 255.255.255....
Status: NEW
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-03 10:20 CET by Dirk Wiesenthal
Modified: 2021-06-21 15:48 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.171
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018072221000258, 2018011921000533, 2018011921000499, 2017112821000795, 2017112521000013, 2016120221000539, 2017010721000021, 2017041321000906, 2017041021000699, 2017031221000339, 2017081521000477, 2020122021000238, 2020102621000123, 2021060421000742
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2014-02-03 10:20:26 CET
Traceback feedback.

Not sure how to achieve this, because '255.255.255.0' should be converted to '24' when setting the value. This is done by syntax.netmask. Maybe the syntax was overwritten by UCR? Other Ideas?

Traceback:
  File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File
"/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line
373, in _thread
    module.modify( properties )
  File
"/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line
155, in wrapper_func
    ret = func( *args, **kwargs )
  File
"/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line
408, in modify
    self._map_properties( obj, ldap_object )
  File
"/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line
298, in _map_properties
    obj[ property_name ] = property_obj.syntax.parse( value )
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 2570, in
__setitem__
    network_object['netmask'], self['ip'][ 0 ]):
  File "/usr/lib/pymodules/python2.6/univention/admin/ipaddress.py", line 51, in
ip_is_in_network
    lip=struct.unpack('!I', socket.inet_aton(ip))[0] >> 32-int(subnetmask)

ValueError: invalid literal for int() with base 10: '255.255.255.0'
Comment 1 Florian Best univentionstaff 2014-12-01 09:44:40 CET
Reported again: 3.2-3 errata225
Comment 2 Florian Best univentionstaff 2015-06-25 11:18:58 CEST
Reported again, 4.0-2 errata213 (Walle)

Die Ausführung des Kommandos udm/put computers/computer ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 207, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 412, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 163, in _decorated
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 146, in wrapper_func
    return _func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in _func
    ret = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 552, in modify
    self._map_properties(obj, ldap_object)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 441, in _map_properties
    obj[property_name] = property_obj.syntax.parse(value)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 2665, in __setitem__
    network_object['netmask'], self['ip'][ 0 ]):
  File "%PY2.7%/univention/admin/ipaddress.py", line 51, in ip_is_in_network
    lip=struct.unpack('!I', socket.inet_aton(ip))[0] >> 32-int(subnetmask)
ValueError: invalid literal for int() with base 10: '255.255.255.0'
Comment 3 Florian Best univentionstaff 2015-08-11 10:31:52 CEST
Reported again, comment #2, 4.0-2 errata263 (Walle)
Comment 4 Florian Best univentionstaff 2016-04-21 09:09:16 CEST
Reported again, 4.1-1 errata153 (Vahr), comment #2
Comment 5 Florian Best univentionstaff 2016-12-09 17:50:55 CET
Reported again, 4.1-4 errata350 (Vahr)
Comment 6 Florian Best univentionstaff 2017-01-09 18:30:31 CET
Reported again, 4.1-4 errata371 (Vahr)
Comment 7 Florian Best univentionstaff 2017-04-18 11:30:21 CEST
Version: 4.2-0 errata1 (Lesum)
Comment 8 Florian Best univentionstaff 2017-04-18 11:40:17 CEST
Version: 4.1-4 errata408 (Vahr)
Comment 9 Florian Best univentionstaff 2017-04-21 12:03:59 CEST
Version: 4.1-4 errata406 (Vahr)
Comment 10 Florian Best univentionstaff 2017-08-21 11:26:52 CEST
Version: 4.2-1 errata133 (Lesum)
Comment 11 Johannes Keiser univentionstaff 2017-11-29 13:01:32 CET
Version: 4.2-2 errata231 (Lesum)
Comment 12 Johannes Keiser univentionstaff 2017-11-29 13:08:19 CET
Reported again: Version: 4.2-3 errata231 (Lesum)
Comment 13 Johannes Keiser univentionstaff 2018-01-19 16:55:44 CET
Reported again: Version: 4.3-0 errata0 (Neustadt)

Internal server error during "udm/put (computers/computer)".
Request: udm/put (computers/computer)
Comment 14 Florian Best univentionstaff 2018-01-20 14:24:23 CET
I spoke with a partner having this problem on a new installation of UCS 4.3-0:
Our network/network "default" object has the problematic value "255.255.255.0" in LDAP.
This is set by management/univention-ldap/10univention-ldap-server.inst but UDM should transform it into the format "24" except if the UCR variable directory/manager/web/modules/networks/network/properties/netmask/syntax is set (to e.g. "string").

But that variable is not set on that system.

To fix the problem the following can be executed as root on the DC Master:

eval "$(ucr shell ldap/base)"
ldapmodify -x -D "cn=admin,$ldap_base" -y /etc/ldap.secret <<-%EOR
dn: cn=default,cn=networks,$ldap_base
changetype: modify
replace: univentionNetmask
univentionNetmask: 24
%EOR
Comment 15 Johannes Keiser univentionstaff 2018-07-31 12:16:52 CEST
Reported again:
Version: 4.3-1 errata151 (Neustadt)

Interner Server-Fehler in "udm/put (computers/computer)".
Request: udm/put (computers/computer)

Traceback (most recent call last):
  File "%PY2.7%/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 407, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 83, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 452, in modify
    self._map_properties(obj, ldap_object)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 342, in _map_properties
    obj[property_name] = property_obj.syntax.parse(value)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 3085, in __setitem__
    if not self['ip'] or len(self['ip']) < 1 or not self['ip'][0] or not univention.admin.ipaddress.ip_is_in_network(network_object['network'], network_object['netmask'],
self['ip'][0]):
  File "%PY2.7%/univention/admin/ipaddress.py", line 54, in ip_is_in_network
    lip = struct.unpack('!I', socket.inet_aton(ip))[0] >> 32 - int(subnetmask)
ValueError: invalid literal for int() with base 10: '255.255.255.0'
Comment 16 Johannes Keiser univentionstaff 2019-01-31 17:04:18 CET
Reported again: Version: 4.3-2 errata332 (Neustadt)

Interner Server-Fehler in "udm/put (computers/computer)".
Request: udm/put (computers/computer)

  File "%PY2.7%/notifier/threads.py", line 78, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 431, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 84, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 453, in modify
    self._map_properties(obj, ldap_object)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 343, in _map_properties
    obj[property_name] = property_obj.syntax.parse(value)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 3129, in __setitem__
    if not self['ip'] or len(self['ip']) < 1 or not self['ip'][0] or not univention.admin.ipaddress.ip_is_in_network(network_object['network'], network_object['netmask'],
self['ip'][0]):
  File "%PY2.7%/univention/admin/ipaddress.py", line 54, in ip_is_in_network
    lip = struct.unpack('!I', socket.inet_aton(ip))[0] >> 32 - int(subnetmask)
ValueError: invalid literal for int() with base 10: '255.255.255.0'

Role: domaincontroller_master
Comment 17 Christian Castens univentionstaff 2021-01-05 15:50:30 CET
reported again

Version: 4.4-7 errata850 (Blumenthal)

Error:
Interner Server-Fehler in "udm/put (computers/computer)".
Request: udm/put (computers/computer)

  File "%PY2.7%/notifier/threads.py", line 80, in _run
    result = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function(*tmp, **self._kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 440, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 643, in modify
    self._map_properties(obj, ldap_object)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 509, in _map_properties
    obj[property_name] = property_obj.syntax.parse(value)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 3326, in __setitem__
    if not self['ip'] or len(self['ip']) < 1 or not self['ip'][0] or not univention.admin.ipaddress.ip_is_in_network(network_object['network'], network_object['netmask'],
self['ip'][0]):
  File "%PY2.7%/univention/admin/ipaddress.py", line 105, in ip_is_in_network
    lip = struct.unpack('!I', socket.inet_aton(ip))[0] >> 32 - int(subnetmask)
ValueError: invalid literal for int() with base 10: '255.255.255.0'

Role: domaincontroller_master
Comment 18 Christian Castens univentionstaff 2021-06-21 13:54:18 CEST
reported again: 2021061121000274
Version: 4.4-8 errata992 (Blumenthal)

Error:
Interner Server-Fehler in "udm/put (computers/computer)".
Request: udm/put (computers/computer)

  File "%PY2.7%/notifier/threads.py", line 80, in _run
    result = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function(*tmp, **self._kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 440, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 643, in modify
    self._map_properties(obj, ldap_object)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 509, in _map_properties
    obj[property_name] = property_obj.syntax.parse(value)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 3326, in __setitem__
    if not self['ip'] or len(self['ip']) < 1 or not self['ip'][0] or not univention.admin.ipaddress.ip_is_in_network(network_object['network'], network_object['netmask'],
self['ip'][0]):
  File "%PY2.7%/univention/admin/ipaddress.py", line 105, in ip_is_in_network
    lip = struct.unpack('!I', socket.inet_aton(ip))[0] >> 32 - int(subnetmask)
ValueError: invalid literal for int() with base 10: '255.255.255.255'

Role: domaincontroller_master
Comment 19 Christian Castens univentionstaff 2021-06-21 15:48:34 CEST
reported again: #2021060421000742
Version: 4.4-8 errata987 (Blumenthal)

Remark: I've set a network for domain controller in the computers list.