X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestBonding.py;h=0a2747cc5358c915b451d75e5b35670007432d69;hb=5a14307d3e7b6d7d79245f9f2b907394190ecfef;hp=d9d8c1d08c09b9a51992e258dbcc7a2d30462388;hpb=6f9cfa7ae380b6582f2ef85b39d01399093baf11;p=tests.git diff --git a/system/TestBonding.py b/system/TestBonding.py index d9d8c1d..0a2747c 100644 --- a/system/TestBonding.py +++ b/system/TestBonding.py @@ -49,6 +49,7 @@ def onelab_bonding_spec (buildname): #################### import os, os.path +import socket import utils from TestSsh import TestSsh @@ -86,15 +87,17 @@ class TestBonding(object): return "{pldistro}-{fcdistro}-{arch}".format(**self.bonding_spec) #################### provisioning + # store only hostname so it's either to set this manually def persistent_name(self): return "arg-bonding-{}".format(self.bonding_spec['buildname']) def persistent_store(self): with open(self.persistent_name(),'w') as f: - f.write("{} {}\n".format(self.vnode_hostname, self.vnode_ip)) + f.write("{}\n".format(self.vnode_hostname)) def persistent_load(self): try: with open(self.persistent_name()) as f: - self.vnode_hostname, self.vnode_ip = f.read().strip().split() + self.vnode_hostname = f.read().strip().split()[0] + self.vnode_ip = socket.gethostbyname(self.vnode_hostname) return True except: return False @@ -127,6 +130,8 @@ class TestBonding(object): # with the node flavour that goes with bonding plc for tag in ['arch', 'fcdistro', 'pldistro']: node_spec['tags'][tag] = self.bonding_spec[tag] + # do not use plain bootstrapfs + del node_spec['tags']['plain-bootstrapfs'] #################### steps def init_partial(self):