ZTP on Junos using python script (Operation not permitted)
We have the following setup:
Hardware platform: QFX5100-48S-6Q
Junos version: 18.1R3.3
ZTP is triggered on the switch by running “request system zeroize” and then selecting “yes” to “Erase all data, including configuration and log files?” at the CLI. After the switch reboots, Interface “vme.0” gets a DHCP lease and the ztp script is downloaded to “/var/db/scripts/op”. Switch attempts to run the script, but fails with the following message in “/var/log/script_output”: “/usr/sbin/image_load: /usr/bin/python: Operation not permitted”.
In order to allow a python script to be run on the box, additional configurations are required as follows:
These steps will have to be performed manually by a user and cannot be handled by the ZTP script itself. Alternatively, a bootstrap script is required to make the necessary configurations to enable the python ZTP script to run.
Is there a way to allow a python script to run as a part of ZTP without additional configurations performed either manually or through a bootstrap script ?