Bug 32381 - Revise DHCP and DNS representation
Revise DHCP and DNS representation
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 3.1
Other Linux
: P1 normal (vote)
: UCS 3.2
Assigned To: Florian Best
Dirk Wiesenthal
: interim-3
Depends on:
Blocks: 33181 33205
  Show dependency treegraph
 
Reported: 2013-08-26 17:37 CEST by Alexander Kläser
Modified: 2013-11-19 06:42 CET (History)
2 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): Usability
Max CVSS v3 score:


Attachments
Mother of all DHCP (23.91 KB, image/png)
2013-09-18 12:15 CEST, Dirk Wiesenthal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2013-08-26 17:37:42 CEST
The configuration of DHCP and DNS can be fairly complicated to use the first time. Therefore a revision of the module would be helpful. Possible changes could be a configuration wizard or to show superordinates in a separate tree view (similar to LDAP directory or UVMM).
Comment 1 Florian Best univentionstaff 2013-09-16 17:26:29 CEST
univention-management-console-module-udm (4.0.20-1)

The DHCP and DNS flavor now have a Tree view.
Comment 2 Dirk Wiesenthal univentionstaff 2013-09-18 12:04:08 CEST
I don't know exactly why, probably when no DHCP entry is present at all. Upon module opening:

  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 453, in _thread
    result = module.search( request.options.get( 'container' ), request.options[ 'objectProperty' ], request.options[ 'objectPropertyValue' ], superordinate, scope = request.options.get( 'scope', 'sub' ) )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 182, in wrapper_func
    raise LDAP_ConnectionError( str( e ) )

LDAP_ConnectionError: Bad search filter
Comment 3 Dirk Wiesenthal univentionstaff 2013-09-18 12:15:57 CEST
Created attachment 5437 [details]
Mother of all DHCP

The root of the tree is not correct (not cn=dhcp,$ldap_base but $ldap_base directly). This is quite irritating.
Comment 4 Florian Best univentionstaff 2013-09-18 16:53:44 CEST
(In reply to Dirk Wiesenthal from comment #2)
> I don't know exactly why, probably when no DHCP entry is present at all.
> Upon module opening:
> 
>   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 453, in _thread
>     result = module.search( request.options.get( 'container' ),
> request.options[ 'objectProperty' ], request.options[ 'objectPropertyValue'
> ], superordinate, scope = request.options.get( 'scope', 'sub' ) )
>   File
> "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/
> udm_ldap.py", line 182, in wrapper_func
>     raise LDAP_ConnectionError( str( e ) )
> 
> LDAP_ConnectionError: Bad search filter
Dunno why it only happend on your side but fixed.


(In reply to Dirk Wiesenthal from comment #3)
> Created attachment 5437 [details]
> Mother of all DHCP
> 
> The root of the tree is not correct (not cn=dhcp,$ldap_base but $ldap_base
> directly). This is quite irritating.
The title has been changed to e.g. 'All DNS objects'.
Comment 5 Dirk Wiesenthal univentionstaff 2013-09-20 13:42:27 CEST
When adding a new DHCP service via command line or in another UMC session and reload the tree in an already opened DHCP module, the new service shows up. However, clicking on it yields

  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 451, in _thread
    raise UMC_OptionTypeError( _( 'Could not find an UDM module for the superordinate object %s' ) % superordinate )

UMC_OptionTypeError: Es konnte kein UDM-Modul für das übergeordnete Objekt  gefunden werden


superordinate is missing in the options.
flavor
	"dhcp/dhcp"
objectProperty
	"None"
objectPropertyValue
	""
objectType
	"dhcp/dhcp"
superordinate
	""
Comment 6 Dirk Wiesenthal univentionstaff 2013-09-20 14:02:56 CEST
The grid action "Show all DHCP services" seems to be unnecessary with the tree on the left
Comment 7 Florian Best univentionstaff 2013-09-30 11:19:24 CEST
univention-management-console-module-udm (4.0.26-1) 
* Bug #32381: remove "Show all Superordinates" button
* Bug #32381: fix error when superordinate was added via CLI
Comment 8 Dirk Wiesenthal univentionstaff 2013-09-30 14:36:02 CEST
With the tree on the left, a click on a superordinate like dhcp/service in the grid should not search in the object as the container but edit the object.

Issues with reloading the tree while the another superordinate was added externally are not resolved.

After adding an object in a dhcp/service (e.g. a dhcp/server) the view jumps back to the grid view. The dhcp/service object is selected but a timing problems sometimes lead to the grid not showing the objects in that dhcp/service but all dhcp/services (i.e. as if the dhcp root was selected in the tree)
Comment 9 Florian Best univentionstaff 2013-09-30 16:48:36 CEST
(In reply to Dirk Wiesenthal from comment #8)
> With the tree on the left, a click on a superordinate like dhcp/service in
> the grid should not search in the object as the container but edit the
> object.
This is not done anymore. Only for Containers in the "LDAP directory".

> Issues with reloading the tree while the another superordinate was added
> externally are not resolved.
now fixed.

> After adding an object in a dhcp/service (e.g. a dhcp/server) the view jumps
> back to the grid view. The dhcp/service object is selected but a timing
> problems sometimes lead to the grid not showing the objects in that
> dhcp/service but all dhcp/services (i.e. as if the dhcp root was selected in
> the tree)
A reload of the superordinates is now only done after a tree reload (Which will be done after creating, removing and moving objects).

univention-management-console-module-udm (4.0.28-1) 
* Bug #32381: fix reloading of superordinates
Comment 10 Dirk Wiesenthal univentionstaff 2013-10-23 10:46:59 CEST
When deleting a dhcp/service from the tree while having that object selected, a traceback is shown
Comment 11 Dirk Wiesenthal univentionstaff 2013-10-23 11:43:50 CEST
The root node of the tree now says: "All DHCP objects". While this is the generic term for the UDM module, it is not correct. The tree only show "All DHCP services". In DNS it should be "All DNS zones". I am afraid this has to be done explicitly on a per module basis in udm.js.
Comment 12 Florian Best univentionstaff 2013-10-25 08:46:57 CEST
(In reply to Dirk Wiesenthal from comment #10)
> When deleting a dhcp/service from the tree while having that object
> selected, a traceback is shown
→ fixed in
univention-management-console-module-udm (4.0.60-1) 
* Bug #32381: fix traceback when deleting a object which is selected in the
tree

(In reply to Dirk Wiesenthal from comment #11)
> The root node of the tree now says: "All DHCP objects". While this is the
> generic term for the UDM module, it is not correct. The tree only show "All
> DHCP services". In DNS it should be "All DNS zones". I am afraid this has to
> be done explicitly on a per module basis in udm.js.
→ ugly but also done ;)
Comment 13 Florian Best univentionstaff 2013-10-25 10:27:59 CEST
An error has also been fixed which occurred when deleting an object.

I got the Error …"modules/udm/__init__.py", line 461, in _thread\n    if module.module is None:\n\nAttributeError: 'NoneType' object has no attribute 'module".

In the backend code a search is performed, after this the search result is wrapped into an "UDM_Module LDAP object". When deleting an object between these calls the above named exception occurs.

univention-management-console-module-udm (4.0.61-1)
* Bug #32381: fix an error which happens when a object is removed concurrent
to a search query
Comment 14 Dirk Wiesenthal univentionstaff 2013-10-25 10:52:59 CEST
UMC: Open DHCP module, select a service in tree
 -> Grid shows all objects with the service as superordinate (Ok)
Meanwhile: Adding a DHCP service in udm-cli
UMC: Reload tree
 -> Tree is reloaded, new DHCP service shows up in tree, previously selected service is still selected (Ok)
 -> Grid shows all services as if root node was selected (not Ok)
Comment 15 Dirk Wiesenthal univentionstaff 2013-10-25 11:10:17 CEST
The "Directory" symbol used for "All DNS zones": Can you change that to the DNS module icon? DHCP resp.
Comment 16 Florian Best univentionstaff 2013-10-28 11:01:54 CET
(In reply to Dirk Wiesenthal from comment #14)
> UMC: Open DHCP module, select a service in tree
>  -> Grid shows all objects with the service as superordinate (Ok)
> Meanwhile: Adding a DHCP service in udm-cli
> UMC: Reload tree
>  -> Tree is reloaded, new DHCP service shows up in tree, previously selected
> service is still selected (Ok)
>  -> Grid shows all services as if root node was selected (not Ok)
fixed

(In reply to Dirk Wiesenthal from comment #15)
> The "Directory" symbol used for "All DNS zones": Can you change that to the
> DNS module icon? DHCP resp.
fixed
Comment 17 Dirk Wiesenthal univentionstaff 2013-10-31 21:35:04 CET
Still timing issues:

When adding a DHCP/Service the tree does not reload (or at least does not show the new object). When deleting an object from the tree, the tree does not reload.

"Rightclick -> Reload" does work, though.

Maybe timing problem related to the new cache? I had problems with Deferreds being resolved faster then I was able to setup on-handlers.

I do not remember that this was an issue a few days ago.
Comment 18 Florian Best univentionstaff 2013-11-01 13:38:15 CET
(In reply to Dirk Wiesenthal from comment #17)
> Still timing issues:
> 
> When adding a DHCP/Service the tree does not reload (or at least does not
> show the new object). When deleting an object from the tree, the tree does
> not reload.
> 
> "Rightclick -> Reload" does work, though.
> 
> Maybe timing problem related to the new cache? I had problems with Deferreds
> being resolved faster then I was able to setup on-handlers.
> 
> I do not remember that this was an issue a few days ago.
That was due to the new cache.
-	cache.get(this.moduleFlavor).getSuperordinates()
+	cache.get(this.moduleFlavor).getSuperordinates(undefined, true)
Comment 19 Alexander Kläser univentionstaff 2013-11-01 15:50:00 CET
Opening dhcp/dhcp a second time would result in a query list with a preselected superordinate. This was due to a sort operation being carried out on the array of superordinates stemming from the cache. I added a lang.clone().

 univention-management-console-module-udm (4.0.91-1) unstable; urgency=low
 .
   * Bug #32381: clone array reference for superordinates before sorting
Comment 20 Dirk Wiesenthal univentionstaff 2013-11-04 10:20:21 CET
Now works as expected. Changeset Ok
Comment 21 Stefan Gohmann univentionstaff 2013-11-19 06:42:06 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".