-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
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
jnpr.junos.utils.sw.SW.install does nothing for M10i with dual-RE (returns None) #216
Comments
Posting the actual issue here since it was hard to find:
|
this issue is actually scoped to the ansible modules. I am closing this issue, but will open one on the ansible repo and reference this. |
the issue in this case appears to be that the M10i has dual RE and the jnpr.junos.utils.sw module is not handling this case correctly. Basically the sw.install doesn't do anything and returns NoneType. |
testing a fix, I've manually copied the code to the device and then performed a test as follows:
|
|
process completed A-OK:
|
fixed, merged to master. |
Model - SRX5600, m10i, dual RE.
Playbook code:
name: Junos OS
hosts: all
connection: local
gather_facts: no
vars:
restart_wait_time: 3600
reboot: 'yes'
tasks:
junos_install_os:
host={{ inventory_hostname }}
user='XXXXX'
passwd='XXXX'
version=13.2R4.6
package=/usr/local/junos/images/jinstall-13.2R4.6-domestic-signed.tgz
logfile=/usr/local/junos/log/software.log
register: sw
regress@vm-nomadic-ubuntu:~/ansible_junos/mydir_ansible/pb$ ansible-playbook softwr --limit m10i
PLAY [Junos OS] ***************************************************************
TASK: [checking NETCONF] ******************************************************
ok: [popeye]
TASK: [install Junos OS package] **********************************************
failed: [popeye] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/home/regress/.ansible/tmp/ansible-tmp-1400567208.68-138855836321347/junos_install_os", line 1404, in
main()
File "/home/regress/.ansible/tmp/ansible-tmp-1400567208.68-138855836321347/junos_install_os", line 223, in main
results = junos_install_os(module, dev)
File "/home/regress/.ansible/tmp/ansible-tmp-1400567208.68-138855836321347/junos_install_os", line 175, in junos_install_os
results['msg'] = "Unable to install the software: " + ok
TypeError: cannot concatenate 'str' and 'NoneType' objects
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/regress/softwr.retry
popeye : ok=1 changed=0 unreachable=0 failed=1
2014-05-20 11:56:54,210:popeye:Starting the software upgrade process: /usr/local/junos/images/jinstall-13.2R4.6-domestic-signed.tgz
2014-05-20 11:56:54,211:popeye:computing local checksum on: /usr/local/junos/images/jinstall-13.2R4.6-domestic-signed.tgz
2014-05-20 11:56:55,945:popeye:cleaning filesystem ...
2014-05-20 11:57:09,506:paramiko.transport:starting thread (client mode): 0x955ad2cL
2014-05-20 11:57:09,572:paramiko.transport:Connected (version 2.0, client OpenSSH_6.6.1)
2014-05-20 11:57:09,579:paramiko.transport:kex algos:[u'curve25519-sha256@libssh.org', u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-
sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group-exchange-sha1', u'diffie-hellman-group14-sha1', u'diffie-
hellman-group1-sha1'] server key:[u'ssh-rsa', u'ssh-dss', u'ecdsa-sha2-nistp256', u'ssh-ed25519'] client encrypt:[u'aes128-ctr', u'aes192-
ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com', u'chacha20-poly1305@openssh.com',
u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'rijndael-cbc@lysator.liu.se'] server
encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com',
u'chacha20-poly1305@openssh.com', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour',
u'rijndael-cbc@lysator.liu.se'] client mac:[u'hmac-md5-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64-etm@openssh.com', u'umac-
128-etm@openssh.com', u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-ripemd160-etm@openssh.com', u'hmac-sha1-96-
etm@openssh.com', u'hmac-md5-96-etm@openssh.com', u'hmac-md5', u'hmac-sha1', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-
256', u'hmac-sha2-256-96', u'hmac-sha2-512', u'hmac-sha2-512-96', u'hmac-ripemd160', u'hmac-ripemd160@openssh.com', u'hmac-sha1-96', u'hmac-
md5-96'] server mac:[u'hmac-md5-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64-etm@openssh.com', u'umac-128-etm@openssh.com',
u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-ripemd160-etm@openssh.com', u'hmac-sha1-96-etm@openssh.com',
u'hmac-md5-96-etm@openssh.com', u'hmac-md5', u'hmac-sha1', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-256', u'hmac-sha2-
256-96', u'hmac-sha2-512', u'hmac-sha2-512-96', u'hmac-ripemd160', u'hmac-ripemd160@openssh.com', u'hmac-sha1-96', u'hmac-md5-96'] client
compress:[u'none', u'zlib@openssh.com'] server compress:[u'none', u'zlib@openssh.com'] client lang:[u''] server lang:[u''] kex follows?False
2014-05-20 11:57:09,579:paramiko.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
2014-05-20 11:57:09,579:paramiko.transport:using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote
aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
2014-05-20 11:57:09,702:paramiko.transport:Switch to new keys ...
2014-05-20 11:57:09,708:paramiko.transport:Adding ssh-rsa host key for popeye: a7aef6fe1c4778c475952e65bc2460a2
2014-05-20 11:57:09,709:paramiko.transport:Trying discovered key 97fdf2252faec2370d209d7cc02d2095 in /home/regress/.ssh/id_rsa
2014-05-20 11:57:09,802:paramiko.transport:userauth is OK
2014-05-20 11:57:10,172:paramiko.transport:Authentication (publickey) failed.
2014-05-20 11:57:10,188:paramiko.transport:userauth is OK
2014-05-20 11:57:10,200:paramiko.transport:Authentication (password) successful!
2014-05-20 11:57:10,204:paramiko.transport:[chan 1] Max packet in: 34816 bytes
2014-05-20 11:57:10,205:paramiko.transport:[chan 1] Max packet out: 32768 bytes
2014-05-20 11:57:10,205:paramiko.transport:Secsh channel 1 opened.
2014-05-20 11:57:10,211:paramiko.transport:[chan 1] Sesch channel 1 request ok
2014-05-20 11:57:28,063:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 66355200 / 663438283 (10%)
2014-05-20 11:57:44,638:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 132694016 / 663438283 (20%)
2014-05-20 11:58:01,160:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 199032832 / 663438283 (30%)
2014-05-20 11:58:17,777:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 265388032 / 663438283 (40%)
2014-05-20 11:58:34,377:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 331726848 / 663438283 (50%)
2014-05-20 11:58:50,890:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 398065664 / 663438283 (60%)
2014-05-20 11:59:07,475:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 464420864 / 663438283 (70%)
2014-05-20 11:59:23,950:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 530759680 / 663438283 (80%)
2014-05-20 11:59:24,964:paramiko.transport:Rekeying (hit 38295 packets, 536880492 bytes sent)
2014-05-20 11:59:24,983:paramiko.transport:kex algos:[u'curve25519-sha256@libssh.org', u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-
sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group-exchange-sha1', u'diffie-hellman-group14-sha1', u'diffie-
hellman-group1-sha1'] server key:[u'ssh-rsa', u'ssh-dss', u'ecdsa-sha2-nistp256', u'ssh-ed25519'] client encrypt:[u'aes128-ctr', u'aes192-
ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com', u'chacha20-poly1305@openssh.com',
u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'rijndael-cbc@lysator.liu.se'] server
encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com',
u'chacha20-poly1305@openssh.com', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour',
u'rijndael-cbc@lysator.liu.se'] client mac:[u'hmac-md5-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64-etm@openssh.com', u'umac-
128-etm@openssh.com', u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-ripemd160-etm@openssh.com', u'hmac-sha1-96-
etm@openssh.com', u'hmac-md5-96-etm@openssh.com', u'hmac-md5', u'hmac-sha1', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-
256', u'hmac-sha2-256-96', u'hmac-sha2-512', u'hmac-sha2-512-96', u'hmac-ripemd160', u'hmac-ripemd160@openssh.com', u'hmac-sha1-96', u'hmac-
md5-96'] server mac:[u'hmac-md5-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64-etm@openssh.com', u'umac-128-etm@openssh.com',
u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-ripemd160-etm@openssh.com', u'hmac-sha1-96-etm@openssh.com',
u'hmac-md5-96-etm@openssh.com', u'hmac-md5', u'hmac-sha1', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-256', u'hmac-sha2-
256-96', u'hmac-sha2-512', u'hmac-sha2-512-96', u'hmac-ripemd160', u'hmac-ripemd160@openssh.com', u'hmac-sha1-96', u'hmac-md5-96'] client
compress:[u'none', u'zlib@openssh.com'] server compress:[u'none', u'zlib@openssh.com'] client lang:[u''] server lang:[u''] kex follows?False
2014-05-20 11:59:24,983:paramiko.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
2014-05-20 11:59:24,983:paramiko.transport:using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote
aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
2014-05-20 11:59:25,102:paramiko.transport:Switch to new keys ...
2014-05-20 11:59:40,564:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 597098496 / 663438283 (90%)
2014-05-20 11:59:57,109:popeye:jinstall-13.2R4.6-domestic-signed.tgz: 663438283 / 663438283 (100%)
2014-05-20 11:59:57,323:paramiko.transport:[chan 1] EOF sent (1)
2014-05-20 11:59:57,328:paramiko.transport:EOF in transport thread
2014-05-20 11:59:57,332:popeye:computing remote checksum on: /var/tmp/jinstall-13.2R4.6-domestic-signed.tgz
2014-05-20 12:00:13,835:popeye:checksum check passed.
The text was updated successfully, but these errors were encountered: