I'm trying to build a centos image on openstack with packer. For some reason, the build is terminated in the middle of the script and I can't figure out problems.
Additionally, I can't find out any logs in glance.
This is my packer script and error log.
{
"builders": [
{
"availability_zone": "nova",
"domain_id": "xxx",
"flavor": "m1.tiny",
"identity_endpoint": "http://xxx:5000/v3",
"image_name": "centos",
"image_visibility": "private",
"image_members": "myname",
"networks": "xx-xxx-xxx",
"password": "mypassword",
"region": "RegionOne",
"source_image": "17987fc7-e5af-487f-ae74-754ade318824",
"ssh_keypair_name": "mykeypairname",
"ssh_private_key_file": "/root/.ssh/id_rsa",
"ssh_username": "mysshusername",
"tenant_name": "admin",
"type": "openstack",
"username": "mynuserame"
}
],
"provisioners": [
{
"script": "setup-centos.sh",
"type": "shell"
}
]
}...
2018/07/27 13:01:31 packer: 2018/07/27 13:01:31 Waiting for image creation status: SAVING (25%)
2018/07/27 13:01:33 packer: 2018/07/27 13:01:33 Waiting for image creation status: SAVING (25%)
2018/07/27 13:01:35 packer: 2018/07/27 13:01:35 Waiting for image creation status: SAVING (25%)
2018/07/27 13:01:37 packer: 2018/07/27 13:01:37 Waiting for image creation status: SAVING (25%)
2018/07/27 13:01:39 packer: 2018/07/27 13:01:39 Waiting for image creation status: SAVING (25%)
2018/07/27 13:01:41 packer: 2018/07/27 13:01:41 Waiting for image creation status: SAVING (25%)
2018/07/27 13:01:43 ui error: ==> openstack: Error waiting for image: Resource not found
==> openstack: Error waiting for image: Resource not found
2018/07/27 13:01:43 ui: ==> openstack: Terminating the source server: 1034619b-4dc9-45d1-b160-20290e0c4c08 ...
==> openstack: Terminating the source server: 1034619b-4dc9-45d1-b160-20290e0c4c08 ...
2018/07/27 13:01:43 packer: 2018/07/27 13:01:43 Waiting for state to become: [DELETED]
2018/07/27 13:01:44 packer: 2018/07/27 13:01:44 Waiting for state to become: [DELETED] currently SHUTOFF (0%)
2018/07/27 13:01:46 packer: 2018/07/27 13:01:46 [INFO] 404 on ServerStateRefresh, returning DELETED
2018/07/27 13:01:46 [INFO] (telemetry) ending openstack
2018/07/27 13:01:46 [INFO] (telemetry) found error: Error waiting for image: Resource not found
2018/07/27 13:01:46 ui error: Build 'openstack' errored: Error waiting for image: Resource not found
2018/07/27 13:01:46 Builds completed. Waiting on interrupt barrier...
2018/07/27 13:01:46 machine readable: error-count []string{"1"}
2018/07/27 13:01:46 ui error:
==> Some builds didn't complete successfully and had errors:
2018/07/27 13:01:46 machine readable: openstack,error []string{"Error waiting for image: Resource not found"}
2018/07/27 13:01:46 ui error: --> openstack: Error waiting for image: Resource not found
2018/07/27 13:01:46 ui:
==> Builds finished but no artifacts were created.
2018/07/27 13:01:46 [INFO] (telemetry) Finalizing.
Build 'openstack' errored: Error waiting for image: Resource not found
==> Some builds didn't complete successfully and had errors:
--> openstack: Error waiting for image: Resource not found
==> Builds finished but no artifacts were created.
2018/07/27 13:01:47 waiting for all plugin processes to complete...
2018/07/27 13:01:47 /root/pack/packer: plugin process exited
2018/07/27 13:01:47 /root/pack/packer: plugin process exitedThanks in advance.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/40c5530a-b52a-4ad8-9857-b082601088e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/159c3e24-6f59-4061-931f-79aa89b89ca7%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/0aa3d6f7-f335-41a6-b95e-78147dc40b45%40googlegroups.com.
2018/07/31 17:06:09 ui: ==> openstack: Creating the image: centos==> openstack: Creating the image: centos2018/07/31 17:06:10 ui: openstack: Image: 58645091-75d3-4ad8-a900-ae9bf325ca54openstack: Image: 58645091-75d3-4ad8-a900-ae9bf325ca542018/07/31 17:06:10 ui: ==> openstack: Waiting for image centos (image id: 58645091-75d3-4ad8-a900-ae9bf325ca54) to become ready...==> openstack: Waiting for image centos (image id: 58645091-75d3-4ad8-a900-ae9bf325ca54) to become ready...2018/07/31 17:06:10 packer: 2018/07/31 17:06:10 Waiting for image creation status: SAVING (25%)2018/07/31 17:06:12 packer: 2018/07/31 17:06:12 Waiting for image creation status: SAVING (25%)2018/07/31 17:06:14 packer: 2018/07/31 17:06:14 Waiting for image creation status: SAVING (25%)2018/07/31 17:06:16 packer: 2018/07/31 17:06:16 Waiting for image creation status: SAVING (25%)2018/07/31 17:06:18 packer: 2018/07/31 17:06:18 Waiting for image creation status: SAVING (25%)2018/07/31 17:06:20 ui error: ==> openstack: Error waiting for image: Resource not found2018/07/31 17:06:20 ui: ==> openstack: Terminating the source server: 93075e5d-cfde-4f2e-b68d-711a3f84ee0f ...
==> openstack: Error waiting for image: Resource not found
==> openstack: Terminating the source server: 93075e5d-cfde-4f2e-b68d-711a3f84ee0f ...2018/07/31 17:06:20 packer: 2018/07/31 17:06:20 Waiting for state to become: [DELETED]2018/07/31 17:06:20 packer: 2018/07/31 17:06:20 Waiting for state to become: [DELETED] currently SHUTOFF (0%)2018/07/31 17:06:22 packer: 2018/07/31 17:06:22 [INFO] 404 on ServerStateRefresh, returning DELETED2018/07/31 17:06:22 [INFO] (telemetry) ending openstackThe failure is on:2018/07/31 17:06:20 ui error: ==> openstack: Error waiting for image: Resource not found
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/34cc5b95-1e28-46d2-8775-34a9fdbe3cad%40googlegroups.com.
2018-07-31 19:02:30.809 24 INFO eventlet.wsgi.server [req-b5d9fd83-3e3f-4383-bac8-abaea016463b b650b3fa22e0e3ddd54c4819e1f75afa844437ce141770b18d035ddfd0337179 922abe0e2e40459c8ae3632bb2d93ece - 5d48fc988eaa440ebe29aca0934db245 5d48fc988eaa440ebe29aca0934db245] xxx.xx.xxx.xxx,xxx.xx.xxx.xxx - - [31/Jul/2018 19:02:30] "PATCH /v2/images/487137b5-ed0d-47cc-85ca-256317abde59 HTTP/1.1" 403 271 0.026601
2018-07-31 19:02:32.364 22 INFO eventlet.wsgi.server [req-ec063fb3-0441-4698-bafa-80dd2d495e43 b650b3fa22e0e3ddd54c4819e1f75afa844437ce141770b18d035ddfd0337179 922abe0e2e40459c8ae3632bb2d93ece - 5d48fc988eaa440ebe29aca0934db245 5d48fc988eaa440ebe29aca0934db245] xxx.xx.xxx.xxx,xxx.xx.xxx.xxx - - [31/Jul/2018 19:02:32] "DELETE /v2/images/487137b5-ed0d-47cc-85ca-256317abde59 HTTP/1.1" 204 189 0.169432
2018-07-31 19:02:34.144 27 INFO eventlet.wsgi.server [req-57585196-47b1-4af7-940b-5067a86e9227 b650b3fa22e0e3ddd54c4819e1f75afa844437ce141770b18d035ddfd0337179 922abe0e2e40459c8ae3632bb2d93ece - 5d48fc988eaa440ebe29aca0934db245 5d48fc988eaa440ebe29aca0934db245] xxx.xx.xxx.xxx,xxx.xx.xxx.xxx - - [31/Jul/2018 19:02:34] "GET /v2/images/487137b5-ed0d-47cc-85ca-256317abde59 HTTP/1.1" 404 269 0.016231
After this log, packer stopped build and returned resource not found error.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/b0a316a3-599c-4b9a-9df8-16ef39b418d9%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/53b58d2b-8b40-4b8c-99be-8c0ea5275be2%40googlegroups.com.