Comment 5 for bug 1403455

Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

Ok, a possible design for this, considering separate repos, and avoiding the need to directly modify netns for every new service to be handled, with a fallback plan:

1) Use stevedore HookManager to let out-of-tree repos register netns prefixes declaration, and netns cleaners,
    so every piece of code (in-tree or out-of-tree) declare which netns prefixes they use, and provide a netns cleanup
    hook to be called.
2) Before cleaning a namespace blindly in the end, identify any network service in the namespace (via netstat), kill those processes, so they aren't orphaned, and then, kill the namespace.

An ERROR log would be thrown for any unknown process left over, so we could easily identify that via tempest runs (via a final cleanup that fails when something unexpected is left-over).