ansible-junos-stdlib
ansible-junos-stdlib copied to clipboard
Unable to close the configuration: UnlockError
- name: "Get committed configuration"
juniper.device.config:
timeout: 120
retrieve: "committed"
format: "set"
dest_dir: "{{ playbook_dir }}/roles/junos_config/files/configs/set"
register: response
Unable to close the configuration: UnlockError'
<rpc>
<unlock-configuration/>
</rpc><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/20.2R0/junos">
<rpc-error>
<error-type>protocol</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>
Configuration database is not open
</error-message>
</rpc-error>
<rpc>
<open-configuration>
<private/>
</open-configuration>
</rpc></rpc-reply>
]]>]]>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/20.2R0/junos">
<rpc>
<unlock-configuration/>
</rpc></rpc-reply>
]]>]]>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/20.2R0/junos">
<rpc>
<close-session/>
</rpc></rpc-reply>
]]>]]>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/20.2R0/junos">
<ok/>
</rpc-reply>
]]>]]>
<!-- session end at 2021-11-23 18:32:04 UTC -->
I'm running this playbook against my entire inventory only this one device is produces the error.
Model: ex4300-48t
Junos: 20.2R3.9
JUNOS EX Software Suite [20.2R3.9]
JUNOS FIPS mode utilities [20.2R3.9]
JUNOS Crypto Software Suite [20.2R3.9]
JUNOS Online Documentation [20.2R3.9]
JUNOS Phone-Home Software Suite [20.2R3.9]
JUNOS jsd [powerpc-20.2R3.9-jet-1]
JUNOS SDN Software Suite [20.2R3.9]
JUNOS EX 4300 Software Suite [20.2R3.9]
JUNOS Web Management Platform Package [20.2R3.9]
JUNOS py-base-powerpc [20.2R3.9]
JUNOS py-base2-powerpc [20.2R3.9]
JUNOS py-extensions-powerpc [20.2R3.9]
JUNOS py-extensions2-powerpc [20.2R3.9]
REST API Software Suite [20.2R3.9]
@rahkumar651991 any idea here?
Few months late, but I rate into the same issue. My problem was I was attempting to run my playbook against a device that was configured to be a line-card
role in a virtual-chassis. Ran it against the master and it worked.
@michaelmcdonald thanks for that, looks like it's not the case here.
`[email protected]> show virtual-chassis status
Virtual Chassis ID: 211f.5f43.74f6 Virtual Chassis Mode: Enabled Mstr Mixed Route Neighbor List Member ID Status Serial No Model prio Role Mode Mode ID Interface 0 (FPC 0) Prsnt *********** ex4300-48p 128 Master* N VC`
@holynakamoto Kindly confirm MGD process is up and running in the device. This could be some device issue where the MGD database got corrupted or MGD is busy committing other configurations.