Commit 5197a9be authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Rafael Monnerat

fix getting option create_tun, fix test failing on cpuset_path

parent a696c6b2
...@@ -468,7 +468,7 @@ class Computer(object): ...@@ -468,7 +468,7 @@ class Computer(object):
user=user, user=user,
address_list=address_list, address_list=address_list,
tap=tap, tap=tap,
tun=tun if conf.create_tun else None, tun=tun if config.create_tun else None,
external_storage_list=external_storage_list, external_storage_list=external_storage_list,
) )
...@@ -1516,6 +1516,8 @@ class FormatConfig(object): ...@@ -1516,6 +1516,8 @@ class FormatConfig(object):
self.software_user = 'slapsoft' self.software_user = 'slapsoft'
if self.create_tap is None: if self.create_tap is None:
self.create_tap = True self.create_tap = True
if self.create_tun is None:
self.create_tun = False
if self.tap_gateway_interface is None: if self.tap_gateway_interface is None:
self.tap_gateway_interface = '' self.tap_gateway_interface = ''
if self.use_unique_local_address_block is None: if self.use_unique_local_address_block is None:
......
...@@ -41,7 +41,7 @@ class Manager(object): ...@@ -41,7 +41,7 @@ class Manager(object):
- Those folders are "/sys/fs/cgroup/cpuset/cpu<N>". - Those folders are "/sys/fs/cgroup/cpuset/cpu<N>".
""" """
if not os.path.exists("/sys/fs/cgroup/cpuset/cpuset.cpus"): if not os.path.exists(os.path.join(self.cpuset_path, "cpuset.cpus")):
logger.warning("CPUSet Manager cannot format computer because cgroups do not exist.") logger.warning("CPUSet Manager cannot format computer because cgroups do not exist.")
return return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment