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

nixops list returns wrong "Description" and "# Machines" #1542

Open
datafoo opened this issue Oct 21, 2022 · 0 comments
Open

nixops list returns wrong "Description" and "# Machines" #1542

datafoo opened this issue Oct 21, 2022 · 0 comments

Comments

@datafoo
Copy link

datafoo commented Oct 21, 2022

I am using NixOps 2 with traditional (non-flake) deployments.

When I run nixops list from the directory containing the nixops.nix file for my berlin.example.com deployment, the results are wrong. The Description and # Machines are all filled with the values corresponding to berlin.example.com deployment.

Actual result

# nixops --version
NixOps 2.0.0-pre-683baa6

# nixops list
+--------------------------------------+-----------------------------+---------------------------+------------+------+
| UUID                                 | Name                        | Description               | # Machines | Type |
+--------------------------------------+-----------------------------+---------------------------+------------+------+
| 09789ca3-4969-4198-a4c5-e8c67a2994da | london.example.com          | My Description for Berlin |          2 | none |
| 6f9a4a86-d8f3-451a-84ce-e5adce45a616 | paris.example.com           | My Description for Berlin |          2 | none |
| 3a41b340-649a-43f5-9a32-fa322c26406a | berlin.example.com          | My Description for Berlin |          2 | none |
| a9a3e870-3402-49c9-a832-b28e5c190267 | test-facility-1.example.com | My Description for Berlin |          2 | none |
| 63d9abef-df2a-44ee-ac6b-6b8461c3eaf9 | test-facility-2.example.com | My Description for Berlin |          2 | none |
| c0066c49-2943-473d-a3e0-eeaa4b258a4d | test-facility-3.example.com | My Description for Berlin |          2 | none |
+--------------------------------------+-----------------------------+---------------------------+------------+------+

Expected

# nixops --version
NixOps 2.0.0-pre-683baa6

# nixops list
+--------------------------------------+-----------------------------+---------------------------+------------+------+
| UUID                                 | Name                        | Description               | # Machines | Type |
+--------------------------------------+-----------------------------+---------------------------+------------+------+
| 09789ca3-4969-4198-a4c5-e8c67a2994da | london.example.com          | My Description for London |          2 | none |
| 6f9a4a86-d8f3-451a-84ce-e5adce45a616 | paris.example.com           | My Description for Paris  |          1 | none |
| 3a41b340-649a-43f5-9a32-fa322c26406a | berlin.example.com          | My Description for Berlin |          2 | none |
| a9a3e870-3402-49c9-a832-b28e5c190267 | test-facility-1.example.com | My Description for Test 1 |          2 | none |
| 63d9abef-df2a-44ee-ac6b-6b8461c3eaf9 | test-facility-2.example.com | My Description for Test 2 |          1 | none |
| c0066c49-2943-473d-a3e0-eeaa4b258a4d | test-facility-3.example.com | My Description for Test 3 |          1 | none |
+--------------------------------------+-----------------------------+---------------------------+------------+------+

Inspecting the sqlite3 database shows the value are written to it every time I run nixops list.

SELECT Deployments.uuid, DeploymentAttrs.name, DeploymentAttrs.value
FROM Deployments
LEFT OUTER JOIN DeploymentAttrs ON Deployments.uuid = DeploymentAttrs.deployment
WHERE DeploymentAttrs.name IN  ('name', 'description')
ORDER BY DeploymentAttrs.name, Deployments.uuid;
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

No branches or pull requests

1 participant