-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
nixopsUnstable broke after upgrade recently #139532
Comments
@aij see NixOS/nixops#1474 |
https://nixops.readthedocs.io/en/latest/manual/migrating.html is rather unclear about what needs to go in the new From what I gather, it needs to include the entire deployment configuration, but even then I'm seeing some weird behavior, like ivan@tobati:~/nixops$ nixops check
Machines state:
+------+--------+----+-----------+----------+-----------+-------+-------+
| Name | Exists | Up | Reachable | Disks OK | Load avg. | Units | Notes |
+------+--------+----+-----------+----------+-----------+-------+-------+
+------+--------+----+-----------+----------+-----------+-------+-------+
Non machines resources state:
+------+--------+
| Name | Exists |
+------+--------+
+------+--------+ I'm not sure what I did that was relevant, (perhaps ivan@tobati:~/nixops$ nixops ssh-for-each uptime
m0...> 14:35:11 up 27 days 20:22, 0 users, load average: 0.39, 0.37, 0.41
m3...> 14:35:11 up 22:15, 4 users, load average: 0.81, 0.84, 0.76
m4...> 14:35:12 up 27 days 20:13, 0 users, load average: 1.52, 1.20, 0.84
m5...> 14:35:13 up 33 days 18:13, 0 users, load average: 0.05, 0.09, 0.09
m6...> 14:35:13 up 31 days 19:15, 0 users, load average: 0.30, 0.36, 0.44
ivan@tobati:~/nixops$ nixops check
Machines state:
+------+--------+-----+-----------+----------+----------------+---------------------------+-------+
| Name | Exists | Up | Reachable | Disks OK | Load avg. | Units | Notes |
+------+--------+-----+-----------+----------+----------------+---------------------------+-------+
| m0 | Yes | Yes | Yes | N/A | 1.57 0.89 0.60 | | |
| m3 | Yes | Yes | Yes | N/A | 0.44 0.62 0.69 | dev-fuse.device [running] | |
| m4 | Yes | Yes | Yes | N/A | 0.55 0.87 0.78 | | |
| m5 | Yes | Yes | Yes | N/A | 0.00 0.04 0.07 | m3-scratch.mount [failed] | |
| | | | | | | scratch.mount [failed] | |
| m6 | Yes | Yes | Yes | N/A | 0.39 0.36 0.43 | m3-scratch.mount [failed] | |
| | | | | | | m4-scratch.mount [failed] | |
+------+--------+-----+-----------+----------+----------------+---------------------------+-------+
Non machines resources state:
+------+--------+
| Name | Exists |
+------+--------+
+------+--------+
|
@aij check this patch: diff --git a/pkgs/applications/networking/cluster/nixops/default.nix b/pkgs/applications/networking/cluster/nixops/default.nix
index 91f5cb82668..6515885fd8e 100644
--- a/pkgs/applications/networking/cluster/nixops/default.nix
+++ b/pkgs/applications/networking/cluster/nixops/default.nix
@@ -17,10 +17,6 @@ let
nixops = super.nixops.overridePythonAttrs (
old: {
- postPatch = ''
- substituteInPlace nixops/args.py --subst-var version
- '';
-
meta = old.meta // {
homepage = https://github.com/NixOS/nixops;
description = "NixOS cloud provisioning and deployment tool";
diff --git a/pkgs/applications/networking/cluster/nixops/poetry-git-overlay.nix b/pkgs/applications/networking/cluster/nixops/poetry-git-overlay.nix
index cc40395d6d9..3f0bbece83a 100644
--- a/pkgs/applications/networking/cluster/nixops/poetry-git-overlay.nix
+++ b/pkgs/applications/networking/cluster/nixops/poetry-git-overlay.nix
@@ -5,8 +5,8 @@ self: super: {
_: {
src = pkgs.fetchgit {
url = "https://github.com/NixOS/nixops.git";
- rev = "35ac02085169bc2372834d6be6cf4c1bdf820d09";
- sha256 = "1jh0jrxyywjqhac2dvpj7r7isjv68ynbg7g6f6rj55raxcqc7r3j";
+ rev = "30e16880e7afc08ca938266e3a3b3e0c6464682a";
+ sha256 = "sha256-ALJrw0qMMQb0KeU2CgVsByiRIwvoegVA0wpV0ZBjF/w=";
};
}
); Revert nixops to version 2.0.0-pre (2021-06-15). |
@roberth this method use single deployments. I need support for multiple deployments. |
I marked this as stale due to inactivity. → More info |
Problem not resolved. |
@roberth there is some progress? |
This was fixed recently and has landed in |
@roberth error running command
from nixpkgs directory:
Version 1.7 starts from anywhere normally:
|
Create folder
Running
|
Commands that should list the legacy deployments are known to have regressed, as NixOps2 has configurable state backends that require it to start by evaluating the network.
It's trying to evaluate the working directory as a flake. It should try |
Is it possible to make a config file ~/.config/nixops/default.nix so that specify 'network.storage.legacy' parameter there and keep legacy deployments. And also save the launch from any folder? |
Such functionality would have to take priority over the working directory and therefore break "gitops" style deployments. If I may generalize, such global and implicit behavior is confusing and atypical for an ecosystem that promotes hermeticity, reproducibility, etc. NixOps shouldn't have behaved like this in the first place, but it is a tool that was first created in a different era. |
@roberth how to create a new deployment in nixops 2.0 so that it can be run from the nixpkgs folder? We need this variant to make it easier to test changes to nixpkgs on a remote virtual machine. |
@roberth how do I get the old nixopsUnstable behavior back? NixopsStable has now been removed :( |
Describe the bug
Nixops was working before upgrading
Steps To Reproduce
Steps to reproduce the behavior:
nixops deploy
or evennixops list
Expected behavior
I should be able to run
nixops deploy
to update a deployment.Screenshots
Additional context
I re-tested with previous version of nixos-unstable-small I had used, and found this changed between
b769bd2b01bce5afe0af703218593355c6f52337
andf96ba73ac0057f5da7920b9635b25938508ad39b
. Looking at git long and a bit more testing I found the 942b5b6 included a nixopsUnstable upgrade which seems like the cause.I have not (knowingly) started using flakes yet.
I'm not entirely sure this is a proper bug or an intentional backwards incompatibility with an obtuse error message. If nothing else we should improve the error message and document in release notes.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
The text was updated successfully, but these errors were encountered: