nixops4 apply test error: proxmox-qemu-vm.nix was imported into nixops4Resource instead of nixos #431

Closed
opened 2025-07-03 15:32:51 +02:00 by kiara · 5 comments
Owner

related to #93, we seem to be facing this error.

trace
$ nixops4 apply -v test

nixops| setting up verbose logging
nixops| started nixops4-eval process: 115070
nixops| sending: {"LoadFlake":{"assign_to":{"id":0},"payload":{"abspath":"/home/kiara/code/Fediversity"}}}
nixops| sending: {"LoadDeployment":{"assign_to":{"id":1},"payload":{"flake":{"id":0},"name":"test"}}}
nixops| sending: {"ListResources":{"message_id":{"id":2},"payload":{"id":1}}}
nixops| received: {"TracingEvent":{"new_call_site":{"fields":[],"file":"nixops4-eval/src/main.rs","id":93899505111840,"kind":"span","level":"trace","line":92,"module_path":"nixops4_eval","name":"nixops4-eval-stdin-reader","target":"nixops4_eval"}}}
nixops| received: {"TracingEvent":{"new_call_site":{"fields":[],"file":"nixops4-eval/src/main.rs","id":93899505111960,"kind":"span","level":"trace","line":119,"module_path":"nixops4_eval","name":"nixops4-eval-queue-worker","target":"nixops4_eval"}}}
nixops| received: {"TracingEvent":{"new_span":{"id":1,"metadata_id":93899505111840,"values":{}}}}
nixops| 2025-07-03T13:29:39.130981Z TRACE nixops4-eval-stdin-reader: nixops4_eval: new
nixops| received: {"TracingEvent":{"new_span":{"id":2,"metadata_id":93899505111960,"values":{}}}}
nixops| 2025-07-03T13:29:39.130996Z TRACE nixops4-eval-queue-worker: nixops4_eval: new
nixops| received: {"TracingEvent":{"span_entered":{"id":2}}}
nixops| 2025-07-03T13:29:39.133393Z TRACE nixops4-eval-queue-worker: nixops4_eval: enter
nixops| warning: Git tree '/home/kiara/code/Fediversity' is dirty
nixops| received: {"TracingEvent":{"span_exited":{"id":2}}}
nixops| 2025-07-03T13:29:39.180494Z TRACE nixops4-eval-queue-worker: nixops4_eval: exit
nixops| received: {"TracingEvent":{"span_entered":{"id":2}}}
nixops| 2025-07-03T13:29:39.180524Z TRACE nixops4-eval-queue-worker: nixops4_eval: enter
nixops| received: {"TracingEvent":{"span_exited":{"id":2}}}
nixops| 2025-07-03T13:29:39.180848Z TRACE nixops4-eval-queue-worker: nixops4_eval: exit
nixops| received: {"TracingEvent":{"span_entered":{"id":2}}}
nixops| 2025-07-03T13:29:39.180864Z TRACE nixops4-eval-queue-worker: nixops4_eval: enter
nixops| received: {"QueryResponse":[{"id":2},{"ListResources":[{"id":1},["garage-configuration","mastodon-configuration","peertube-configuration","pixelfed-configuration"]]}]}
nixops| The following resources will be checked, created and/or updated:
nixops|   - garage-configuration
nixops|   - mastodon-configuration
nixops|   - peertube-configuration
nixops|   - pixelfed-configuration
nixops| sending: {"LoadResource":{"assign_to":{"id":3},"payload":{"deployment":{"id":1},"name":"garage-configuration"}}}
nixops| sending: {"GetResource":{"message_id":{"id":7},"payload":{"id":3}}}
nixops| sending: {"ListResourceInputs":{"message_id":{"id":8},"payload":{"id":3}}}
nixops| sending: {"LoadResource":{"assign_to":{"id":4},"payload":{"deployment":{"id":1},"name":"mastodon-configuration"}}}
nixops| sending: {"GetResource":{"message_id":{"id":9},"payload":{"id":4}}}
nixops| sending: {"ListResourceInputs":{"message_id":{"id":10},"payload":{"id":4}}}
nixops| sending: {"LoadResource":{"assign_to":{"id":5},"payload":{"deployment":{"id":1},"name":"peertube-configuration"}}}
nixops| sending: {"GetResource":{"message_id":{"id":11},"payload":{"id":5}}}
nixops| sending: {"ListResourceInputs":{"message_id":{"id":12},"payload":{"id":5}}}
nixops| sending: {"LoadResource":{"assign_to":{"id":6},"payload":{"deployment":{"id":1},"name":"pixelfed-configuration"}}}
nixops| sending: {"GetResource":{"message_id":{"id":13},"payload":{"id":6}}}
nixops| sending: {"ListResourceInputs":{"message_id":{"id":14},"payload":{"id":6}}}
nixops| received: {"TracingEvent":{"span_exited":{"id":2}}}
nixops| 2025-07-03T13:29:39.181545Z TRACE nixops4-eval-queue-worker: nixops4_eval: exit
nixops| received: {"TracingEvent":{"span_entered":{"id":2}}}
nixops| 2025-07-03T13:29:39.181616Z TRACE nixops4-eval-queue-worker: nixops4_eval: enter
nixops| received: {"Error":[{"id":3},"\u001b[31;1merror:\u001b[0m\n       … while evaluating the attribute '\u001b[35;1moptionalValue.value\u001b[0m'\n         \u001b[34;1mat \u001b[35;1m/nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:894:27\u001b[0m:\n          893|     optionalValue =\n          894|       if isDefined then { value = mergedValue; }\n             |                           \u001b[31;1m^\u001b[0m\n          895|       else {};\n\n       … while evaluating the attribute '\u001b[35;1mconfig\u001b[0m'\n         \u001b[34;1mat \u001b[35;1m/nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:334:9\u001b[0m:\n          333|         options = checked options;\n          334|         config = checked (removeAttrs config [ \"_module\" ]);\n             |         \u001b[31;1m^\u001b[0m\n          335|         _module = checked (config._module);\n\n       \u001b[35;1m(stack trace truncated; use '--show-trace' to show the full, detailed trace)\u001b[0m\n\n       \u001b[31;1merror:\u001b[0m The module /nix/store/qqcahbkmi1idhv3ljsf8g23avvnp57id-source/infra/common/proxmox-qemu-vm.nix was imported into nixops4Resource instead of nixos."]}
nixops| Error on id 3: error:
nixops|        … while evaluating the attribute 'optionalValue.value'
nixops|          at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:894:27:
nixops|           893|     optionalValue =
nixops|           894|       if isDefined then { value = mergedValue; }
nixops|              |                           ^
nixops|           895|       else {};
nixops|
nixops|        … while evaluating the attribute 'config'
nixops|          at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:334:9:
nixops|           333|         options = checked options;
nixops|           334|         config = checked (removeAttrs config [ "_module" ]);
nixops|              |         ^
nixops|           335|         _module = checked (config._module);
nixops|
nixops|        (stack trace truncated; use '--show-trace' to show the full, detailed trace)
nixops|
nixops|        error: The module /nix/store/qqcahbkmi1idhv3ljsf8g23avvnp57id-source/infra/common/proxmox-qemu-vm.nix was imported into nixops4Resource instead of nixos.
nixops| 2025-07-03T13:29:39.187617Z TRACE nixops4-eval-queue-worker: nixops4_eval: exit
nixops| 2025-07-03T13:29:39.187623Z TRACE nixops4-eval-stdin-reader: nixops4_eval: close time.busy=0.00ns time.idle=56.6ms
nixops| 2025-07-03T13:29:39.187631Z TRACE nixops4-eval-queue-worker: nixops4_eval: close time.busy=54.1ms time.idle=2.53ms
nixops4 error: Error during evaluation: error:
       … while evaluating the attribute 'optionalValue.value'
         at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:894:27:
          893|     optionalValue =
          894|       if isDefined then { value = mergedValue; }
             |                           ^
          895|       else {};

       … while evaluating the attribute 'config'
         at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:334:9:
          333|         options = checked options;
          334|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          335|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The module /nix/store/qqcahbkmi1idhv3ljsf8g23avvnp57id-source/infra/common/proxmox-qemu-vm.nix was imported into nixops4Resource instead of nixos.
related to #93, we seem to be facing this error. <details> <summary>trace</summary> ```bash $ nixops4 apply -v test nixops| setting up verbose logging nixops| started nixops4-eval process: 115070 nixops| sending: {"LoadFlake":{"assign_to":{"id":0},"payload":{"abspath":"/home/kiara/code/Fediversity"}}} nixops| sending: {"LoadDeployment":{"assign_to":{"id":1},"payload":{"flake":{"id":0},"name":"test"}}} nixops| sending: {"ListResources":{"message_id":{"id":2},"payload":{"id":1}}} nixops| received: {"TracingEvent":{"new_call_site":{"fields":[],"file":"nixops4-eval/src/main.rs","id":93899505111840,"kind":"span","level":"trace","line":92,"module_path":"nixops4_eval","name":"nixops4-eval-stdin-reader","target":"nixops4_eval"}}} nixops| received: {"TracingEvent":{"new_call_site":{"fields":[],"file":"nixops4-eval/src/main.rs","id":93899505111960,"kind":"span","level":"trace","line":119,"module_path":"nixops4_eval","name":"nixops4-eval-queue-worker","target":"nixops4_eval"}}} nixops| received: {"TracingEvent":{"new_span":{"id":1,"metadata_id":93899505111840,"values":{}}}} nixops| 2025-07-03T13:29:39.130981Z TRACE nixops4-eval-stdin-reader: nixops4_eval: new nixops| received: {"TracingEvent":{"new_span":{"id":2,"metadata_id":93899505111960,"values":{}}}} nixops| 2025-07-03T13:29:39.130996Z TRACE nixops4-eval-queue-worker: nixops4_eval: new nixops| received: {"TracingEvent":{"span_entered":{"id":2}}} nixops| 2025-07-03T13:29:39.133393Z TRACE nixops4-eval-queue-worker: nixops4_eval: enter nixops| warning: Git tree '/home/kiara/code/Fediversity' is dirty nixops| received: {"TracingEvent":{"span_exited":{"id":2}}} nixops| 2025-07-03T13:29:39.180494Z TRACE nixops4-eval-queue-worker: nixops4_eval: exit nixops| received: {"TracingEvent":{"span_entered":{"id":2}}} nixops| 2025-07-03T13:29:39.180524Z TRACE nixops4-eval-queue-worker: nixops4_eval: enter nixops| received: {"TracingEvent":{"span_exited":{"id":2}}} nixops| 2025-07-03T13:29:39.180848Z TRACE nixops4-eval-queue-worker: nixops4_eval: exit nixops| received: {"TracingEvent":{"span_entered":{"id":2}}} nixops| 2025-07-03T13:29:39.180864Z TRACE nixops4-eval-queue-worker: nixops4_eval: enter nixops| received: {"QueryResponse":[{"id":2},{"ListResources":[{"id":1},["garage-configuration","mastodon-configuration","peertube-configuration","pixelfed-configuration"]]}]} nixops| The following resources will be checked, created and/or updated: nixops| - garage-configuration nixops| - mastodon-configuration nixops| - peertube-configuration nixops| - pixelfed-configuration nixops| sending: {"LoadResource":{"assign_to":{"id":3},"payload":{"deployment":{"id":1},"name":"garage-configuration"}}} nixops| sending: {"GetResource":{"message_id":{"id":7},"payload":{"id":3}}} nixops| sending: {"ListResourceInputs":{"message_id":{"id":8},"payload":{"id":3}}} nixops| sending: {"LoadResource":{"assign_to":{"id":4},"payload":{"deployment":{"id":1},"name":"mastodon-configuration"}}} nixops| sending: {"GetResource":{"message_id":{"id":9},"payload":{"id":4}}} nixops| sending: {"ListResourceInputs":{"message_id":{"id":10},"payload":{"id":4}}} nixops| sending: {"LoadResource":{"assign_to":{"id":5},"payload":{"deployment":{"id":1},"name":"peertube-configuration"}}} nixops| sending: {"GetResource":{"message_id":{"id":11},"payload":{"id":5}}} nixops| sending: {"ListResourceInputs":{"message_id":{"id":12},"payload":{"id":5}}} nixops| sending: {"LoadResource":{"assign_to":{"id":6},"payload":{"deployment":{"id":1},"name":"pixelfed-configuration"}}} nixops| sending: {"GetResource":{"message_id":{"id":13},"payload":{"id":6}}} nixops| sending: {"ListResourceInputs":{"message_id":{"id":14},"payload":{"id":6}}} nixops| received: {"TracingEvent":{"span_exited":{"id":2}}} nixops| 2025-07-03T13:29:39.181545Z TRACE nixops4-eval-queue-worker: nixops4_eval: exit nixops| received: {"TracingEvent":{"span_entered":{"id":2}}} nixops| 2025-07-03T13:29:39.181616Z TRACE nixops4-eval-queue-worker: nixops4_eval: enter nixops| received: {"Error":[{"id":3},"\u001b[31;1merror:\u001b[0m\n … while evaluating the attribute '\u001b[35;1moptionalValue.value\u001b[0m'\n \u001b[34;1mat \u001b[35;1m/nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:894:27\u001b[0m:\n 893| optionalValue =\n 894| if isDefined then { value = mergedValue; }\n | \u001b[31;1m^\u001b[0m\n 895| else {};\n\n … while evaluating the attribute '\u001b[35;1mconfig\u001b[0m'\n \u001b[34;1mat \u001b[35;1m/nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:334:9\u001b[0m:\n 333| options = checked options;\n 334| config = checked (removeAttrs config [ \"_module\" ]);\n | \u001b[31;1m^\u001b[0m\n 335| _module = checked (config._module);\n\n \u001b[35;1m(stack trace truncated; use '--show-trace' to show the full, detailed trace)\u001b[0m\n\n \u001b[31;1merror:\u001b[0m The module /nix/store/qqcahbkmi1idhv3ljsf8g23avvnp57id-source/infra/common/proxmox-qemu-vm.nix was imported into nixops4Resource instead of nixos."]} nixops| Error on id 3: error: nixops| … while evaluating the attribute 'optionalValue.value' nixops| at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:894:27: nixops| 893| optionalValue = nixops| 894| if isDefined then { value = mergedValue; } nixops| | ^ nixops| 895| else {}; nixops| nixops| … while evaluating the attribute 'config' nixops| at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:334:9: nixops| 333| options = checked options; nixops| 334| config = checked (removeAttrs config [ "_module" ]); nixops| | ^ nixops| 335| _module = checked (config._module); nixops| nixops| (stack trace truncated; use '--show-trace' to show the full, detailed trace) nixops| nixops| error: The module /nix/store/qqcahbkmi1idhv3ljsf8g23avvnp57id-source/infra/common/proxmox-qemu-vm.nix was imported into nixops4Resource instead of nixos. nixops| 2025-07-03T13:29:39.187617Z TRACE nixops4-eval-queue-worker: nixops4_eval: exit nixops| 2025-07-03T13:29:39.187623Z TRACE nixops4-eval-stdin-reader: nixops4_eval: close time.busy=0.00ns time.idle=56.6ms nixops| 2025-07-03T13:29:39.187631Z TRACE nixops4-eval-queue-worker: nixops4_eval: close time.busy=54.1ms time.idle=2.53ms nixops4 error: Error during evaluation: error: … while evaluating the attribute 'optionalValue.value' at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:894:27: 893| optionalValue = 894| if isDefined then { value = mergedValue; } | ^ 895| else {}; … while evaluating the attribute 'config' at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:334:9: 333| options = checked options; 334| config = checked (removeAttrs config [ "_module" ]); | ^ 335| _module = checked (config._module); (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: The module /nix/store/qqcahbkmi1idhv3ljsf8g23avvnp57id-source/infra/common/proxmox-qemu-vm.nix was imported into nixops4Resource instead of nixos. ``` </details>
Owner

I suppose not #93, but it also doesn't seem to be #393. Maybe a typo in what introduced the issue?

I suppose not #93, but it also doesn't seem to be #393. Maybe a typo in what introduced the issue?
Author
Owner

this error should affect files:

  • machines/dev/fedi200/default.nix
  • machines/dev/fedi201/default.nix
  • machines/dev/vm02116/default.nix
  • machines/dev/vm02187/default.nix
this patch appeared not to fix it tho
diff --git a/machines/dev/fedi200/default.nix b/machines/dev/fedi200/default.nix
index c92c8d52..c787483f 100644
--- a/machines/dev/fedi200/default.nix
+++ b/machines/dev/fedi200/default.nix
@@ -18,6 +18,8 @@
   };

   nixos.module = {
+    _class = "nixos";
+
     imports = [
       ../../../infra/common/proxmox-qemu-vm.nix
     ];
diff --git a/machines/dev/fedi201/default.nix b/machines/dev/fedi201/default.nix
index 00717597..de27a420 100644
--- a/machines/dev/fedi201/default.nix
+++ b/machines/dev/fedi201/default.nix
@@ -18,6 +18,8 @@
   };

   nixos.module = {
+    _class = "nixos";
+
     imports = [
       ../../../infra/common/proxmox-qemu-vm.nix
       ./fedipanel.nix
diff --git a/machines/dev/vm02116/default.nix b/machines/dev/vm02116/default.nix
index 77253a7c..a28228ce 100644
--- a/machines/dev/vm02116/default.nix
+++ b/machines/dev/vm02116/default.nix
@@ -13,6 +13,8 @@
   nixos.module =
     { lib, ... }:
     {
+      _class = "nixos";
+
       imports = [
         ../../../infra/common/proxmox-qemu-vm.nix
         ./forgejo.nix
diff --git a/machines/dev/vm02187/default.nix b/machines/dev/vm02187/default.nix
index ab3e5d12..5e5698db 100644
--- a/machines/dev/vm02187/default.nix
+++ b/machines/dev/vm02187/default.nix
@@ -13,6 +13,8 @@
   nixos.module =
     { lib, ... }:
     {
+      _class = "nixos";
+
       imports = [
         ../../../infra/common/proxmox-qemu-vm.nix
         ./wiki.nix
this error should affect files: - `machines/dev/fedi200/default.nix` - `machines/dev/fedi201/default.nix` - `machines/dev/vm02116/default.nix` - `machines/dev/vm02187/default.nix` <details> <summary> this patch appeared not to fix it tho </summary> ```patch diff --git a/machines/dev/fedi200/default.nix b/machines/dev/fedi200/default.nix index c92c8d52..c787483f 100644 --- a/machines/dev/fedi200/default.nix +++ b/machines/dev/fedi200/default.nix @@ -18,6 +18,8 @@ }; nixos.module = { + _class = "nixos"; + imports = [ ../../../infra/common/proxmox-qemu-vm.nix ]; diff --git a/machines/dev/fedi201/default.nix b/machines/dev/fedi201/default.nix index 00717597..de27a420 100644 --- a/machines/dev/fedi201/default.nix +++ b/machines/dev/fedi201/default.nix @@ -18,6 +18,8 @@ }; nixos.module = { + _class = "nixos"; + imports = [ ../../../infra/common/proxmox-qemu-vm.nix ./fedipanel.nix diff --git a/machines/dev/vm02116/default.nix b/machines/dev/vm02116/default.nix index 77253a7c..a28228ce 100644 --- a/machines/dev/vm02116/default.nix +++ b/machines/dev/vm02116/default.nix @@ -13,6 +13,8 @@ nixos.module = { lib, ... }: { + _class = "nixos"; + imports = [ ../../../infra/common/proxmox-qemu-vm.nix ./forgejo.nix diff --git a/machines/dev/vm02187/default.nix b/machines/dev/vm02187/default.nix index ab3e5d12..5e5698db 100644 --- a/machines/dev/vm02187/default.nix +++ b/machines/dev/vm02187/default.nix @@ -13,6 +13,8 @@ nixos.module = { lib, ... }: { + _class = "nixos"; + imports = [ ../../../infra/common/proxmox-qemu-vm.nix ./wiki.nix ``` </details>
Author
Owner

@Niols i think the was imported into nixops4Resource instead of nixos related to the _class differences, no?

@Niols i think the `was imported into nixops4Resource instead of nixos` related to the `_class` differences, no?
Owner

Sounds like it, yes. But which of our PRs introduced the change?

Sounds like it, yes. But which of our PRs introduced the change?
Author
Owner

a bisect points to 1c92009879 as having caused:

  • this, which:
    • removing all nixops4Resource classes did not address somehow
    • removing the class in that qemu file did resolve
  • the infinite recursion error
a bisect points to 1c920098795e as having caused: - this, which: - removing all `nixops4Resource` classes did not address somehow - removing the class in that qemu file did resolve - the infinite recursion error
kiara closed this issue 2025-07-11 16:09:30 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#397 WIP: add attic cache
fediversity/fediversity
Reference
fediversity/fediversity#431
No description provided.