Bug 47586 - App Center throws Traceback if interface is configured incorrectly
App Center throws Traceback if interface is configured incorrectly
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.3
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-14 14:11 CEST by Valentin Heidelberger
Modified: 2021-05-14 16:34 CEST (History)
2 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?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.114
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
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 Valentin Heidelberger univentionstaff 2018-08-14 14:11:59 CEST
A customer accidentally set a netmask for an interface's network. This resulted in a traceback in the App Center.

We debugged it by having a look at the interfaces using UCR:

$python
>>> from univention.config_registry import interfaces
>>> list(interfaces.Interfaces().ipv4_interfaces)
[('eth0', {'name': 'eth0', 'ipv6/acceptRA': 'false', 'broadcast': '10.200.14.255', 'start': 'true', 'netmask': '255.255.255.0', 'address': '10.200.14.80', 'type': 'static', 'network': 'netmask=255.255.255.0'})]


To reproduce:

ucr set interfaces/eth0/network="netmask=255.255.255.0"

Open App Center in UMC


Request: appcenter/query

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 253, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py", line 207, in query
    if not self._test_for_docker_service():
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py", line 236, in _test_for_docker_service
    if docker_bridge_network_conflict():
  File "/usr/lib/pymodules/python2.7/univention/appcenter/utils.py", line 91, in docker_bridge_network_conflict
    my_net = ipaddr.IPv4Network('%s/%s' % (iface['network'], iface['netmask']))
  File "/usr/lib/python2.7/dist-packages/ipaddr.py", line 1336, in __init__
    self._ip = self._ip_int_from_string(addr[0])
  File "/usr/lib/python2.7/dist-packages/ipaddr.py", line 1098, in _ip_int_from_string
    raise AddressValueError(ip_str)
AddressValueError: netmask 255.255.255.0
Comment 1 Florian Best univentionstaff 2019-03-18 10:43:18 CET
So this bug is about the error handling in the appcenter because the following command seems invalid (and possible breaks more than the appcenter):

ucr set interfaces/eth0/network="netmask=255.255.255.0"
Comment 2 Valentin Heidelberger univentionstaff 2019-03-18 10:53:10 CET
(In reply to Florian Best from comment #1)
> So this bug is about the error handling in the appcenter because the
> following command seems invalid (and possible breaks more than the
> appcenter):
> 
> ucr set interfaces/eth0/network="netmask=255.255.255.0"

Exactly. Once the customer saw the configured interfaces in UCR, they also immediately recognized the mistake and "fixed" it by setting the variable correctly. As you mentioned, I just think the app center shouldn't be broken if one interface is configured correctly. 
I don't know why the app center checks the interfaces. It might be required regarding the actual installation of apps. If that's so such a traceback should appear if the user tries actually install an app IMO.
Comment 3 Ingo Steuwer univentionstaff 2021-05-14 15:43:11 CEST
This issue has been filed against UCS 4.3.

UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.