Fix no "data-server" DNS record for VPC router#4873
Conversation
| listen_address.append(ip) | ||
| # Add localized "data-server" records in /etc/hosts for VPC routers | ||
| if self.config.is_vpc(): | ||
| self.add_host(gateway, "%s data-server" % CsHelper.get_hostname()) |
There was a problem hiding this comment.
this can only work if we know for sure that CsHelper.get_hostname() gives an ip address and no hostname, are we?
There was a problem hiding this comment.
this can only work if we know for sure that
CsHelper.get_hostname()gives an ip address and no hostname, are we?
@DaanHoogland
CsHelper.get_hostname() gives the hostname of virtual router. As you can see in screenshot, 'r-24-VM' is the hostname. So it should return hostname, not IP.
There was a problem hiding this comment.
sorry, never mind, I mis-interpreted the semantics of add_host(). no ip needed in that parameter, a (list of) hosts-name(s) is fine.
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ centos7 ✔️ debian. SL-JID 303 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-337)
|
Description
This PR adds the capability to VPC VR to answer "data-server" DNS queries based on the source IP of the VM.
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
Fixes: #4865
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Apply the patch directly to VPC VR.
Add new subnet to VR, then add a new VM and check the record existance.
Restart VPC and check recreation of records.
Remove all VMs from the subnet and check the record is deleted.