arista.eos icon indicating copy to clipboard operation
arista.eos copied to clipboard

Adding a new feature to use commit timer

Open veyloster opened this issue 1 year ago • 15 comments

SUMMARY

This is about adding a new feature to use commit timer when deploying new config. Right now there's no option to use it and this is a good mechanism to rollback if a bad configuration is pushed.

ISSUE TYPE

  • Feature Pull Request

ADDITIONAL INFORMATION

Adding a new timer field in the eos_config module which let you set how long you want it to be (Ex: 1m, 30s ...) You then need to combine this with another task to commit the ansible session. Other task can be added in between like doing an ssh reset to make sure the device is still reachable after getting the new config.

veyloster avatar May 02 '23 14:05 veyloster

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/14f317caa1b04898a7f9ebf6107461a1

:x: ansible-test-network-integration-eos-httpapi-python39-stable214 FAILURE in 42m 05s :x: ansible-test-network-integration-eos-httpapi-python39-stable213 FAILURE in 46m 54s :x: ansible-test-network-integration-eos-httpapi-python39-stable212 FAILURE in 46m 54s :x: ansible-test-network-integration-eos-httpapi-python39-stable211 FAILURE in 38m 40s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 36m 53s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 39m 05s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 38m 12s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 38m 33s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 36m 25s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 38m 04s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 37m 28s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 37m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 31m 15s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 43m 39s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 32m 04s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 43m 03s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 32m 42s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 43m 47s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 31m 58s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 44m 00s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 8m 57s :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 49s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 32s

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/8cf6e6958dce40b49ef507e85e505657

:x: ansible-test-network-integration-eos-httpapi-python39-stable214 FAILURE in 38m 02s :x: ansible-test-network-integration-eos-httpapi-python39-stable213 FAILURE in 34m 06s :x: ansible-test-network-integration-eos-httpapi-python39-stable212 FAILURE in 34m 02s :x: ansible-test-network-integration-eos-httpapi-python39-stable211 FAILURE in 34m 46s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 42m 13s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 34m 24s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 50m 28s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 33m 13s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 43m 55s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 32m 36s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 46m 53s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 33m 44s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 48m 18s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 32m 43s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 31m 14s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 32m 36s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 31m 49s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 32m 40s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 RETRY_LIMIT in 1m 07s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 32m 51s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 8m 44s :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 43s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 41s

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/f14239a4c74f4b5288e1e6e8499ea91c

:x: ansible-test-network-integration-eos-httpapi-python39-stable214 FAILURE in 42m 45s :x: ansible-test-network-integration-eos-httpapi-python39-stable213 FAILURE in 33m 53s :x: ansible-test-network-integration-eos-httpapi-python39-stable212 FAILURE in 34m 44s :x: ansible-test-network-integration-eos-httpapi-python39-stable211 FAILURE in 34m 00s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 31m 45s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 33m 21s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 31m 31s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 34m 48s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 32m 00s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 37m 24s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 31m 34s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 32m 42s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 34m 48s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 32m 53s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 36m 12s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 33m 56s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 32m 33s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 37m 45s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 35m 29s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 37m 52s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 8m 51s :heavy_check_mark: ansible-tox-linters SUCCESS in 11m 02s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 50s

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/e5184977400d4c8785324147c6cab324

:x: ansible-test-network-integration-eos-httpapi-python39-stable214 FAILURE in 39m 02s :x: ansible-test-network-integration-eos-httpapi-python39-stable213 FAILURE in 35m 57s :x: ansible-test-network-integration-eos-httpapi-python39-stable212 FAILURE in 37m 06s :x: ansible-test-network-integration-eos-httpapi-python39-stable211 FAILURE in 35m 50s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 32m 08s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 35m 42s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 37m 02s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 40m 20s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 31m 32s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 33m 39s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 31m 35s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 34m 45s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 31m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 33m 54s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 31m 15s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 39m 42s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 38m 09s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 39m 01s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 36m 58s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 32m 54s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 8m 33s :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 39s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 5m 36s

This fixes #375

sc68cal avatar Jul 11 '23 17:07 sc68cal

I think this is failing the tests because you only implemented support for the timer in just the HTTP API class. I think you also need to add it to the CLI class in plugins/cliconf/eos.py

sc68cal avatar Jul 12 '23 19:07 sc68cal

@veyloster if you are available I would like to connect and discuss. I am on the ansiblenetwork.slack.com slack

sc68cal avatar Jul 14 '23 14:07 sc68cal

@veyloster if you are available I would like to connect and discuss. I am on the ansiblenetwork.slack.com slack

He's on leave until next Tuesday - happy to help if you need

innerhippy avatar Jul 14 '23 14:07 innerhippy

@innerhippy @veyloster

I have opened https://github.com/veyloster/arista.eos/pull/5 in your fork

sc68cal avatar Jul 18 '23 16:07 sc68cal

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/f692dbd509ae43a2a1016b9b3259fa8b

:x: ansible-test-network-integration-eos-httpapi-python39-stable214 FAILURE in 36m 49s :x: ansible-test-network-integration-eos-httpapi-python39-stable213 FAILURE in 34m 12s :x: ansible-test-network-integration-eos-httpapi-python39-stable212 FAILURE in 33m 28s :x: ansible-test-network-integration-eos-httpapi-python39-stable211 FAILURE in 39m 58s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 35m 07s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 RETRY_LIMIT in 1m 05s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 35m 20s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 32m 43s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 32m 55s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 33m 15s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 38m 00s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 32m 25s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 38m 03s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 33m 07s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 32m 30s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 33m 20s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 RETRY_LIMIT in 1m 36s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 34m 20s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 31m 44s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 32m 43s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 8m 41s :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 43s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 43s

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/03c8b98150994854b0125a815963b386

:x: ansible-test-network-integration-eos-httpapi-python39-stable214 FAILURE in 38m 04s :x: ansible-test-network-integration-eos-httpapi-python39-stable213 FAILURE in 38m 57s :x: ansible-test-network-integration-eos-httpapi-python39-stable212 FAILURE in 39m 42s :x: ansible-test-network-integration-eos-httpapi-python39-stable211 FAILURE in 39m 10s :x: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 FAILURE in 27m 37s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 FAILURE in 31m 59s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 FAILURE in 27m 58s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 FAILURE in 36m 40s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 FAILURE in 32m 08s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 RETRY_LIMIT in 5m 34s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 FAILURE in 33m 11s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 FAILURE in 30m 55s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 RETRY_LIMIT in 5m 04s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 FAILURE in 31m 41s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 RETRY_LIMIT in 5m 39s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 FAILURE in 31m 32s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 FAILURE in 27m 26s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 FAILURE in 31m 13s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 FAILURE in 27m 56s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 FAILURE in 32m 13s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 8m 49s :x: ansible-tox-linters FAILURE in 10m 43s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 37s

Looks like I goofed on my PR, let me fix

sc68cal avatar Jul 22 '23 00:07 sc68cal

Failure is due to referencing self in non class function

innerhippy avatar Jul 22 '23 19:07 innerhippy

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/b9dab26e2a38402e9bbd5ddc950c6ada

:x: ansible-test-network-integration-eos-httpapi-python39-stable214 FAILURE in 12m 36s :x: ansible-test-network-integration-eos-httpapi-python39-stable213 FAILURE in 13m 48s :x: ansible-test-network-integration-eos-httpapi-python39-stable212 FAILURE in 13m 32s :x: ansible-test-network-integration-eos-httpapi-python39-stable211 FAILURE in 13m 36s :x: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 FAILURE in 11m 37s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 FAILURE in 12m 12s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 FAILURE in 12m 07s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 FAILURE in 12m 03s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 FAILURE in 13m 08s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 FAILURE in 12m 33s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 FAILURE in 11m 16s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 FAILURE in 11m 34s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 FAILURE in 11m 09s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 FAILURE in 11m 44s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 FAILURE in 11m 36s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 FAILURE in 11m 34s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 FAILURE in 11m 36s (non-voting) :x: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 FAILURE in 11m 57s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 FAILURE in 11m 20s (non-voting) :x: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 FAILURE in 11m 47s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 9m 44s :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 47s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 19s

@veyloster thanks for the work on this feature, I would like to bring more inputs to this, With this approach if any existing(legacy or resource modules) or new modules want to use this feature we need to expose the timer ; An alternate approach could be having this part of cliconf as an option, which makes it accessible to other modules like eos_banner, user, etc (the ones that are seeing integration test failures).

rohitthakur2590 avatar Aug 24 '23 10:08 rohitthakur2590