We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I'm executing on Juniper "request chassis routing-engine master switch no-confirm" which kills the ssh/netconf connection (it's like a reboot)
After that command all the Juniper tasks raise "Not connected to NETCONF server". I think it is related to netconf not re-connecting after reboot
Bug Report
ansible_connection
ansible --version ansible [core 2.11.6] config file = None configured module search path = ['/home/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/xxx/python_envs/yyy-env/lib/python3.9/site-packages/ansible ansible collection location = /home/xxx/.ansible/collections:/usr/share/ansible/collections executable location = /home/xxx/python_envs/yyy-env/bin/ansible python version = 3.9.8 (main, Nov 11 2021, 10:03:58) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] jinja version = 3.0.3 $ ansible-galaxy collection list | grep jun junipernetworks.junos 2.6.0
ansible.cfg [persistent_connection] connect_timeout = 1800 command_timeout = 1800
$ ansible-config dump --only-changed COLLECTIONS_PATHS(/home/xxx/yyy-prj/yyy/ansible.cfg) = ['/home/xxx/python_envs/${BASE_ANSIBLE_ENV}-ans DEFAULT_LOG_PATH(/home/xxx/yyy-prj/yyy/ansible.cfg) = /home/xxx/yyy-prj/yyy/logs/l DEFAULT_ROLES_PATH(/home/xxx/yyy-prj/yyy/ansible.cfg) = ['/home/xxx/python_envs/${BASE_ANSIBLE_ENV}-an HOST_KEY_CHECKING(/home/xxx/yyy-prj/yyy/ansible.cfg) = False
$ more /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
Here there is my playbook
- name: "Upgrade procedure" hosts: "{{ ansible_host }}" connection: juniper.device.pyez gather_facts: no vars: ansible_connection: ansible.netcommon.netconf ansible_network_os: junipernetworks.junos.junos tasks: - junipernetworks.junos.junos_command: commands: request chassis routing-engine master switch check # ansible.module_utils.connection.ConnectionError: Unexpected session close - junipernetworks.junos.junos_command: commands: request chassis routing-engine master switch no-confirm ignore_errors: true - name: "Checking SSH connectivity" wait_for: host: "{{ ansible_host }}" port: 22 timeout: 900 delay: 60 - name: "Checking NETCONF connectivity" wait_for: host: "{{ ansible_host }}" port: 830 timeout: 60 - name: "Reset ssh/netconf connection" meta: reset_connection - name: "Wait for connection" wait_for_connection: timeout: 60 - junipernetworks.junos.junos_command: commands: request chassis routing-engine master switch check --> msg: Not connected to NETCONF server
Restore Netconf connection
msg: Not connected to NETCONF server
The text was updated successfully, but these errors were encountered:
rohitthakur2590
Successfully merging a pull request may close this issue.
Summary
Hello,
I'm executing on Juniper "request chassis routing-engine master switch no-confirm" which kills the ssh/netconf connection (it's like a reboot)
After that command all the Juniper tasks raise "Not connected to NETCONF server".
I think it is related to netconf not re-connecting after reboot
Issue Type
Bug Report
Component Name
ansible_connection
Ansible Version
Configuration
OS / Environment
$ more /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
Steps to Reproduce
Here there is my playbook
Expected Results
Restore Netconf connection
Actual Results
msg: Not connected to NETCONF server
Code of Conduct
The text was updated successfully, but these errors were encountered: