from TestBonding import TestBonding
+from gethostbyaddr import workaround_gethostbyaddr
+
has_sfa_cache_filename="sfa-cache"
# step methods must take (self) and return a boolean (options is a member of the class)
# warning, we're now building 'sface' so let's be a bit more picky
# full builds are expected to return with 0 here
utils.header("Checking if build provides SFA package...")
- retcod = utils.system("curl --silent {}/ | grep -q sfa-".format(rpms_url)) == 0
+ retcod = utils.system("curl --silent {}/ | grep -q sfa-4".format(rpms_url)) == 0
encoded = 'yes' if retcod else 'no'
with open(has_sfa_cache_filename,'w') as cache:
cache.write(encoded)
script_options += " -f {}".format(self.options.fcdistro)
script_options += " -r {}".format(repo_url)
vserver_name = self.vservername
- try:
- vserver_hostname = socket.gethostbyaddr(self.vserverip)[0]
- script_options += " -n {}".format(vserver_hostname)
- except:
+ vserver_hostname = workaround_gethostbyaddr(self.vserverip)
+ if not vserver_hostname:
print("Cannot reverse lookup {}".format(self.vserverip))
print("This is considered fatal, as this might pollute the test results")
return False
+ script_options += " -n {}".format(vserver_hostname)
create_vserver="{build_dir}/{script} {script_options} {vserver_name}".format(**locals())
return self.run_in_host(create_vserver) == 0