Automate import of SSL Certificate, Key & CRL from BIG-IP to BIG-IQ
Updated Jun 06, 2023
Version 3.0Was this article helpful?
@goodsell @Roman we have implemented that fix and yeah now the incompatible version disappeared. Back to the EOF exception:
2019-03-20 09:04:48,797:INFO:['bash', '-c', 'python -c \'import f5.mcp, pickle;attrs=["cache_path","name","checksum","passphrase"];m=lambda d: dict((k,v) for (k,v) in d.items() if k in attrs);r=f5.mcp.MCPConnection().query_all("certificate_file_object");print pickle.dumps([m(o) for o in r])\'']
Traceback (most recent call last):
File "./import-bigip-cert-key-crl.py", line 655, in
sys.exit(main())
File "./import-bigip-cert-key-crl.py", line 643, in main
unmanaged_files = find_all_unmanaged_objects(session, conn)
File "./import-bigip-cert-key-crl.py", line 538, in find_all_unmanaged_objects
unmanaged_files += find_unmanaged_objects(session, bigip_connection, typ)
File "./import-bigip-cert-key-crl.py", line 484, in find_unmanaged_objects
object_type.mcp_type_name)
File "./import-bigip-cert-key-crl.py", line 440, in get_bigip_file_objects
return pickle.loads(stdout)
File "/usr/lib/python2.6/pickle.py", line 1374, in loads
return Unpickler(file).load()
File "/usr/lib/python2.6/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.6/pickle.py", line 880, in load_eof
raise EOFError
EOFError
We had to wrap the command in bash -c because by default your script does not execute bash and therefore cant find python.
UPD: We have changed default shell for the user we use to login to bash in /etc/passwd and then your module worked when we removed the whole bash -c thing. However we do require it in the end, so do you have any idea of how we could execute it on a user that connects to tmsh by default?