Open markusewalker opened 1 month ago
v2.7.16-alpha5
v1.26.15+k3s1
When performing release testing with v2.7.16-alpha5, QA automation picked up the following issue after a cluster finishes provisioning:
Error: Received unexpected error: FatalError{Underlying: error while running command: exit status 1; Error: Setting cluster V2 legacy data: Malformed version: with rancher2_cluster_v2.rancher2_cluster_v2, on main.tf line 45, in resource "rancher2_cluster_v2" "rancher2_cluster_v2": 45: resource "rancher2_cluster_v2" "rancher2_cluster_v2" { }
Utilizing the same main.tf, 2.8 and 2.9 are working as expected, using Rancher2 4.x.x and 5.x.x, respectively. Here is the main.tf:
main.tf
terraform { required_providers { rancher2 = { source = "rancher/rancher2" version = "3.0.0" } } } provider "rancher2" { api_url = "https://..." token_key = "<removed>" insecure = true } resource "rancher2_user" "rancher2_user" { name = "auto-testuser-ofcvi" username = "auto-testuser-ofcvi" password = "<removed>" enabled = true } resource "rancher2_global_role_binding" "rancher2_global_role_binding" { name = "auto-testuser-ofcvi" global_role_id = "user" user_id = rancher2_user.rancher2_user.id } resource "rancher2_cloud_credential" "rancher2_cloud_credential" { name = "mew-tf-creds" linode_credential_config { token = "<removed>" } } resource "rancher2_machine_config_v2" "rancher2_machine_config_v2" { generate_name = "mew-tf" linode_config { image = "linode/ubuntu22.04" region = "us-east" root_pass = "<removed>" } } resource "rancher2_cluster_v2" "rancher2_cluster_v2" { name = "auto-tfp-snljv" kubernetes_version = "v1.27.16+k3s1" enable_network_policy = false default_cluster_role_for_project_members = "true" rke_config { machine_pools { name = "auto-tfp-ieqzk0" cloud_credential_secret_name = rancher2_cloud_credential.rancher2_cloud_credential.id control_plane_role = false etcd_role = true worker_role = false quantity = 1 machine_config { kind = rancher2_machine_config_v2.rancher2_machine_config_v2.kind name = rancher2_machine_config_v2.rancher2_machine_config_v2.name } } machine_pools { name = "auto-tfp-ieqzk1" cloud_credential_secret_name = rancher2_cloud_credential.rancher2_cloud_credential.id control_plane_role = true etcd_role = false worker_role = false quantity = 1 machine_config { kind = rancher2_machine_config_v2.rancher2_machine_config_v2.kind name = rancher2_machine_config_v2.rancher2_machine_config_v2.name } } machine_pools { name = "auto-tfp-ieqzk2" cloud_credential_secret_name = rancher2_cloud_credential.rancher2_cloud_credential.id control_plane_role = false etcd_role = false worker_role = true quantity = 1 machine_config { kind = rancher2_machine_config_v2.rancher2_machine_config_v2.kind name = rancher2_machine_config_v2.rancher2_machine_config_v2.name } } upgrade_strategy { control_plane_concurrency = "10%" worker_concurrency = "10%" } } }
Setting cluster V2 legacy data: Malformed version
Cluster should provision without any issue.
Cluster returns an error after provisioning is done.
FYI that I reproduced this using vanilla Terraform with the above main.tf. So this is not just specific to QA automation.
Rancher Server Setup
v2.7.16-alpha5
Information about the Cluster
v1.26.15+k3s1
When performing release testing with
v2.7.16-alpha5
, QA automation picked up the following issue after a cluster finishes provisioning:Utilizing the same
main.tf
, 2.8 and 2.9 are working as expected, using Rancher2 4.x.x and 5.x.x, respectively. Here is themain.tf
:To Reproduce
Setting cluster V2 legacy data: Malformed version
after cluster is provisioned.Actual Result
Cluster should provision without any issue.
Expected Result
Cluster returns an error after provisioning is done.