Closed grahamc closed 3 years ago
Support added for this in https://github.com/input-output-hk/nixops-packet/commit/592d63f798cd3d3422e5e5799898588cb45572dc.
# Command
$ nixops2 packet reinstall -d packetDemo machineDemo --debug
$DATE $LOGHOST packet[$PID]: GET https://api.packet.net/devices/$DEVICE_ID {} {'X-Auth-Token': 'TOKEN', 'X-Consumer-Token': None, 'Content-Type': 'application/json'} $DATE $LOGHOST urllib3[$PID]: Starting new HTTPS connection (1): api.packet.net:443 $DATE $LOGHOST urllib3[$PID]: https://api.packet.net:443 "GET /devices/$DEVICE_ID HTTP/1.1" 200 None $DATE $LOGHOST packet[$PID]: POST https://api.packet.net/devices/$DEVICE_ID/actions {'type': 'reinstall'} {'X-Auth-Token': 'TOKEN', 'X-Consumer-Token': None, 'Content-Type': 'application/json'}
* Example deploy output:
$ nixops2 deploy -d packetDemo --debug
$DATE $LOGHOST nixops_packet[$PID]: Packet API key obtained from config $DATE $LOGHOST packet[$PID]: GET https://api.packet.net/ssh-keys/None {} {'X-Auth-Token': 'TOKEN', 'X-Consumer-Token': None, 'Content-Type': 'application/json'} $DATE $LOGHOST urllib3[$PID]: Starting new HTTPS connection (1): api.packet.net:443 $DATE $LOGHOST urllib3[$PID]: https://api.packet.net:443 "GET /ssh-keys/None HTTP/1.1" 404 24 $DATE $LOGHOST nixops[$PID]: keyDemo....> uploading Packet key pair ‘$KEY’...
* The system provisioning file dump during provisioning, update-provision or reinstall now only displays when the --debug flag is used
Closing. Re-open if needed.
When
nixops
is called with--debug
, the logger for packet-python should go to debug too. Right now, --debug doesn't change the packet lib's debug level.