terraform-redhat / terraform-provider-rhcs

Terraform provider for Red Hat Cloud Services
Apache License 2.0
45 stars 79 forks source link

OCM-8537 | ci: Automated 74520 and updated 73431,72514,70129,70128 #705

Closed xueli181114 closed 4 months ago

xueli181114 commented 4 months ago

What this PR does / why we need it: This PR automated test cases for kubeletconfig on hosted cluster Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story (OCM-xxxx): Fixes # OCM-8537 Change type

Checklist

xueli181114 commented 4 months ago
lixue@Xue-Lis-MacBook-Pro terraform-provider-rhcs % ginkgo -focus "(73431|72514|70129|70128)" tests/e2e
......
time="2024-06-26T20:03:45+08:00" level=error msg="rhcs_hcp_machine_pool.mp: Refreshing state... [id=np-73431-iy]\n\nTerraform used the selected providers to generate the following execution\nplan. Resource actions are indicated with the following symbols:\n  ~ update in-place\n\nTerraform will perform the following actions:\n\n  # rhcs_hcp_machine_pool.mp will be updated in-place\n  ~ resource \"rhcs_hcp_machine_pool\" \"mp\" {\n        id                = \"np-73431-iy\"\n      + kubelet_configs   = \"notexisting\"\n        name              = \"np-73431-iy\"\n      ~ status            = {\n          ~ current_replicas = 0 -> (known after apply)\n          ~ message          = \"Minimum availability requires 2 replicas, current 0 available\" -> (known after apply)\n        } -> (known after apply)\n        # (9 unchanged attributes hidden)\n    }\n\nPlan: 0 to add, 1 to change, 0 to destroy.\n\nChanges to Outputs:\n  + kubelet_configs     = \"notexisting\"\n  - taints              = [\n      - {\n          - key           = \"\"\n          - schedule_type = \"NoSchedule\"\n          - value         = \"v1\"\n        },\n    ] -> null\nrhcs_hcp_machine_pool.mp: Modifying... [id=np-73431-iy]\n\nError: Failed to update machine pool\n\n  with rhcs_hcp_machine_pool.mp,\n  on main.tf line 26, in resource \"rhcs_hcp_machine_pool\" \"mp\":\n  26: resource \"rhcs_hcp_machine_pool\" \"mp\" {\n\nFailed to update machine pool 'np-73431-iy'  on cluster\n'2c4mkrmer14uj7idgp5j1o8ig3rt9vl6': status is 400, identifier is '400', code\nis 'CLUSTERS-MGMT-400' and operation identifier is\n'efddae7b-4931-44c1-ac0e-b1ee2cc9a688': KubeletConfig with name 'notexisting'\ndoes not exist for cluster '2c4mkrmer14uj7idgp5j1o8ig3rt9vl6'"
time="2024-06-26T20:03:45+08:00" level=info msg="Running terraform apply against the dir: /Users/lixue/Workspace/ocm-tf/terraform-provider-rhcs/tests/tf-manifests/rhcs/machine-pools/hcp with args [-var cluster=2c4mkrmer14uj7idgp5j1o8ig3rt9vl6 -var name=np-73431-iy -var machine_type=m5.2xlarge -var replicas=2 -var autoscaling_enabled=false -var subnet_id=subnet-030b42c1f1ab84024 -var auto_repair=true]"
time="2024-06-26T20:03:48+08:00" level=info msg="Running terraform destroy against the dir: /Users/lixue/Workspace/ocm-tf/terraform-provider-rhcs/tests/tf-manifests/rhcs/machine-pools/hcp"
args:  /usr/local/bin/terraform destroy -auto-approve -no-color -var cluster=2c4mkrmer14uj7idgp5j1o8ig3rt9vl6 -var name=np-73431-iy -var machine_type=m5.2xlarge -var replicas=2 -var autoscaling_enabled=false -var subnet_id=subnet-030b42c1f1ab84024 -var auto_repair=true
•SSSSSSSSSSSSSSSSSSSSSS

Ran 4 of 110 Specs in 241.546 seconds
SUCCESS! -- 4 Passed | 0 Failed | 0 Pending | 106 Skipped
PASS

Ginkgo ran 1 suite in 4m11.077663618s
Test Suite Passed
xueli181114 commented 4 months ago
lixue@Xue-Lis-MacBook-Pro terraform-provider-rhcs % ginkgo -focus "(73431|72514|70129|70128)" tests/e2e
...
sider clearing some, then try again\n\nError: Failed to create KubeletConfig\n\n  with rhcs_kubeletconfig.kubeletconfig[77],\n  on main.tf line 13, in resource \"rhcs_kubeletconfig\" \"kubeletconfig\":\n  13: resource \"rhcs_kubeletconfig\" \"kubeletconfig\" {\n\nFailed to create KubeletConfig on cluster '2c9e6k58ntdg4js7orhcseet0qonvjqo':\nstatus is 400, identifier is '400', code is 'CLUSTERS-MGMT-400' and operation\nidentifier is '5121620f-3e3f-428b-a8f8-361ac5cb8df5': Maximum number of\nKubeletConfigs per cluster reached. Maximum allowed is '100'. Please review\nexisting KubletConfigs and consider clearing some, then try again"
time="2024-07-03T22:09:20+08:00" level=debug msg="Deleting tfvars file /var/folders/0j/1t6hmxdj7yg1mpf336s21x9r0000gn/T/tfvars-197144919"
time="2024-07-03T22:09:20+08:00" level=info msg="Running terraform destroy against the dir /Users/lixue/Workspace/ocm-tf/terraform-provider-rhcs/tests/tf-manifests/rhcs/kubelet-config"
time="2024-07-03T22:09:20+08:00" level=debug msg="Running terraform command: [destroy -auto-approve -no-color -var-file /Users/lixue/Workspace/ocm-tf/terraform-provider-rhcs/tests/tf-manifests/rhcs/kubelet-config/terraform.e2e.tfvars]"
time="2024-07-03T22:09:20+08:00" level=error msg="Error: Failed to read variables file\n\nGiven variables file\n/Users/lixue/Workspace/ocm-tf/terraform-provider-rhcs/tests/tf-manifests/rhcs/kubelet-config/terraform.e2e.tfvars\ndoes not exist."
•SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

Ran 4 of 112 Specs in 194.159 seconds
SUCCESS! -- 4 Passed | 0 Failed | 0 Pending | 108 Skipped
PASS

Ginkgo ran 1 suite in 3m21.91154285s
Test Suite Passed
xueli181114 commented 4 months ago

/retest

xueli181114 commented 4 months ago

/test rosa-hcp-advanced-critical-high-presubmit

radtriste commented 4 months ago

/approve

ciaranRoche commented 4 months ago

/approve

openshift-ci[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ciaranRoche, radtriste

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/terraform-redhat/terraform-provider-rhcs/blob/main/OWNERS)~~ [ciaranRoche] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment