Skip to contentSkip to conversation

Makefile: terraform wasn't building the kdevops_nodes file

PATCH In review Chuck Lever 2 participants 2 messages Oct 2, 2025 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: terraform wasn't building the kdevops_nodes file

From: Daniel Gomez <[email protected]>

When "make bringup" runs "terraform plan", it complains that the kdevops_nodes variable isn't set.

extra_vars.yaml does contain the variable, but I'm guessing that somehow gen_nodes runs after gen_tfvars now? Not really sure.

Daniel suggests:

Quoted 2 lines

I think it'd be best to move KDEVOPS_NODES just after we assign the filename to it (provision.Makefile -> guestfs.Makefile):

Fixes 5457b742d611 ("Makefile: fix target dependency order")
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Daniel, I've totally lost the plot. Is this patch adequate for fixing the "terraform plan" failures, or do you have something else in mind?

Makefile +4 -4
index 9ea479c95a10..565f2b2bb4ee 100644
@@ -144,16 +144,16 @@ endif
 DEFAULT_DEPS += $(ANSIBLE_CFG_FILE)
 DEFAULT_DEPS += $(ANSIBLE_INVENTORY_FILE)
 
-ifneq (,$(KDEVOPS_NODES))
-DEFAULT_DEPS += $(KDEVOPS_NODES)
-endif
-
 include scripts/provision.Makefile
 include scripts/firstconfig.Makefile
 include scripts/systemd-timesync.Makefile
 include scripts/journal-server.Makefile
 include scripts/update_etc_hosts.Makefile
 
+ifneq (,$(KDEVOPS_NODES))
+DEFAULT_DEPS += $(KDEVOPS_NODES)
+endif
+
 KDEVOPS_BRING_UP_DEPS += $(KDEVOPS_BRING_UP_DEPS_EARLY)
 KDEVOPS_BRING_UP_DEPS += $(KDEVOPS_PROVISIONED_DEVCONFIG)
 
Signature · 1 line
2.51.0
#1 lore raw
Quoted 12 lines · Chuck Lever

From: Daniel Gomez <[email protected]>

When "make bringup" runs "terraform plan", it complains that the kdevops_nodes variable isn't set.

extra_vars.yaml does contain the variable, but I'm guessing that somehow gen_nodes runs after gen_tfvars now? Not really sure.

Daniel suggests:

Quoted 2 lines

I think it'd be best to move KDEVOPS_NODES just after we assign the filename to it (provision.Makefile -> guestfs.Makefile):

Quoted 8 lines
Fixes 5457b742d611 ("Makefile: fix target dependency order")
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Daniel, I've totally lost the plot. Is this patch adequate for fixing the "terraform plan" failures, or do you have something else in mind?

Yes, that is correct becuase we want/need to fill DEFAULT_DEPS after KDEVOPS_NODES is generated.

And sorry if I made it so confusing!