Upon using the cisco.nxos.nxos_config module with a template the router-id command under router bgp after initial configuration gives 'surrogate_then_replace' error. #817
When trying to apply router-id to the router bgp configuration of a Nexus device the initial configuration works without issue. Upon running the playbook a 2nd time the playbook fails with an error about the router-id. The error states 'surrogate_then_replace'.
The full traceback is:
File "/usr/local/lib/python3.10/dist-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py", line 143, in load_config
resp = connection.edit_config(config, replace=replace)
File "/usr/local/lib/python3.10/dist-packages/ansible/module_utils/connection.py", line 200, in rpc
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [10.122.191.190]: FAILED! => changed=false
SUMMARY
When trying to apply router-id to the router bgp configuration of a Nexus device the initial configuration works without issue. Upon running the playbook a 2nd time the playbook fails with an error about the router-id. The error states 'surrogate_then_replace'. The full traceback is: File "/usr/local/lib/python3.10/dist-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py", line 143, in load_config resp = connection.edit_config(config, replace=replace) File "/usr/local/lib/python3.10/dist-packages/ansible/module_utils/connection.py", line 200, in rpc raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code) fatal: [10.122.191.190]: FAILED! => changed=false
ISSUE TYPE
COMPONENT NAME
nxos_config
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Operating System: Linux Mint 21.2 Kernel: Linux 5.15.0-91-generic Architecture: x86-64 Hardware Vendor: VMware, Inc. Hardware Model: VMware Virtual Platform Software BIOS: version 01.23 NXOS: version 10.4(2) [Feature Release] BIOS compile time: 05/17/2022 NXOS image file is: bootflash:///nxos64-msll.10.4.2.F.bin NXOS compile time: 11/30/2023 12:00:00 [12/14/2023 05:40:33]
Hardware cisco Nexus3000 N3K-C36180YC-R Chassis Intel(R) Xeon(R) CPU D-1528 @ 1.90GHz with 32776960 kB of memory. Processor Board ID bootflash: 115805708 kB
STEPS TO REPRODUCE
EXPECTED RESULTS
Ansible should either output no changes required or occasionally does reapply some of the configuration. It should not fail.
ACTUAL RESULTS