Renaming DNS zones often results in an Exception being thrown
Renaming DNS zones often results in an Exception being thrown
Description
Renaming a DNS zone where hosts have been added results in an exception and leaves the zone with multiple zoneName attributes.
Distribution Name and Version
Ubuntu 16.04
FusionDirectory Version
1.2.1
Plugin with the defect
dns
PHP version used
7.0.22
Origin of php packages
Distribution
Steps to Reproduce
-
Ensure the Systems and DNS plugins are installed
-
Click the DNS menu item under the Systems category (left hand of the screen)
-
Click Actions -> Create -> DNS Zone
-
Fill in zone name e.g. foo.
-
Fill in Primary DNS server e.g. dns.foo.
-
Fill in Mail address e.g. mail.foo.
-
Click OK
-
Click the Systems menu item under the Systems category
-
Click Actions -> Create -> Server
-
Fill in Name e.g. myHost
-
Enter an IP address e.g. 192.168.10.1
-
Click add
-
Click the DNS tab
-
Click Add DNS Settings
-
Select foo. from the zone list and click add
-
Click add under the DNS Records section
Note: If the fields in the modal dialogue are grey, cancel the dialogue box, save the host record, then edit it and go back to the DNS tab. This seems to be another intermittent bug.
- Click Add to add an A record for 192.168.10.1
- Click apply
- Click the DNS menu item under the Systems category
- Edit the zone you previously created
- Change the name e.g. fooBar
- Click apply
Expected behavior:
The DNS zone to be renamed, and for all hosts referencing that zone to have that reference updated.
Actual behavior:
Fatal error: Uncaught NonExistingLdapNodeException: Could not open dn zoneName=foo.,ou=dns,dc=nodomain in /usr/share/fusiondirectory/include/simpleplugin/class_simplePlugin.inc:232
Stack trace:
#0 /usr/share/fusiondirectory/plugins/admin/dns/class_dnsZone.inc(694): simplePlugin->__construct('zoneName=foo.,o...', NULL, Object(simpleTabs), true)
#1 /usr/share/fusiondirectory/include/simpleplugin/class_simpleTabs.inc(88): dnsZone->__construct('zoneName=foo.,o...', NULL, Object(simpleTabs), true)
#2 /usr/share/fusiondirectory/include/class_objects.inc(196): simpleTabs->__construct('dnsZone', 'zoneName=foo.,o...')
#3 /usr/share/fusiondirectory/plugins/admin/systems/class_dnsHost.inc(461): objects::open('zoneName=foo.,o...', 'dnsZone')
#4 /usr/share/fusiondirectory/plugins/admin/systems/class_dnsHost.inc(348): dnsHost::removeIpsFromZones(Array, Array)
#5 /usr/share/fusiondirectory/include/simpleplugin/class_simpleTabs.inc(409): dnsHost->save()
#6 /usr/share/fusiondirectory/plugins/admin/systems/tabs_server.inc(26): simpleTabs-> in /usr/share/fusiondirectory/include/simpleplugin/class_simplePlugin.inc on line 232
Reproduces how often: 50% it's weird and non-deterministic... But we're not running replication or anything fancy. I can also reproduce it on the fusiondirectory demo system that you host publically.