Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] Error during creation of the XenServer Hypervisor Connection #172

Closed
RaviSA-Citrix opened this issue Jan 7, 2025 · 1 comment
Closed
Labels
bug Something isn't working 🔧

Comments

@RaviSA-Citrix
Copy link

RaviSA-Citrix commented Jan 7, 2025

Terraform v1.10.0
citrix/citrix v1.0.8
xenserver/xenserver v0.2.0
xenserver 8.2 CU1
CVAD 2402 CU1, Operation system Windows 2022

To Create the XenServer Hypervisor Connection, I have to enter username/password directly in the code, as code is unable to read them from .tfvars, even when pwd is marked as 'sensitive' in variables.tf.

With username and password entered in the code, getting below error after 'terraform apply':

│ Error: Error creating Hypervisor XD_Pool_0

│ with citrix_xenserver_hypervisor.CreateHypervisorConnection_0,
│ on xenserver_hypervisor.tf line 12, in resource "citrix_xenserver_hypervisor" "CreateHypervisorConnection_0":
│ 12: resource "citrix_xenserver_hypervisor" "CreateHypervisorConnection_0" {

│ Hypervisor XD_Pool_0 is stuck in initializing state. Delete the hypervisor and try again.


│ Error: Error creating Hypervisor XD_Pool_1

│ with citrix_xenserver_hypervisor.CreateHypervisorConnection_1,
│ on xenserver_hypervisor.tf line 25, in resource "citrix_xenserver_hypervisor" "CreateHypervisorConnection_1":
│ 25: resource "citrix_xenserver_hypervisor" "CreateHypervisorConnection_1" {

│ Hypervisor XD_Pool_1 is stuck in initializing state. Delete the hypervisor and try again.

Code:

# Get Zone resource by name
data "citrix_zone" "test_zone" {
    name = "Primary"
}

output "zone_output" {
    value = data.citrix_zone.test_zone.id
}

Creating the XenServer Hypervisor Connection

resource "citrix_xenserver_hypervisor" "CreateHypervisorConnection_0" {
name = "XD_Pool_0"
zone = data.citrix_zone.test_zone.id
username = "username"
password = "password"
password_format = "PlainText"
addresses = [
"http://",
"http://",
]

}

resource "citrix_xenserver_hypervisor" "CreateHypervisorConnection_1" {

depends_on = [ citrix_xenserver_hypervisor.CreateHypervisorConnection_0 ]

name            = "XD_Pool_1"
zone            = data.citrix_zone.test_zone.id
username        = "username"
password        = "password"        
password_format = "PlainText"
addresses       = [
    "http://<ipaddress>",
    "http://<ipaddress>",
]

}

CitrixIssueId: 60231

@RaviSA-Citrix RaviSA-Citrix added the bug Something isn't working label Jan 7, 2025
@RaviSA-Citrix
Copy link
Author

With citrix v1.0.9 provider, we are no longer getting the error now. So, this cane be closed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working 🔧
Projects
None yet
Development

No branches or pull requests

2 participants