Bug 33527 - No proper error message if IP address pool is empty
No proper error message if IP address pool is empty
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Computers
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 4.0-0-errata
Assigned To: Drees Dormann
Florian Best
:
: 29285 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-21 18:42 CET by Alexander Kläser
Modified: 2015-01-08 14:00 CET (History)
5 users (show)

See Also:
What kind of report is it?: ---
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): Error handling, External feedback, Usability
Max CVSS v3 score:


Attachments
patch (3.74 KB, patch)
2014-12-17 17:59 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2013-11-21 18:42:23 CET
I have 253 computers in the domain with a /24 size network. Upon creating a new one and assigning an IP address automatically, I receive the following error instead of a proper user friendly error message:


Execution of command 'udm/network' has failed:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 577, in network
    obj.refreshNextIp()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/networks/network.py", line 237, in refreshNextIp
    raise univention.admin.uexceptions.nextFreeIp
nextFreeIp
Comment 1 Florian Best univentionstaff 2013-11-22 08:19:01 CET
*** Bug 29285 has been marked as a duplicate of this bug. ***
Comment 2 Dirk Wiesenthal univentionstaff 2014-04-07 10:14:04 CEST
Reported by traceback feedback
Comment 3 Dirk Wiesenthal univentionstaff 2014-07-22 11:00:11 CEST
Reported again
Comment 4 Dirk Wiesenthal univentionstaff 2014-10-02 09:45:05 CEST
And again
Comment 5 Drees Dormann univentionstaff 2014-12-17 12:58:03 CET
Traceback has been replaced with a proper "user friendly" error message containing informations for the user.
(r 56913)
Comment 6 Florian Best univentionstaff 2014-12-17 17:59:33 CET
Created attachment 6550 [details]
patch

Your fix looks good! I have some fine tuning ideas attached in the patch. Can you please apply it?

FYI: explodeDn has a second parameter "notypes" which already does what you want (only displaying the name without the dn part):
The following statement can then be reduced:
(udm.uldap.explodeDn(networkDN)[0]).split('=')[1]
→
udm.uldap.explodeDn(ldap_dn, True)[0]
Comment 7 Drees Dormann univentionstaff 2014-12-18 14:15:54 CET
thx for the suggestion, patch has been applied
Comment 8 Florian Best univentionstaff 2015-01-06 16:29:35 CET
Here some small typos in the german translation (marked with »«):

Fehler »beim der« automatischen »IP Adressen Zuweisung«.
Alle IP Adressen »in dem« gewählten Netzwerk "default" sind schon in Benutzung.
Bitte wählen Sie ein anderes Netzwerk oder stellen Sie sicher» das« ungenutzte IP Adressen zur Verfügung stehen.

"zur Verfügung stehen" → "im gewählten Netzwerk zur Verfügung stehen"
Comment 9 Drees Dormann univentionstaff 2015-01-07 10:29:06 CET
Fixed the typos and adapted the error message to be more specific
(r 57127)
Comment 10 Florian Best univentionstaff 2015-01-07 11:32:25 CET
(In reply to Drees Dormann from comment #9)
> Fixed the typos and adapted the error message to be more specific
> (r 57127)
OK, (I fixed choosen → chosen, and a missing ',').
Comment 11 Janek Walkenhorst univentionstaff 2015-01-08 14:00:30 CET
http://errata.univention.de/ucs/4.0/18.html