...
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
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.
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.
Call | Override (globodns.override.entries) | Domain exists? | Record exists? | Action | Test |
Create domain | Yes | Yes | -- | INFO | |
Create domain | Yes | No | -- | Create domain | OK |
Create domain | No | Yes | -- | INFO | OK |
Create domain | No | No | -- | Create domain | |
Create record | Yes | Yes | Yes | Override record | OK |
Create record | Yes | Yes | No | Create record | OK |
Create record | Yes | No | -- | Create domain & record | OK |
Create record | Yes | No | -- | Create domain & record | |
Create record | No | Yes | Yes | ERROR | OK |
Create record | No | Yes | No | Create record | |
Create record | No | No | -- | Create domain & record | OK |
Create record | No | No | -- | Create domain & record | |
Remove record | Yes | Yes | Yes | Remove record | OK |
Remove record | Yes | Yes | No | INFO | |
Remove record | Yes | No | -- | INFO | |
Remove record | Yes | No | -- | INFO | |
Remove record | No | Yes | Yes | If record is exactly same, remove record Otherwise, INFO | OK |
Remove record | No | Yes | No | INFO | |
Remove record | No | No | -- | INFO | |
Remove record | No | No | -- | INFO | |
Remove domain | Yes | Yes | -- | Remove domain | OK |
Remove domain | Yes | No | -- | INFO | |
Remove domain | No | Yes | -- | If no more records, remove domain Otherwise, WARN | OK |
Remove domain | No | No | -- | INFO |
Changes in code:
...