Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network.storage.legacy.databasefile setting has not been implemented #1472

Open
roberth opened this issue Aug 25, 2021 · 1 comment · May be fixed by #1495
Open

network.storage.legacy.databasefile setting has not been implemented #1472

roberth opened this issue Aug 25, 2021 · 1 comment · May be fixed by #1495

Comments

@roberth
Copy link
Member

roberth commented Aug 25, 2021

My flake-based deployment contains

network.storage.legacy = {
  databasefile = "~/.nixops/deployments-nixops-example.nixops";
};

which points to a new path. Yet, I see all my usual legacy deployments in nixops list.

I can't find databasefile anywhere but in the NixOps 1->2 upgrade message.

@abbradar
Copy link
Member

abbradar commented Jan 9, 2022

Together with the new NixOps way of having explicit network directories this creates confusion and possibility of devastating errors. Consider two deployments, production and development, which use different network directories. On NixOps 1 I would have set different configuration paths and use nixops -d production .... Currently when I'm in development network directory I see this:

+--------------------------------------+-------------+----------------------------------------------+------------+------+
| UUID                                 | Name        | Description                                  | # Machines | Type |
+--------------------------------------+-------------+----------------------------------------------+------------+------+
| e0a78705-3cff-11ea-85a3-8600003a0125 | development | Development deployment                       |          1 | none |
| 9c212957-69f2-11ea-88d6-8600003a0125 | production  | Development deployment                       |          1 | none |
+--------------------------------------+-------------+----------------------------------------------+------------+------+

I could by mistake run nixops deploy -d production here and destroy my servers.

abbradar added a commit to abbradar/nixops that referenced this issue Jan 9, 2022
@abbradar abbradar linked a pull request Jan 9, 2022 that will close this issue
yajo added a commit to moduon/nixops that referenced this issue Jul 5, 2022
As seen in NixOS#1472, the current documented way to specify a different storage location does not really work.

However, one can add `$NIXOPS_STATE` and it works. Also this is a very comfortable options for integrating with i.e. devshell.

Thus I'm documenting it here, while the other issue gets fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants