You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a couple of qfx5120-48y-8c devices that for some reason are reporting "mgd: statement has no contents; ignored" when making changes to protocols.
So, here is the full "test.yml" playbook I was using, with code comments to annotate the results in each case:
-
hosts: test-router
gather_facts: false
tasks:
-
name: Deploy configuration
connection: netconf
diff: yes
junipernetworks.junos.junos_config:
update: replace
src_format: text
#
# One config piece at a time Testing
#
# src: ./test-chassis.config # NO diff: https://github.com/ansible-collections/junipernetworks.junos/issues/534
# src: ./test-firewall.config # Works
# src: ./test-interfaces.config # Works
# src: ./test-forwarding-options.config # Works
# src: ./test-policy-options.config # Works
# src: ./test-protocols.config # WARNING, but also DOES SHOW DIFF
# src: ./test-routing-options.config # Works
# src: ./test-snmp.config # Works
# src: ./test-system.config # Works
# src: ./test-vlans.config # Works
#
# Groups of config Testing
#
# src: ./test-only-chassis-and-protocols.config # WARNING, and also NO diff
# src: ./test-all-except-chassis-and-protocols.config # Works
# src: ./test-all.config # WARNING, and also NO diff
# src: ./test-all-except-chassis.config # WARNING, but also DOES SHOW DIFF
#
# Testing that resulted in ONLY WARNING (but still DOES SHOW DIFF)
#
src: ./test-protocols.config # WARNING, but also DOES SHOW DIFF
#
# Testing that resulted in NO diff (but also *DOES NOT PRODUCE WARNING*)
#
# src: ./test-chassis.config # NO diff: https://github.com/ansible-collections/junipernetworks.junos/issues/534
#
# Testing that resulted in WARNING and also NO diff
#
# src: ./test-only-chassis-and-protocols.config # WARNING, and also NO diff
# src: ./test-all.config # WARNING, and also NO diff
The text was updated successfully, but these errors were encountered:
From a triage perspective, issue #534 is a major concern for my team -- if you are in a space of triaging issues, we would like #534 to be a top priority and #535 to be a lower priority!
Use the juniper.device.config Ansible module (instead of the junipernetworks.junos.junos_config Ansible Module.)
That juniper.device.config Ansible Module does require using the "ignore_warnings" option to workaround this issue. Our Ansible Task now looks something like the following:
-
name: Deploy configuration
connection: local
juniper.device.config:
src: "{{ config_path }}"
load: replace
ignore_warnings:
- 'mgd: statement has no contents'
format: text
SUMMARY
We have a couple of qfx5120-48y-8c devices that for some reason are reporting "mgd: statement has no contents; ignored" when making changes to protocols.
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Target System Information
Target System Software
STEPS TO REPRODUCE
The simplest way to reproduce the bug I am seeing is with the following "test.yml" playbook:
This "test.yml" playbook references a "test-protocols.config" file, which is quite lengthy and contains private info.
EXPECTED RESULTS
Should see a 'diff' and no WARNING.
ACTUAL RESULTS
The diff shows well enough, but there is a concerning warning printed after the diff: "[WARNING]: mgd: statement has no contents; ignored"
Additional Info
As some additional info, I spent a long time bisecting the config to pinpoint this issue along with junos_config not showing diff for chassis changes #534.
So, here is the full "test.yml" playbook I was using, with code comments to annotate the results in each case:
The text was updated successfully, but these errors were encountered: