kinvolk / racker

rack provisioning utility for Kinvolk projects
Apache License 2.0
14 stars 3 forks source link

Error forcing PXE if mac address file is deleted on QEMU #42

Closed ipochi closed 3 years ago

ipochi commented 3 years ago

If the mac address file that is created in assets_dir is deleted and we try to reprovision, the reprovisioning fails due to the following error

module.flatcar-provisioning[0].null_resource.reprovision-node-when-ignition-changes (local-exec): /home/imran/go/src/github.com/kinvolk/racker/bootstrap/flatcar/assets/52:54:00:a1:9c:ae does not contain node-0, forcing PXE install
module.flatcar-provisioning[0].null_resource.reprovision-node-when-ignition-changes (local-exec): ERROR    The MAC address '52:54:00:a1:9c:ae' is in use by another virtual machine. (Use --check mac_in_use=off or --check all=off to override)
module.flatcar-provisioning[1].null_resource.reprovision-node-when-ignition-changes (local-exec): ERROR    The MAC address '52:54:00:b2:2f:86' is in use by another virtual machine. (Use --check mac_in_use=off or --check all=off to override)
module.flatcar-provisioning[0].null_resource.reprovision-node-when-ignition-changes (local-exec): checking that node-0 comes up
module.flatcar-provisioning[1].null_resource.reprovision-node-when-ignition-changes (local-exec): checking that node-1 comes up
module.flatcar-provisioning[0].null_resource.reprovision-node-when-ignition-changes (local-exec): Warning: Permanently added 'node-0,172.24.213.2' (ECDSA) to the list of known hosts.
module.flatcar-provisioning[1].null_resource.reprovision-node-when-ignition-changes (local-exec): Warning: Permanently added 'node-1,172.24.213.3' (ECDSA) to the list of known hosts.
module.flatcar-provisioning[0].null_resource.reprovision-node-when-ignition-changes (local-exec): Warning: Permanently added 'node-0,172.24.213.2' (ECDSA) to the list of known hosts.
module.flatcar-provisioning[1].null_resource.reprovision-node-when-ignition-changes (local-exec): Warning: Permanently added 'node-1,172.24.213.3' (ECDSA) to the list of known hosts.
pothos commented 3 years ago

You first need to run prepare.sh destroy or we could prepend sudo virsh destroy \$domain || true; sudo virsh undefine \$domain || true; sudo virsh pool-refresh default; sudo virsh vol-delete --pool default "\$domain".qcow2 || true; … to pxe_commands.