Skip to content

staging: add rancher-monitoring dependencies on test cluster

Guillaume Samson requested to merge rancher_monitoring into master

Related to sysadm-environment#5018 (closed)

Adding a resource rancher2_cluster_sync and an argument depends_on on rancher-monitoring resource with cluster, cluster_sync and nodes as values allow to create/destroy a cluster without errors.

Cluster creation

ᐅ terraform apply "test-staging-rke2.plan"
rancher2_cluster_v2.test-staging-rke2: Creating...
rancher2_cluster_v2.test-staging-rke2: Creation complete after 8s [id=fleet-default/test-staging-rke2]
rancher2_cluster_sync.test-staging-rke2: Creating...
module.rancher-node-test-rke2-worker2.proxmox_vm_qemu.node: Creating...
module.rancher-node-test-rke2-mgmt1.proxmox_vm_qemu.node: Creating...
module.rancher-node-test-rke2-worker1.proxmox_vm_qemu.node: Creating...
rancher2_cluster_sync.test-staging-rke2: Still creating... [10s elapsed]
[...]
rancher2_cluster_sync.test-staging-rke2: Still creating... [30m30s elapsed]
rancher2_cluster_sync.test-staging-rke2: Creation complete after 30m35s [id=c-m-2s7x98qv]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Creating...
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still creating... [10s elapsed]
[...]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still creating... [7m40s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Creation complete after 7m45s [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring]

Apply complete! Resources: 6 added, 0 changed, 0 destroyed.
[...]

Cluster destruction

ᐅ terraform apply "test-staging-rke2.plan"
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring, 10s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring, 20s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring, 30s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring, 40s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring, 50s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring, 1m0s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring, 1m10s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Still destroying... [id=c-m-2s7x98qv.cattle-monitoring-system/rancher-monitoring, 1m20s elapsed]
rancher2_app_v2.test-staging-rke2-rancher-monitoring: Destruction complete after 1m29s
module.rancher-node-test-rke2-mgmt1.proxmox_vm_qemu.node: Destroying... [id=uffizi/qemu/143]
module.rancher-node-test-rke2-worker2.proxmox_vm_qemu.node: Destroying... [id=uffizi/qemu/147]
module.rancher-node-test-rke2-worker1.proxmox_vm_qemu.node: Destroying... [id=uffizi/qemu/146]
rancher2_cluster_sync.test-staging-rke2: Destroying... [id=c-m-2s7x98qv]
rancher2_cluster_sync.test-staging-rke2: Destruction complete after 0s
module.rancher-node-test-rke2-worker1.proxmox_vm_qemu.node: Destruction complete after 4s
module.rancher-node-test-rke2-worker2.proxmox_vm_qemu.node: Destruction complete after 6s
module.rancher-node-test-rke2-mgmt1.proxmox_vm_qemu.node: Still destroying... [id=uffizi/qemu/143, 10s elapsed]
module.rancher-node-test-rke2-mgmt1.proxmox_vm_qemu.node: Destruction complete after 10s
rancher2_cluster_v2.test-staging-rke2: Destroying... [id=fleet-default/test-staging-rke2]
rancher2_cluster_v2.test-staging-rke2: Still destroying... [id=fleet-default/test-staging-rke2, 10s elapsed]
rancher2_cluster_v2.test-staging-rke2: Still destroying... [id=fleet-default/test-staging-rke2, 20s elapsed]
rancher2_cluster_v2.test-staging-rke2: Still destroying... [id=fleet-default/test-staging-rke2, 30s elapsed]
rancher2_cluster_v2.test-staging-rke2: Still destroying... [id=fleet-default/test-staging-rke2, 40s elapsed]
rancher2_cluster_v2.test-staging-rke2: Still destroying... [id=fleet-default/test-staging-rke2, 50s elapsed]
rancher2_cluster_v2.test-staging-rke2: Destruction complete after 55s

│ Warning: Applied changes may be incomplete

│ The plan was created with the -target option in effect, so some changes requested in the configuration may have been ignored and the output values may not be fully updated. Run the following command to verify that no other changes are pending:
│     terraform plan

│ Note that the -target option is not suitable for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform specifically suggests to use it as part of an error message.


Apply complete! Resources: 0 added, 0 changed, 6 destroyed.
[...]

Merge request reports