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

How to use multiple target nodes? #1081

Open
lug-gh opened this issue Aug 27, 2024 · 2 comments
Open

How to use multiple target nodes? #1081

lug-gh opened this issue Aug 27, 2024 · 2 comments

Comments

@lug-gh
Copy link

lug-gh commented Aug 27, 2024

Hello, in version v3.0.1-rc1 “multiple target nodes” were introduced. However, I cannot find a way to use this function, and unfortunately there is nothing in the documentation.

Based on the source code Nodes: strings.Split(itemMap["nodes"].(string), ","), , I assume that I have to submit the hosts as a string, separated by a comma. target_node = "pve1,pve2,pve3"

However, I then get the error "Error: 400 Parameter verification failed." when applying.
It is displayed in the plan without any problems.

@PascalKu
Copy link
Contributor

PascalKu commented Oct 24, 2024

This issue is still open, right? This is the actual code behind the field "target_nodes":

			"target_nodes": {
				Type:     schema.TypeList,
				Optional: true,
				Elem: &schema.Schema{
					Type: schema.TypeString,
				},
				Description: "A list of nodes where VM goes to",
			},

@lug-gh
Copy link
Author

lug-gh commented Oct 28, 2024

@PascalKu Thank you for pointing out that the “multiple hosts” configuration has a different name. I assumed that it would stay with “target_host” (without the s at the end).

"target_node": {
Type: schema.TypeString,
Optional: true,
Description: "The node where VM goes to",
},
"target_nodes": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Description: "A list of nodes where VM goes to",
},

I have now invested a lot of time in various tests, only to find out that the “target_node” functionality is currently broken for existing VMs anyway.

#1031

I remember that in the past, if a VM was on a node that did not match the target_host config, that VM would be moved. This is currently completely ignored, which is why “target_nodes” currently has no function.
In addition, target_nodes requires target_node, if this option is missing, terraform fails.

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

2 participants