Repository navigation
Conversation
OpenTofu TestOpenTofu test passed. View run output |
OpenTofu PlanOpenTofu plan passed. View run outputOpenTofu will perform the following actions:
# module.k3s.libvirt_cloudinit_disk.commoninit will be created
+ resource "libvirt_cloudinit_disk" "commoninit" {
+ id = (known after apply)
+ meta_data = <<-EOT
instance-id: k3s
local-hostname: k3s
EOT
+ name = "k3s_commoninit"
+ network_config = <<-EOT
version: 2
ethernets:
enp1s0:
dhcp4: true
enp2s0:
dhcp4: false
addresses:
- 192.168.102.2/24
EOT
+ path = (known after apply)
+ size = (known after apply)
+ user_data = (sensitive value)
}
# module.k3s.libvirt_domain.vm will be updated in-place
~ resource "libvirt_domain" "vm" {
~ devices = {
~ disks = [
~ {
- device = "cdrom" -> null
+ driver = {
+ discard = "unmap"
+ name = "qemu"
+ type = "raw"
}
+ serial = "k3s-retained-ssd"
~ source = {
+ file = {
+ file = "/mnt/ssd/persistent/k3s-pv-ssd.raw"
}
- volume = {
- pool = "cluster" -> null
- volume = "k3s_cloudinit.iso" -> null
} -> null
}
~ target = {
~ bus = "sata" -> "virtio"
~ dev = "sda" -> "vdc"
}
},
+ {
+ driver = {
+ discard = "unmap"
+ name = "qemu"
+ type = "raw"
}
+ serial = "k3s-retained-nvme"
+ source = {
+ file = {
+ file = "/mnt/nvme/persistent/k3s-pv-nvme.raw"
}
}
+ target = {
+ bus = "virtio"
+ dev = "vdd"
}
},
+ {
+ device = "cdrom"
+ source = {
+ volume = {
+ pool = "cluster"
+ volume = "k3s_cloudinit.iso"
}
}
+ target = {
+ bus = "sata"
+ dev = "sda"
}
},
# (2 unchanged elements hidden)
]
# (2 unchanged attributes hidden)
}
id = 1
name = "k3s"
# (10 unchanged attributes hidden)
}
# module.k3s.libvirt_volume.cloudinit will be replaced due to changes in replace_triggered_by
-/+ resource "libvirt_volume" "cloudinit" {
~ allocation = 49152 -> (known after apply)
~ capacity = 49152 -> (known after apply)
~ create = {
~ content = {
~ url = "/tmp/terraform-provider-libvirt-cloudinit/cloudinit-4c952d6c62b57a7c.iso" -> (known after apply)
}
}
~ id = "/mnt/nvme/cluster/k3s_cloudinit.iso" -> (known after apply)
~ key = "/mnt/nvme/cluster/k3s_cloudinit.iso" -> (known after apply)
name = "k3s_cloudinit.iso"
~ path = "/mnt/nvme/cluster/k3s_cloudinit.iso" -> (known after apply)
~ physical = 49152 -> (known after apply)
# (1 unchanged attribute hidden)
}
# module.k3s.terraform_data.cloudinit_content will be updated in-place
~ resource "terraform_data" "cloudinit_content" {
id = "7de40bc4-9054-f847-1b2b-d84f3f3af2d1"
~ input = (sensitive value)
~ output = "b363b3b1637577baa97428e2069ee49eaec7cbbaf0429b889d527db4e17ba7cf" -> (known after apply)
}
# module.runner.libvirt_cloudinit_disk.commoninit will be created
+ resource "libvirt_cloudinit_disk" "commoninit" {
+ id = (known after apply)
+ meta_data = <<-EOT
instance-id: runner
local-hostname: runner
EOT
+ name = "runner_commoninit"
+ network_config = (sensitive value)
+ path = (known after apply)
+ size = (known after apply)
+ user_data = (sensitive value)
}
Plan: 3 to add, 2 to change, 1 to destroy.
OpenTofu will perform the following actions:
# module.k3s.libvirt_cloudinit_disk.commoninit will be created
+ resource "libvirt_cloudinit_disk" "commoninit" {
+ id = (known after apply)
+ meta_data = <<-EOT
instance-id: k3s
local-hostname: k3s
EOT
+ name = "k3s_commoninit"
+ network_config = <<-EOT
version: 2
ethernets:
enp1s0:
dhcp4: true
enp2s0:
dhcp4: false
addresses:
- 192.168.102.2/24
EOT
+ path = (known after apply)
+ size = (known after apply)
+ user_data = (sensitive value)
}
# module.k3s.libvirt_domain.vm will be updated in-place
~ resource "libvirt_domain" "vm" {
~ devices = {
~ disks = [
~ {
- device = "cdrom" -> null
+ driver = {
+ discard = "unmap"
+ name = "qemu"
+ type = "raw"
}
+ serial = "k3s-retained-ssd"
~ source = {
+ file = {
+ file = "/mnt/ssd/persistent/k3s-pv-ssd.raw"
}
- volume = {
- pool = "cluster" -> null
- volume = "k3s_cloudinit.iso" -> null
} -> null
}
~ target = {
~ bus = "sata" -> "virtio"
~ dev = "sda" -> "vdc"
}
},
+ {
+ driver = {
+ discard = "unmap"
+ name = "qemu"
+ type = "raw"
}
+ serial = "k3s-retained-nvme"
+ source = {
+ file = {
+ file = "/mnt/nvme/persistent/k3s-pv-nvme.raw"
}
}
+ target = {
+ bus = "virtio"
+ dev = "vdd"
}
},
+ {
+ device = "cdrom"
+ source = {
+ volume = {
+ pool = "cluster"
+ volume = "k3s_cloudinit.iso"
}
}
+ target = {
+ bus = "sata"
+ dev = "sda"
}
},
# (2 unchanged elements hidden)
]
# (2 unchanged attributes hidden)
}
id = 1
name = "k3s"
# (10 unchanged attributes hidden)
}
# module.k3s.libvirt_volume.cloudinit will be replaced due to changes in replace_triggered_by
-/+ resource "libvirt_volume" "cloudinit" {
~ allocation = 49152 -> (known after apply)
~ capacity = 49152 -> (known after apply)
~ create = {
~ content = {
~ url = "/tmp/terraform-provider-libvirt-cloudinit/cloudinit-4c952d6c62b57a7c.iso" -> (known after apply)
}
}
~ id = "/mnt/nvme/cluster/k3s_cloudinit.iso" -> (known after apply)
~ key = "/mnt/nvme/cluster/k3s_cloudinit.iso" -> (known after apply)
name = "k3s_cloudinit.iso"
~ path = "/mnt/nvme/cluster/k3s_cloudinit.iso" -> (known after apply)
~ physical = 49152 -> (known after apply)
# (1 unchanged attribute hidden)
}
# module.k3s.terraform_data.cloudinit_content will be updated in-place
~ resource "terraform_data" "cloudinit_content" {
id = "7de40bc4-9054-f847-1b2b-d84f3f3af2d1"
~ input = (sensitive value)
~ output = "b363b3b1637577baa97428e2069ee49eaec7cbbaf0429b889d527db4e17ba7cf" -> (known after apply)
}
# module.runner.libvirt_cloudinit_disk.commoninit will be created
+ resource "libvirt_cloudinit_disk" "commoninit" {
+ id = (known after apply)
+ meta_data = <<-EOT
instance-id: runner
local-hostname: runner
EOT
+ name = "runner_commoninit"
+ network_config = (sensitive value)
+ path = (known after apply)
+ size = (known after apply)
+ user_data = (sensitive value)
}
Plan: 3 to add, 2 to change, 1 to destroy. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HOLD — verified disruptive apply: the earlier CI resource-action summary does not replace the k3s VM or boot/data volumes; it updates the domain in place and replaces the cloud-init ISO. However, libvirt provider 0.9.9 Update stops, redefines and restarts a running VM for device changes. Its default shutdown timeout is 30 seconds with forced power-off on timeout. Therefore this is not a non-disruptive attachment. Do not merge/apply before the owner-approved data-protection/migration and external-control gates. Important state must be inventoried beyond PVC declarations, and a later full rebuild must not precede verified migration to retained storage. No live setup or migration has occurred.
Prepare two externally owned sparse raw disks for k3s: SSD 1.25 TiB and NVMe 400 GiB. Attach as
vdc/vdd, preservingvdaand managedvdb. Add UUID-based XFS mount units and fail-closed k3s dependencies/checks.Depends on terraform-libvirt-domain #28; k3s pins reviewed module commit
5f89c3206c5ae48096cb38bd3714317d9f2b9a20. Owner-requested preparation, no issue reference. Not ready for apply or live setup.Type of change
Validation
Latest root CI passed test and plan on
65788f9f943663ffc9ca56b22f2692cb2c0ebf5c; apply was skipped. Selected producer CI passed all 27 mock tests on5f89c3206c5ae48096cb38bd3714317d9f2b9a20. This is CI validation, not capture, restore or runtime verification.Use unchanged PR CI/pre-commit and credentialed plan. Root README is generated in replace mode; existing automation may commit updates to this branch. No workflow, runner image or centralized hook changes.
Adversarial, infrastructure-security, delivery-integration and release reviews cleared the completed candidate. QA identified an explicit gap: there are no dedicated root cloud-init render/guest behavior tests. The owner declined the proposed new CI job; this is an accepted CI coverage gap, not runtime safety verification or a waiver. Module #28 adds 22 mock tests through existing module CI. No local OpenTofu commands ran.
Before any apply: inspect resource actions for VM replacement or unexpected boot/data volume changes, obtain verified recovery protection, and establish control outside the affected node. Existing observed boot drift (5 GiB live versus 20 GiB declared) is not intentionally corrected here.
Impact and rollout
main.tf,cloud-init/k3s/cloud_init.cfg, operational contract inAGENTS.md; generated README may follow automatically. Existing runner source and managed volume declarations unchanged.libvirt_volumeresources. No file creation, resizing, import, new-disk formatting or deletion. Paths, capacities and intended UUIDs are documented inAGENTS.md.kustomize-clusterowns StorageClass/static PV/PVC work. No Kubernetes objects, claim replacement or migration are included. Rebinding, recovery and discard/TRIM remain unverified.Safety and secrets
AI-assisted implementation and independent specialist reviews. No host/guest mutations, merge, publication, deployment or workflow dispatch requested.