Feature/option create tun
Make create tun interface optional when slapformat runs. It can be enabled by setting option create_tun = True
in slapos configuration.
@rafael @katomaso I want to merge this change. A test is failing (I don't know if it was passing) it seems because of this line here: https://lab.nexedi.com/nexedi/slapos.core/blob/feature/option_create_tun/slapos/manager/cpuset.py#L44
On the machine where I run the test, this path don't exists, If I comment the test will succeed. any suggestions ?
I forgot to say, the failing test is this one: https://lab.nexedi.com/nexedi/slapos.core/blob/feature/option_create_tun/slapos/tests/slapformat.py#L754
@alain.takoudjou "On the machine where I run the test, this path don't exists, If I comment the test will succeed. any suggestions ?" > It is never a good idea remove an assert because it fail and you cannot tell why...
Edited by Rafael MonneratI think the check line should be:
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.") return
@katomaso can you confirm if this is OK ?
@alain.takoudjou you are right. Thank you for catching that one.
Added 1 commit:
- bc0a4167 - fix getting option create_tun, fix test failing on cpuset_path