Closed eregimbald closed 1 year ago
[eregimbald@bos-ansible1 network-ansible]$ ansible-playbook software-update.yml -vvvv
ansible-playbook 2.4.2.0
config file = /ansible/network-ansible/ansible.cfg
configured module search path = [u'/home/eregimbald/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
Using /ansible/network-ansible/ansible.cfg as config file
setting up inventory plugins
Parsed /ansible/network-ansible/fuze.hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
Loading callback plugin jsnapy of type aggregate, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: software-update.yml **************************************************************************************
1 plays in software-update.yml
Enter host or inventory group: rtr-bdr-sin*
PLAY [Software Update] *********************************************************************************************
META: ran handlers
TASK [include_role] ************************************************************************************************
task path: /ansible/network-ansible/software-update.yml:22
TASK [include_role] ************************************************************************************************
task path: /ansible/network-ansible/software-update.yml:24
TASK [base/workcomplete : Sending a Slack notification] ************************************************************
task path: /ansible/network-ansible/roles/base/workcomplete/tasks/main.yml:4
Using module file /usr/lib/python2.7/site-packages/ansible/modules/notification/slack.py
<rtr-bdr-sin2> ESTABLISH LOCAL CONNECTION FOR USER: eregimbald
<rtr-bdr-sin2> EXEC /bin/sh -c 'echo ~ && sleep 0'
<rtr-bdr-sin2> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/eregimbald/.ansible/tmp/ansible-tmp-1529612384.33-95472209651165 `" && echo ansible-tmp-1529612384.33-95472209651165="` echo /home/eregimbald/.ansible/tmp/ansible-tmp-1529612384.33-95472209651165 `" ) && sleep 0'
<rtr-bdr-sin2> PUT /tmp/tmpJnN6NY TO /home/eregimbald/.ansible/tmp/ansible-tmp-1529612384.33-95472209651165/slack.py
<rtr-bdr-sin2> EXEC /bin/sh -c 'chmod u+x /home/eregimbald/.ansible/tmp/ansible-tmp-1529612384.33-95472209651165/ /home/eregimbald/.ansible/tmp/ansible-tmp-1529612384.33-95472209651165/slack.py && sleep 0'
<rtr-bdr-sin2> EXEC /bin/sh -c '/usr/bin/python /home/eregimbald/.ansible/tmp/ansible-tmp-1529612384.33-95472209651165/slack.py; rm -rf "/home/eregimbald/.ansible/tmp/ansible-tmp-1529612384.33-95472209651165/" > /dev/null 2>&1 && sleep 0'
ok: [rtr-bdr-sin2] => {
"changed": false,
"invocation": {
"module_args": {
"attachments": null,
"channel": null,
"color": "normal",
"domain": null,
"icon_emoji": ":ansible:",
"icon_url": "https://www.ansible.com/favicon.ico",
"link_names": 1,
"msg": "Ansible playbook *Software Update* deployed by `eregimbald` \n *Comment:* Updating firmware for rtr-bdr-sin*",
"parse": null,
"token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"username": "Ansibot",
"validate_certs": true
}
},
"msg": "OK"
}
TASK [Getting device facts] ****************************************************************************************
task path: /ansible/network-ansible/software-update.yml:26
Using module file /etc/ansible/roles/Juniper.junos/library/juniper_junos_facts.py
<rtr-bdr-sin2> ESTABLISH LOCAL CONNECTION FOR USER: eregimbald
<rtr-bdr-sin2> EXEC /bin/sh -c 'echo ~ && sleep 0'
<rtr-bdr-sin2> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/eregimbald/.ansible/tmp/ansible-tmp-1529612385.89-148048480337352 `" && echo ansible-tmp-1529612385.89-148048480337352="` echo /home/eregimbald/.ansible/tmp/ansible-tmp-1529612385.89-148048480337352 `" ) && sleep 0'
<rtr-bdr-sin2> PUT /tmp/tmpHm_Dxf TO /home/eregimbald/.ansible/tmp/ansible-tmp-1529612385.89-148048480337352/juniper_junos_facts.py
<rtr-bdr-sin2> EXEC /bin/sh -c 'chmod u+x /home/eregimbald/.ansible/tmp/ansible-tmp-1529612385.89-148048480337352/ /home/eregimbald/.ansible/tmp/ansible-tmp-1529612385.89-148048480337352/juniper_junos_facts.py && sleep 0'
<rtr-bdr-sin2> EXEC /bin/sh -c '/usr/bin/python /home/eregimbald/.ansible/tmp/ansible-tmp-1529612385.89-148048480337352/juniper_junos_facts.py; rm -rf "/home/eregimbald/.ansible/tmp/ansible-tmp-1529612385.89-148048480337352/" > /dev/null 2>&1 && sleep 0'
ok: [rtr-bdr-sin2] => {
"ansible_facts": {
"junos": {
"HOME": "/var/home/ansible",
"RE0": {
"last_reboot_reason": "Router rebooted after a normal shutdown.",
"mastership_state": "master",
"model": "RE-MX40-T",
"status": "OK",
"up_time": "2 days, 1 hour, 20 minutes, 51 seconds"
},
"RE1": null,
"RE_hw_mi": false,
"current_re": [
"re0",
"master",
"node",
"fwdd",
"member",
"pfem"
],
"domain": null,
"fqdn": "rtr-bdr-sin2",
"has_2RE": false,
"hostname": "rtr-bdr-sin2",
"hostname_info": {
"re0": "rtr-bdr-sin2"
},
"ifd_style": "CLASSIC",
"junos_info": {
"re0": {
"object": {
"build": 7,
"major": [
15,
1
],
"minor": "6",
"type": "R"
},
"text": "15.1R6.7"
}
},
"master": "RE0",
"master_state": true,
"model": "MX40-T",
"model_info": {
"re0": "MX40-T"
},
"personality": "MX",
"re_info": {
"default": {
"0": {
"last_reboot_reason": "Router rebooted after a normal shutdown.",
"mastership_state": "master",
"model": "RE-MX40-T",
"status": "OK"
},
"default": {
"last_reboot_reason": "Router rebooted after a normal shutdown.",
"mastership_state": "master",
"model": "RE-MX40-T",
"status": "OK"
}
}
},
"re_master": {
"default": "0"
},
"re_name": "re0",
"serialnumber": "BG947",
"srx_cluster": null,
"srx_cluster_id": null,
"srx_cluster_redundancy_group": null,
"switch_style": "BRIDGE_DOMAIN",
"vc_capable": false,
"vc_fabric": null,
"vc_master": null,
"vc_mode": null,
"version": "15.1R6.7",
"version_RE0": "15.1R6.7",
"version_RE1": null,
"version_info": {
"build": 7,
"major": [
15,
1
],
"minor": "6",
"type": "R"
},
"virtual": false
}
},
"changed": false,
"facts": {
"HOME": "/var/home/ansible",
"RE0": {
"last_reboot_reason": "Router rebooted after a normal shutdown.",
"mastership_state": "master",
"model": "RE-MX40-T",
"status": "OK",
"up_time": "2 days, 1 hour, 20 minutes, 51 seconds"
},
"RE1": null,
"RE_hw_mi": false,
"current_re": [
"re0",
"master",
"node",
"fwdd",
"member",
"pfem"
],
"domain": null,
"fqdn": "rtr-bdr-sin2",
"has_2RE": false,
"hostname": "rtr-bdr-sin2",
"hostname_info": {
"re0": "rtr-bdr-sin2"
},
"ifd_style": "CLASSIC",
"junos_info": {
"re0": {
"object": {
"build": 7,
"major": [
15,
1
],
"minor": "6",
"type": "R"
},
"text": "15.1R6.7"
}
},
"master": "RE0",
"master_state": true,
"model": "MX40-T",
"model_info": {
"re0": "MX40-T"
},
"personality": "MX",
"re_info": {
"default": {
"0": {
"last_reboot_reason": "Router rebooted after a normal shutdown.",
"mastership_state": "master",
"model": "RE-MX40-T",
"status": "OK"
},
"default": {
"last_reboot_reason": "Router rebooted after a normal shutdown.",
"mastership_state": "master",
"model": "RE-MX40-T",
"status": "OK"
}
}
},
"re_master": {
"default": "0"
},
"re_name": "re0",
"serialnumber": "BG947",
"srx_cluster": null,
"srx_cluster_id": null,
"srx_cluster_redundancy_group": null,
"switch_style": "BRIDGE_DOMAIN",
"vc_capable": false,
"vc_fabric": null,
"vc_master": null,
"vc_mode": null,
"version": "15.1R6.7",
"version_RE0": "15.1R6.7",
"version_RE1": null,
"version_info": {
"build": 7,
"major": [
15,
1
],
"minor": "6",
"type": "R"
},
"virtual": false
},
"invocation": {
"module_args": {
"attempts": null,
"baud": null,
"config_format": null,
"console": null,
"host": "rtr-bdr-sin2",
"logdir": null,
"logfile": null,
"mode": null,
"passwd": null,
"port": 830,
"provider": null,
"savedir": null,
"ssh_private_key_file": null,
"timeout": 30,
"user": "ansible"
}
}
}
TASK [debug] *******************************************************************************************************
task path: /ansible/network-ansible/software-update.yml:32
ok: [rtr-bdr-sin2] => {
"msg": "jinstall-ppc-15.1R7.8-export-signed.tgz"
}
TASK [Installing software package] *********************************************************************************
task path: /ansible/network-ansible/software-update.yml:34
Using module file /etc/ansible/roles/Juniper.junos/library/juniper_junos_software.py
<rtr-bdr-sin2> ESTABLISH LOCAL CONNECTION FOR USER: eregimbald
<rtr-bdr-sin2> EXEC /bin/sh -c 'echo ~ && sleep 0'
<rtr-bdr-sin2> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/eregimbald/.ansible/tmp/ansible-tmp-1529612392.18-25999831801916 `" && echo ansible-tmp-1529612392.18-25999831801916="` echo /home/eregimbald/.ansible/tmp/ansible-tmp-1529612392.18-25999831801916 `" ) && sleep 0'
<rtr-bdr-sin2> PUT /tmp/tmp9aZD41 TO /home/eregimbald/.ansible/tmp/ansible-tmp-1529612392.18-25999831801916/juniper_junos_software.py
<rtr-bdr-sin2> EXEC /bin/sh -c 'chmod u+x /home/eregimbald/.ansible/tmp/ansible-tmp-1529612392.18-25999831801916/ /home/eregimbald/.ansible/tmp/ansible-tmp-1529612392.18-25999831801916/juniper_junos_software.py && sleep 0'
<rtr-bdr-sin2> EXEC /bin/sh -c '/usr/bin/python /home/eregimbald/.ansible/tmp/ansible-tmp-1529612392.18-25999831801916/juniper_junos_software.py; rm -rf "/home/eregimbald/.ansible/tmp/ansible-tmp-1529612392.18-25999831801916/" > /dev/null 2>&1 && sleep 0'
fatal: [rtr-bdr-sin2]: FAILED! => {
"changed": false,
"module_stderr": "",
"module_stdout": "[rtr-bdr-sin2] computing checksum on local package: /ansible/network-ansible/library/packages/jinstall-ppc-15.1R7.8-export-signed.tgz\n[rtr-bdr-sin2] before copy, computing checksum on remote package: /var/tmp/jinstall-ppc-15.1R7.8-export-signed.tgz\nConnected (version 2.0, client OpenSSH_6.9)\nAuthentication (publickey) successful!\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 29114368 / 291139119 (10%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 58228736 / 291139119 (20%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 87343104 / 291139119 (30%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 116457472 / 291139119 (40%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 145571840 / 291139119 (50%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 174686208 / 291139119 (60%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 203800576 / 291139119 (70%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 232914944 / 291139119 (80%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 262029312 / 291139119 (90%)\n[rtr-bdr-sin2] jinstall-ppc-15.1R7.8-export-signed.tgz: 291139119 / 291139119 (100%)\n[rtr-bdr-sin2] after copy, computing checksum on remote package: /var/tmp/jinstall-ppc-15.1R7.8-export-signed.tgz\n[rtr-bdr-sin2] checksum check passed.\n[rtr-bdr-sin2] installing software ... please be patient ...\n\n{\"exception\": \" File \\\"/tmp/ansible_TyVf6M/ansible_module_juniper_junos_software.py\\\", line 701, in main\\n ok = junos_module.sw.install(**install_params)\\n File \\\"/usr/lib/python2.7/site-packages/jnpr/junos/utils/sw.py\\\", line 891, in install\\n **kwargs)\\n File \\\"/usr/lib/python2.7/site-packages/jnpr/junos/utils/sw.py\\\", line 235, in pkgadd\\n rsp = self.rpc.request_package_add(**args)\\n File \\\"/usr/lib/python2.7/site-packages/jnpr/junos/rpcmeta.py\\\", line 345, in _exec_rpc\\n return self._junos.execute(rpc, **dec_args)\\n File \\\"/usr/lib/python2.7/site-packages/jnpr/junos/decorators.py\\\", line 76, in wrapper\\n return function(*args, **kwargs)\\n File \\\"/usr/lib/python2.7/site-packages/jnpr/junos/decorators.py\\\", line 23, in wrapper\\n result = function(*args, **kwargs)\\n File \\\"/usr/lib/python2.7/site-packages/jnpr/junos/device.py\\\", line 790, in execute\\n errs=ex)\\n\", \"changed\": true, \"check_mode\": false, \"failed\": true, \"invocation\": {\"module_args\": {\"checksum_algorithm\": \"md5\", \"vmhost\": false, \"attempts\": null, \"checksum_timeout\": 300, \"force_host\": true, \"port\": 830, \"console\": null, \"logdir\": null, \"provider\": null, \"nssu\": false, \"baud\": null, \"passwd\": null, \"host\": \"rtr-bdr-sin2\", \"user\": \"ansible\", \"validate\": false, \"logfile\": null, \"checksum\": null, \"issu\": false, \"mode\": null, \"timeout\": 30, \"cleanfs_timeout\": 300, \"ssh_private_key_file\": null}}, \"msg\": \"Installation failed. Error: RpcError(severity: error, bad_element: None, message: command is not valid on the mx40-t)\"}\n",
"msg": "MODULE FAILURE",
"rc": 0
}
PLAY RECAP *********************************************************************************************************
rtr-bdr-sin2 : ok=3 changed=0 unreachable=0 failed=1
Getting the same error on an SRX1500
Error: RpcError(severity: error, bad_element: None, message: command is not valid on the srx1500)
Hi,
This is a very old issue, marking it as inactive. In case the issue still is relevant, kindly share the netconf logs captured on device for the execution. Refer - https://www.juniper.net/documentation/us/en/software/junos/junos-xml-protocol/topics/example/netconf-traceoptions-configuring.html
Hi,
This is a very old issue, marking it as inactive. In case the issue still is relevant, kindly share the netconf logs captured on device for the execution. Refer - https://www.juniper.net/documentation/us/en/software/junos/junos-xml-protocol/topics/example/netconf-traceoptions-configuring.html
Issue Type
Module Name
juniper_junos_software
Juniper.Junos role and Python libraries version
OS / Environment
Freshly purchased MX40-T
Model: mx40-t Junos: 15.1R6.7
Summary
Attempting to run a firmware upgrade to 15.7R7.8 gives me the error: command is not valid on the mx40-t
Steps to reproduce
Using juniper_junos_software to send this package: jinstall-ppc-15.1R7.8-export-signed.tgz To an mx-40t