Add the hypervisor url to the provider so we can call it with virsh d…#1934
Add the hypervisor url to the provider so we can call it with virsh d…#1934maximenoel8 wants to merge 2 commits intoSUSE:masterfrom
Conversation
84dabbc to
598302d
Compare
…uring deployment for checks (wait_for_ip)
598302d to
130bebf
Compare
There was a problem hiding this comment.
Pull request overview
This PR propagates the libvirt hypervisor connection URI into module inputs (in addition to configuring the libvirt provider), enabling deployments to verify VMs via virsh instead of waiting for an IP.
Changes:
- Add
libvirt_uritoprovider_settingsfor build-validation templates and many environment TF files. - Centralize libvirt connection strings in
locals { libvirt_uri = ... }and reference it from theprovider "libvirt"block. - Pass
libvirt_uridown to relevant modules so downstream steps can reuse the same connection target.
Reviewed changes
Copilot reviewed 105 out of 105 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| terracumber_config/tf_files/templates/build-validation-single-provider.tf | Add libvirt_uri into base provider settings for single-provider validation. |
| terracumber_config/tf_files/templates/build-validation-multi-providers.tf | Add libvirt_uri into provider settings across multiple base modules. |
| terracumber_config/tf_files/templates/PR-testing.tf | Introduce local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Ubuntu2404-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Ubuntu2204-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Ubuntu2004.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Ubuntu2004-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Ubuntu1804.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Ubuntu1804-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLMicro61.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLMicro61-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLMicro60.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLMicro60-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP7.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP7-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP6.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP6-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP5.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP5-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP4.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP4-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP3.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP3-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP1.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES15SP1-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-SLES12SP5-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Leap156.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Leap156-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Debian12-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Debian10.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-Debian10-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-CENTOS7-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-AlmaLinux9-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-AlmaLinux8.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-AlmaLinux8-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Testing-AlmaLinux10-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Saltstack-Tumbleweed.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Saltstack-Leap156.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Ubuntu2404-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Ubuntu2204-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Ubuntu2004.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Ubuntu2004-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Ubuntu1804.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Ubuntu1804-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLMicro61.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLMicro61-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLMicro60.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLMicro60-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP7.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP7-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP6.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP6-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP5.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP5-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP4.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP4-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP3.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP3-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP1.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES15SP1-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-SLES12SP5-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Leap156.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Leap156-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Debian12-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Debian10.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-Debian10-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-CENTOS7-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-AlmaLinux9-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-AlmaLinux8.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-AlmaLinux8-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/salt-shaker/Salt-Shaker-Next-AlmaLinux10-Bundle.tf | Use local.libvirt_uri for provider and pass into module provider settings. |
| terracumber_config/tf_files/personal/main_uyuni.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/personal/main_rke_uyuni.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/personal/main_rke_head.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/personal/main_head.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/personal/main_51.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/personal/main_50.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/personal/main_43.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/local_mirror.tf | Add local.libvirt_uri, use it for provider, and pass into module provider settings. |
| terracumber_config/tf_files/Uyuni-Master-tests-code-coverage-SLC.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/Uyuni-Master-refenv-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/Uyuni-Master-podman-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/Uyuni-Master-playwright-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/Uyuni-Master-RKE2-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/SUSEManager-5.0-refenv-SLC.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/SUSEManager-5.0-refenv-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/SUSEManager-5.0-SLC.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/SUSEManager-5.0-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/SUSEManager-4.3-refenv-SLC.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/SUSEManager-4.3-refenv-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/SUSEManager-4.3-SLC.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/SUSEManager-4.3-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Test-Vega-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Test-Orion-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Test-Naica-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Test-Ion-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Test-Hub.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Test-Hexagon-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Head-refenv-mcp-server.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Head-refenv-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Head-podman-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-Head-RKE2-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-5.1-refenv-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-5.1-SLC.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
| terracumber_config/tf_files/MLM-5.1-NUE.tf | Add local.libvirt_uri, use it for provider, and pass into module settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| provider_settings = { | ||
| pool = var.BASE_CONFIGURATIONS.base_rhlike.pool | ||
| bridge = var.BASE_CONFIGURATIONS.base_rhlike.bridge | ||
| libvirt_uri = "qemu+tcp://${var.BASE_CONFIGURATIONS.base_old_sle.hypervisor}/system" |
There was a problem hiding this comment.
In module "base_rhlike" the libvirt_uri is built from var.BASE_CONFIGURATIONS.base_old_sle.hypervisor, which looks like a copy/paste error and will point RHL-like builds at the wrong hypervisor. Use var.BASE_CONFIGURATIONS.base_rhlike.hypervisor here to match the rest of the module’s provider settings.
Bischoff
left a comment
There was a problem hiding this comment.
we could keep some ideas, but the use of an envvar sounds wrong to me
|
|
||
| locals { | ||
| libvirt_uri = "qemu+tcp://${var.ENVIRONMENT_CONFIGURATION[var.ENVIRONMENT].hypervisor}/system" | ||
| } |
There was a problem hiding this comment.
this introduces a dependancy towards an environment variable -> the main.tf can't work standalone anymore.
What does this PR ?
Add the hypervisor url to provider so we can call it for virsh verification during deployment (currently wait for ip)
Add this link to all