Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix publish hostname in china and gov clouds #3005

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests_e2e/tests/publish_hostname/publish_hostname.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def add_vm_password(self):

def check_and_install_dns_tools(self):
lookup_cmd = "dig -x {0}".format(self._private_ip)
dns_regex = r"[\S\s]*;; ANSWER SECTION:\s.*PTR\s*(?P<hostname>.*).internal.cloudapp.net.[\S\s]*"
dns_regex = r"[\S\s]*;; ANSWER SECTION:\s.*PTR\s*(?P<hostname>.*)\.internal\.(cloudapp\.net|chinacloudapp\.cn|usgovcloudapp\.net).*[\S\s]*"

# Not all distros come with dig. Install dig if not on machine
try:
Expand All @@ -66,7 +66,7 @@ def check_and_install_dns_tools(self):
if "debian_9" in distro:
# Debian 9 hostname look up needs to be done with "host" instead of dig
lookup_cmd = "host {0}".format(self._private_ip)
dns_regex = r".*pointer\s(?P<hostname>.*).internal.cloudapp.net."
dns_regex = r".*pointer\s(?P<hostname>.*)\.internal\.(cloudapp\.net|chinacloudapp\.cn|usgovcloudapp\.net).*"
elif "debian" in distro:
self._ssh_client.run_command("apt install -y dnsutils", use_sudo=True)
elif "alma" in distro or "rocky" in distro:
Expand Down
Loading