NixOS / nixops-hetzner

GNU Lesser General Public License v3.0
51 stars 15 forks source link

Hetzer password per instance, error handling #25

Open zinob opened 8 years ago

zinob commented 8 years ago

NixOps creates credentials for each server when deploying. If these credentials are later invalidated for what ever reason the error message is the rather vague "hetzner.RobotError" and there seems to be no easy way of recovery.

The error message could at least be the more verbose Unauthorized as returned by the HTTP-framework or some amalgamation of the two like hetzner.RobotError(Unauthorized).

There seems to be no other way of recovering other than to manually modify the sqlite database. A better approach would be fall back to use the master passwords (as supplied in .nix or via env HETZNER_ROBOT_PASS HETZNER_ROBOT_USER) and either generate a new account for that instance or, in the case of destroy just do the removal (although that might be an unnecessarily complicated special case).

danbst commented 8 years ago

related https://github.com/NixOS/nixops/issues/490

domenkozar commented 7 years ago

Related: https://github.com/NixOS/nixops/issues/627