Skip to content
Snippets Groups Projects
Commit b0299acf authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

check that ip is configured in envsetup

parent f6fcc8e3
No related branches found
No related tags found
No related merge requests found
......@@ -116,7 +116,7 @@ def check_resolver(conf: dict, resolvers: set) -> tuple:
u.success("resolver {} configured".format(conf_resolver))
if not resolver_set:
u.info("no resolver defined in envsetup configuration, unable to test DNS")
u.info("no resolver defined in envsetup")
exit(2)
return warnings, errors
......@@ -126,7 +126,7 @@ def main():
print("Check DNS settings:")
if not supported_platform():
u.info("Platform not supported")
u.info("platform not supported")
exit(2)
warnings = 0
......@@ -147,6 +147,10 @@ def main():
("CM_SERVER_NAME", "mirismanager", "ubicast-skyreach"),
)
if not ip:
u.info("no ip address defined in envsetup")
exit(2)
for conf_name, default_domain, package in services_info:
domain = conf.get(conf_name)
resolution_ignored = conf.get("TESTER_DNS_RESOLUTION_IGNORED", "").split(",")
......@@ -157,7 +161,7 @@ def main():
):
# check that the service is installed on this system
status, _ = subprocess.getstatusoutput("dpkg -s {}".format(package))
if status == 0:
if status == 0 and ip:
u.info("resolving {}".format(domain))
check_dns_warn, check_dns_err = check_dns(domain, ip, resolvers)
if check_dns_err:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment