Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Create a network provider of DNS, called GloboDNS, so users can choose to register records in a centralized DNS server or keep using Virtual Router in others networks.

  • Administrators can choose which domains will be visible to other networks. By using a network offering with Virtual Router as DNS provider, names from this network will not be visible to other networks, but will be able to translate names from networks that use GloboDNS as DNS provider. This is guaranteed if the DNS server managed by GloboDNS is the same as the internal DNS of a zone.

  • GloboDNS only manage names of virtual machines of types User, Console Proxy and Domain Router.

  • It is necessary to activate GloboDNS in each zone you want to use it.

  • Networks with GloboDNS as DNS provider will not use Virtual Router as DNS service, but that does not prevent Virtual Router from being used for other services, such as DHCP.

  • DNS records use machine hostname as name

  • Plugin handles reverse domains and reverse records as well.

  • It is expected to work with any hypervisor, but tests were conducted only with XenServer 6.2.

  • Networks using GloboDNS as DNS provider need to have access to Bind servers. The plugin does not control network ACLs.


Open Issues:

  • When a network is deleted, its network domain is erased in Bind server, along with reverse domain, all records and reverse records. It is recommended to use exclusive names as network domains to avoid loss of records managed by a third-party.

  • If a record with given name already exists in that domain, it will be overwritten.

  • There is a conflict if more than one network is created with the same network domain.

  • Hostnames with upper case characters are not supported, since Bind is not case sensitive. It is necessary to set the configuration "instance.name" to lower-case letters.


Test Scenarios

  • Creation of NIC will call GloboDNS to create new record

  • If record exists in the Bind server, it will be overwritten

  • If network domain doesn't exist, it will be created

  • When a network is deleted, all records in that network domain will be deleted from the Bind server

  • Uppercase characters are not allowed

  • Reverse domains and reverse records are createdThere are many test scenarios implement in GloboDnsResourceTest.java and GloboDnsElementTest.java

Features

  • All GloboDNS logging is done with "com.globo.globodns" namespace

  • There are no special events triggeredSome inconsistencies are fixed automatically:

  • When a

  • new record is created and the network domain no longer exists in Bind server, network domain will be created first to allow record creation.
  • If record already exists in zone, it will be overwritten. Same for reverse records.

  • When networks are deleted, all records in that network domain will be deleted too.

  • To avoid conflict with records names, only lower case hostnames are allowed.
  • name already exists in GloboDns, it can be overridden or not, depending of global option globodns.override.entries. Bellow there is a table with all possible cenarios.

 

CallOverride
(globodns.override.entries)
Domain exists?Record exists?ActionTest
Create domainYesYes--INFO 
Create domainYesNo--Create domainOK
Create domainNoYes--INFOOK
Create domainNoNo--Create domain 
Create recordYesYesYesOverride recordOK
Create recordYesYesNoCreate recordOK
Create recordYesNo--Create domain & recordOK
Create recordYesNo--Create domain & record 
Create recordNoYesYesERROROK
Create recordNoYesNoCreate record 
Create recordNoNo--Create domain & recordOK
Create recordNoNo--Create domain & record 
Remove recordYesYesYesRemove recordOK
Remove recordYesYesNoINFO 
Remove recordYesNo--INFO 
Remove recordYesNo--INFO 
Remove recordNoYesYesIf record is exactly same, remove record
Otherwise, INFO
OK
Remove recordNoYesNoINFO 
Remove recordNoNo--INFO 
Remove recordNoNo--INFO 
Remove domainYesYes--Remove domainOK
Remove domainYesNo--INFO 
Remove domainNoYes--If no more records, remove domain
Otherwise, WARN
OK
Remove domainNoNo--INFO 

 

Changes in code:

  • All new files are in plugins/network-elements/globodns
  • api/src/com/cloud/network/Network.java: Created new provider called GloboDns
  • api/src/org/apache/cloudstack/network/ExternalNetworkDeviceManager.java: Created new device called GloboDns
  • client/pom.xml: Included plugin dependency
  • client/tomcatconf/commands.properties.in: declared new command addGloboDnsHost permission
  • plugins/pom.xml: included plugin module
  • server/src/com/cloud/configuration/Config.java: Included configuration of default template used in new domainssetup/db/db/schema-421to430.sql: Migrations to create new tables and insertion of configuration
  • ui/scripts/system.js: Detail view of plugin configuration

...