From de7881992bc95a9b5fb4e6a9151edbd51da2be83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:06:47 +0000 Subject: [PATCH 01/10] Bump gevent from 21.12.0 to 23.9.1 Bumps [gevent](https://github.com/gevent/gevent) from 21.12.0 to 23.9.1. - [Release notes](https://github.com/gevent/gevent/releases) - [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst) - [Commits](https://github.com/gevent/gevent/compare/21.12.0...23.9.1) --- updated-dependencies: - dependency-name: gevent dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 335cecf5..7e2a5216 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ Flask-JWT-Extended==4.4.4 flask-restx==1.0.5 flask==2.2.5 Flask-SocketIO==5.3.1 -gevent==21.12.0 +gevent==23.9.1 GitPython==3.1.35 mypy==0.971 mypy-extensions==0.4.3 From 6fd8f1f01ae8fbf99eca8761fb789983531829a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 20:57:58 +0000 Subject: [PATCH 02/10] Bump gitpython from 3.1.35 to 3.1.37 Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.35 to 3.1.37. - [Release notes](https://github.com/gitpython-developers/GitPython/releases) - [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES) - [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.35...3.1.37) --- updated-dependencies: - dependency-name: gitpython dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 335cecf5..a59b42b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ flask-restx==1.0.5 flask==2.2.5 Flask-SocketIO==5.3.1 gevent==21.12.0 -GitPython==3.1.35 +GitPython==3.1.37 mypy==0.971 mypy-extensions==0.4.3 markupsafe==2.1.1 From 4ee686d61938d60d38103fd4d6b5e4bb621779ac Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Wed, 1 Nov 2023 12:32:02 +0100 Subject: [PATCH 03/10] commit_message not implemented on napalm EOS driver, causes error with commit_mode 0. don't wait for rollback on commit mode 0 --- src/cnaas_nms/devicehandler/sync_devices.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cnaas_nms/devicehandler/sync_devices.py b/src/cnaas_nms/devicehandler/sync_devices.py index 0ab32ecc..87726f09 100644 --- a/src/cnaas_nms/devicehandler/sync_devices.py +++ b/src/cnaas_nms/devicehandler/sync_devices.py @@ -546,7 +546,6 @@ def push_sync_device( "replace": True, "configuration": task.host["config"], "dry_run": dry_run, - "commit_message": "Job id {}".format(job_id), } if dry_run: task_args["task"] = napalm_configure @@ -949,11 +948,12 @@ def sync_devices( dev.last_seen = datetime.datetime.utcnow() if not dry_run and get_confirm_mode(confirm_mode_override) != 2: if failed_hosts: - logger.error( - "One or more devices failed to commit configuration, they will roll back configuration" - " in {}s: {}".format(api_settings.COMMIT_CONFIRMED_TIMEOUT, ", ".join(failed_hosts)) - ) - time.sleep(api_settings.COMMIT_CONFIRMED_TIMEOUT) + if get_confirm_mode(confirm_mode_override) == 1: + logger.error( + "One or more devices failed to commit configuration, they will roll back configuration" + " in {}s: {}".format(api_settings.COMMIT_CONFIRMED_TIMEOUT, ", ".join(failed_hosts)) + ) + time.sleep(api_settings.COMMIT_CONFIRMED_TIMEOUT) logger.info("Releasing lock for devices from syncto job: {}".format(job_id)) Joblock.release_lock(session, job_id=job_id) From aceacd6d3e11152a95c76f429f05e8805cb321ba Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Thu, 2 Nov 2023 09:20:38 +0100 Subject: [PATCH 04/10] Make if logic simpler --- src/cnaas_nms/devicehandler/sync_devices.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/cnaas_nms/devicehandler/sync_devices.py b/src/cnaas_nms/devicehandler/sync_devices.py index 87726f09..b0b93cf9 100644 --- a/src/cnaas_nms/devicehandler/sync_devices.py +++ b/src/cnaas_nms/devicehandler/sync_devices.py @@ -947,13 +947,12 @@ def sync_devices( remove_sync_events(hostname) dev.last_seen = datetime.datetime.utcnow() if not dry_run and get_confirm_mode(confirm_mode_override) != 2: - if failed_hosts: - if get_confirm_mode(confirm_mode_override) == 1: - logger.error( - "One or more devices failed to commit configuration, they will roll back configuration" - " in {}s: {}".format(api_settings.COMMIT_CONFIRMED_TIMEOUT, ", ".join(failed_hosts)) - ) - time.sleep(api_settings.COMMIT_CONFIRMED_TIMEOUT) + if failed_hosts and get_confirm_mode(confirm_mode_override) == 1: + logger.error( + "One or more devices failed to commit configuration, they will roll back configuration" + " in {}s: {}".format(api_settings.COMMIT_CONFIRMED_TIMEOUT, ", ".join(failed_hosts)) + ) + time.sleep(api_settings.COMMIT_CONFIRMED_TIMEOUT) logger.info("Releasing lock for devices from syncto job: {}".format(job_id)) Joblock.release_lock(session, job_id=job_id) From 137502fe769f21856c098e86ffd2aea726e739ae Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Mon, 6 Nov 2023 09:52:30 +0100 Subject: [PATCH 05/10] Change documentation text for redundant_link to make it more understandable --- docs/apiref/interfaces.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/apiref/interfaces.rst b/docs/apiref/interfaces.rst index 44899740..a001226c 100644 --- a/docs/apiref/interfaces.rst +++ b/docs/apiref/interfaces.rst @@ -149,7 +149,8 @@ Data can contain any of these optional keys: - aggregate_id: Identifier for configuring LACP etc. Integer value. Special value -1 means configure MLAG and use ID based on indexnum. - bpdu_filter: bool defining STP BPDU feature enabled/disabled -- redundant_link: bool allows specifying if this link allows non-redundant downlinks +- redundant_link: bool specifying if access switch connections to this interface requires + redundant connections, which is the default. Set to false to allow non-redundant downlink. - tags: List of strings, user-defined custom tags to use in templates - cli_append_str: String of custom config that is appended to generated CLI config - neighbor: Populated at init, contains hostname of peer. Should normally never From 4dbb55c1039acc4ba9f3150189276d41fc5e10f3 Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Mon, 6 Nov 2023 09:55:31 +0100 Subject: [PATCH 06/10] changelog v1.5.1 --- docs/changelog/index.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/changelog/index.rst b/docs/changelog/index.rst index 3b9e6c42..d3dfaaf5 100644 --- a/docs/changelog/index.rst +++ b/docs/changelog/index.rst @@ -1,6 +1,14 @@ Changelog ========= +Version 1.5.1 +------------- + +Bug fixes: + + - Fix commit confirm mode 0 for EOS + - Update documentation for redundant_link + Version 1.5.0 ------------- From d7c8865510b150b727c4b53140fde8c91cb3bf78 Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Mon, 6 Nov 2023 10:24:08 +0100 Subject: [PATCH 07/10] Update requirements.txt 22.10 suggested for python3.7 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 50bce23a..b6bc9c9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ Flask-JWT-Extended==4.4.4 flask-restx==1.0.5 flask==2.2.5 Flask-SocketIO==5.3.1 -gevent==23.9.1 +gevent==22.10 GitPython==3.1.37 mypy==0.971 mypy-extensions==0.4.3 From 883193d1c139aa9f6f427cdb14c82ab871e3f6d9 Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Mon, 6 Nov 2023 10:31:43 +0100 Subject: [PATCH 08/10] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b6bc9c9f..d1153939 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ Flask-JWT-Extended==4.4.4 flask-restx==1.0.5 flask==2.2.5 Flask-SocketIO==5.3.1 -gevent==22.10 +gevent==22.10.2 GitPython==3.1.37 mypy==0.971 mypy-extensions==0.4.3 From 2a2a1739c03714af1d01362653ceb7a0bdeff4ce Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Mon, 6 Nov 2023 10:39:09 +0100 Subject: [PATCH 09/10] update to compatible version of greenlet --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d1153939..3bc2accf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,4 +32,4 @@ sqlalchemy-stubs==0.4 SQLAlchemy-Utils==0.38.3 pydantic==1.10.2 Werkzeug==2.2.3 -greenlet==1.1.3 +greenlet==3.0.1 From cedd1d7aa69da75ebb6a596f94fe31d89a90181f Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Tue, 14 Nov 2023 13:32:24 +0100 Subject: [PATCH 10/10] has not been used for a while --- .jenkins.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.jenkins.yaml b/.jenkins.yaml index ee18d9b8..dc8f0a2c 100644 --- a/.jenkins.yaml +++ b/.jenkins.yaml @@ -16,7 +16,6 @@ git: shallow_clone: true script: - - "ssh root@puckly.sunet.se /root/starttests.sh ${GIT_BRANCH}" # - "python3.7 -m venv venv" # - ". venv/bin/activate" # - "pip install --upgrade setuptools pip wheel mypy"