Hi,
while looking at Nmstate logs after failures I noticed that Nmstate uses checkpoints in the tear-up phase of integration tests. Therefore, if something fails inside the mainloopo in the tear-up phase, all tear-up progress is reverted instead of keeping at least the removed bits removed. Am I missing something?
My idea for the easiest/cleanest solution would be to just issue "nmcli c d $interface; nmclid d $interface (if it is not eth1/eth2)" and ignoring the returncode for all interfaces that are touched in a test as the tear-up code. Since Nmstate also stores routes and DNS information in the respective profiles, this should properly clean it up with the better working nmcli code.
What do you think?
Kind regards Till
Hi,
I do not see a reply to my e-mail. Please think about it and let me know.
Kind regards Till
Am Do., 12. Dez. 2019 um 22:14 Uhr schrieb Till Maas till@redhat.com:
Hi,
while looking at Nmstate logs after failures I noticed that Nmstate uses checkpoints in the tear-up phase of integration tests. Therefore, if something fails inside the mainloopo in the tear-up phase, all tear-up progress is reverted instead of keeping at least the removed bits removed. Am I missing something?
My idea for the easiest/cleanest solution would be to just issue "nmcli c d $interface; nmclid d $interface (if it is not eth1/eth2)" and ignoring the returncode for all interfaces that are touched in a test as the tear-up code. Since Nmstate also stores routes and DNS information in the respective profiles, this should properly clean it up with the better working nmcli code.
What do you think?
Kind regards Till
-- Till Maas He/His/Him Ansible RHEL Networking System Role Maintainer
Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Laurie Krebs, Michael O'Neill, Thomas Savage
On Thu, Dec 12, 2019 at 10:14:45PM +0100, Till Maas wrote:
Hi,
while looking at Nmstate logs after failures I noticed that Nmstate uses checkpoints in the tear-up phase of integration tests. Therefore, if something fails inside the mainloopo in the tear-up phase, all tear-up progress is reverted instead of keeping at least the removed bits removed. Am I missing something?
The design is ideal for user, not for test. To support case like this, we can add support of `skip_checkpoint` to `libnmstate.apply()`.
But,
All the tear up should using `verify_change=False` and expected not to fail. If there is a failure, we should look into it. From my memory, most of them are caused by OVS which is known issue.
My idea for the easiest/cleanest solution would be to just issue "nmcli c d $interface; nmclid d $interface (if it is not eth1/eth2)" and ignoring the returncode for all interfaces that are touched in a test as the tear-up code. Since Nmstate also stores routes and DNS information in the respective profiles, this should properly clean it up with the better working nmcli code.
There was a patch from me doing: * store nmstate state before test and apply back after test. * use `nmcli c del` to delete test interfaces. But that was rejected by Edy about: * We are supposed to do clean in test also. * Doing so will hide the clean up leftover.
And I agree with Edy.
-- Till Maas
nmstate-devel@lists.fedorahosted.org