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

failure using IPv6 controller address. #582

Open
hmlanigan opened this issue Sep 19, 2024 · 1 comment
Open

failure using IPv6 controller address. #582

hmlanigan opened this issue Sep 19, 2024 · 1 comment
Labels
area/client kind/bug indicates a bug in the project

Comments

@hmlanigan
Copy link
Member

Description

Seen in acceptance tests and locally. When the first controller ip address provided is IPv6, the following error occurs. Even if the 2nd address provided is IPv4. Swapping the order of the ip address list or removing the IPv6 address resolves the issue.

=== NAME TestAcc_ResourceIntegrationWithMultipleConsumers
resource_integration_test.go:222: Step 3/3 error: Error running post-apply refresh plan: exit status 1

    Error: Client Error
    
      with juju_offer.a,
      on terraform_plugin_test.tf line 26, in resource "juju_offer" "a":
      26: resource "juju_offer" "a" {
    
    host addresses: cannot parse "10.25.111.110:17070,[fd42:ad8:5d38:946a:216:"
    as address:port: address 10.25.111.110:17070,[fd42:ad8:5d38:946a:216:: too
    many colons in address not valid
    
    Error: Not Found
    
      with juju_application.b1,
      on terraform_plugin_test.tf line 36, in resource "juju_application" "b1":
      36: resource "juju_application" "b1" {
    
    host addresses: cannot parse "10.25.111.110:17070,[fd42:ad8:5d38:946a:216:"
    as address:port: address 10.25.111.110:17070,[fd42:ad8:5d38:946a:216:: too
    many colons in address not valid

--- FAIL: TestAcc_ResourceIntegrationWithMultipleConsumers (332.27s)

Urgency

Annoying bug in our test suite

Terraform Juju Provider version

0.13.0, 0.14.0

Terraform version

1.9.x

Juju version

3.5.x

Terraform Configuration(s)

Check the controller ip addresses with `juju show-controller`, E.g.
['[fd42:13c3:1760:6d89:216:3eff:feb6:d595]:17070', '10.41.184.52:17070']

Or change the value of JUJU_CONTROLLER_ADDRESSES to put the IPv6 address first.

Reproduce / Test

terraform {
  required_providers {
    juju = {
      version = ">= 0.14.0"
      source  = "juju/juju"
    }
  }
}

provider "juju" {}

resource "juju_model" "testmodel" {
  name = "machinetest"
}

Debug/Panic Output

No response

Notes & References

No response

@hmlanigan hmlanigan added kind/bug indicates a bug in the project area/client labels Sep 19, 2024
@hmlanigan
Copy link
Member Author

Take a look at using net.JoinHostPort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client kind/bug indicates a bug in the project
Projects
None yet
Development

No branches or pull requests

1 participant