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)