If a machine has gone missing, attempting to deploy it twice will result in deployment, even if --allow-recreate has not be issued:
$ nixops2 deploy -d packetDemo --include machineDemo
Traceback (most recent call last):
File "/nix/store/wqrh0sqslkkjp860z5pl79wzrzpwymy9-python3.8-nixops-1.8.0/bin/.nixops-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/__main__.py", line 710, in main
args.op(args)
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/script_defs.py", line 617, in op_deploy
depl.deploy(
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/deployment.py", line 1458, in deploy
self.run_with_notify("deploy", lambda: self._deploy(**kwargs))
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/deployment.py", line 1447, in run_with_notify
f()
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/deployment.py", line 1458, in <lambda>
self.run_with_notify("deploy", lambda: self._deploy(**kwargs))
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/deployment.py", line 1361, in _deploy
nixops.parallel.run_tasks(
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/parallel.py", line 106, in run_tasks
raise list(exceptions.values())[0]
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/parallel.py", line 70, in thread_fun
work_result = (worker_fun(t), None, t.name)
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops/deployment.py", line 1315, in worker
r.create(
File "/nix/store/k09hwhksc9n6b48jq4558xcsca4pvnss-python3-3.8.3-env/lib/python3.8/site-packages/nixops_packet/backends/device.py", line 273, in create
raise Exception(
Exception: Packet.net instance ‘machineDemo’ went away; use ‘--allow-recreate’ to create a new one
$ nixops2 deploy -d packetDemo --include machineDemo
machineDemo> creating packet device ...
If a machine has gone missing, attempting to deploy it twice will result in deployment, even if
--allow-recreate
has not be issued: