Mentions légales du service

Skip to content

g5k: Fix adding nodes in global kavlan, add error handling

JONGLEZ Baptiste requested to merge bjonglez/enoslib:fix_global_kavlan into main

Enoslib was silently failing to add nodes in a global kavlan when the nodes and the kavlan belong to a different site.

The root cause is that we need to call the Kavlan API on the site of the nodes, not on the site of the Kavlan. For a normal Kavlan it amounts to the same thing, but for a global Kavlan the sites can be different.

To fix future silent failures, also check output of kavlan API and add error handling. For now we simply throw an exception if one of the nodes couldn't be added to the Kavlan. As a future improvement, we could add a retry mechanism, similarly to what we do for deployments.

Merge request reports