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

[BUG] Creating a rancher2_catalog_v2 with an OCI Helm Repository never finishes creation #1421

Closed
AlexisDaciuk opened this issue Oct 2, 2024 · 1 comment

Comments

@AlexisDaciuk
Copy link

Rancher Server Setup

  • Rancher version: 2.9.2
  • Installation option (Docker install/Helm Chart): Docker Install
  • Proxy/Cert Details: Included LetsEncrypt, no proxy

Information about the Cluster

  • Kubernetes version: v1.29.8 +rke2r1
  • Cluster Type (Local/Downstream): RKE2 deployed in EC2

User Information

  • What is the role of the user logged in? Admin (using rancher_bootstrap token)

Provider Information

  • What is the version of the Rancher v2 Terraform Provider in use? 5.1.0
  • What is the version of Terraform in use? 1.9.6
  • What is the version of Terragrunt in use? v0.66.9

Describe the bug

When creating a rancher2_catalog_v2 resource, the providers expects a Downloaded state, but when using an OCI repository the state is OCIDownloaded so the provider never ends the resource creation

To Reproduce

Create a rancher2_catalog_v2

resource "rancher2_catalog_v2" "private_catalogs" {
  cluster_id = var.RANCHER_CLUSTER_ID
  name       = var.NAME
  url        = var.URL
  secret_name = var.SECRET_NAME
  secret_namespace = var.SECRET_NAMESPACE
}

And the terragrunt / terraform execution gets stuck at

[DEBUG] provider.terraform-provider-rancher2_v5.1.0: 2024/10/02 16:30:06 [DEBUG] Waiting for state to become: [downloaded]

Taking a look into the YAML of the created catalog we can see that the state is OCIDownloaded

status:
  conditions:
    - lastUpdateTime: '2024-10-02T19:19:57Z'
      status: 'True'
      type: FollowerDownloaded
    - lastUpdateTime: '2024-10-02T19:19:59Z'
      status: 'True'
      type: OCIDownloaded

So the provider will never end because it is waiting for a state that won't exist in a OCI repository

Actual Result

The provider creates the repository but the Terragrunt / Terraform executions gets stuck

Expected Result

The provider creates the repository without getting stuck

Screenshots

Taking a look into the created catalog, is in an Active state and the Charts that it contains can be seen and used from within Rancher

Screenshot_20241002_161126

The state of the repo is OCIDownloaded

Screenshot_20241002_162250

But the provider is waiting for Download

Screenshot_20241002_165317

Cheers
Alex

@matttrach
Copy link
Collaborator

This was merged in Nov and has been released in https://github.com/rancher/terraform-provider-rancher2/releases/tag/v6.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants