-
Notifications
You must be signed in to change notification settings - Fork 24
Build fails with error "Resource not found" after Packer terminates the source server #105
Copy link
Copy link
Closed
Labels
Description
Overview of the Issue
In v1.1.1 build fails just after Packer terminates the source server. The server is terminated but Packer returns the error "Error getting server to terminate: Resource not found".
Reproduction Steps
Simply run a build.
Plugin and Packer version
Packer version: 1.8.6
packer-plugin-openstack: v1.1.1
Simplified Packer Buildfile
This buildfile uses block storage volume but I have also tested with no volume and got the same result.
packer {
required_plugins {
openstack = {
version = "1.1.1"
source = "github.com/hashicorp/openstack"
}
}
}
source "openstack" "ol8" {
username = "OS_USERNAME"
password = "OS_PASSWORD"
identity_endpoint = "OS_AUTH_URL"
tenant_id = "OS_TENANT_ID"
domain_id = "OS_DOMAIN_ID"
region = "OS_REGION_NAME"
insecure = true
source_image = "xxxxxxxxxxxx"
flavor = "xxxxxxxxxxx"
config_drive = true
networks = local.networks
use_blockstorage_volume = true
volume_size = 20
image_disk_format = "qcow2"
image_name = "test"
image_visibility = "shared"
image_min_disk = 20
ssh_username = "cloud-user"
instance_name = local.instance_name
ssh_read_write_timeout = "5m"
}
build {
name = "OL8 Custom Image"
sources = ["source.openstack.ol8"]
provisioner "shell" {
remote_folder = "/home/cloud-user"
inline = [
"sudo timedatectl set-timezone UTC",
"sudo dnf upgrade -y",
"sudo reboot"
]
expect_disconnect = true
}
provisioner "ansible" {
pause_before = "60s"
galaxy_file = var.galaxy_file
playbook_file = var.playbook_file
use_proxy = var.use_proxy
extra_arguments = var.extra_arguments
}
}
Operating system and Environment details
alpine 3.17.2
Log Fragments and crash.log files
Reactions are currently unavailable