Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenStack] floating_ip is actually floating_ip_id #8300

Closed
gkoudjou opened this issue Oct 31, 2019 · 2 comments
Closed

[OpenStack] floating_ip is actually floating_ip_id #8300

gkoudjou opened this issue Oct 31, 2019 · 2 comments
Labels
bug builder/openstack community-supported-plugin denotes requests for plugins that are supported by the community, not by HashiCorp engineers remote-plugin/openstack

Comments

@gkoudjou
Copy link

Overview of the Issue

According to the documentation, with the Openstack builders, we can defined a specific floating IP address.

https://www.packer.io/docs/builders/openstack.html#floating_ip

While testing, it appears that packer expects an ID.

Reproduction Steps

Here is some json file :

    "builders": [
        {
            "type": "openstack",
            "username": "{{user `username`}}",
            "password": "{{user `password`}}",
            "identity_endpoint": "XXXXXXXXX",
            "region": "regionOne",
            "image_name": "{{user `image_name`}}",
            "instance_name": "packer-test",
            "ssh_timeout": "5m",
            "floating_ip_network": "external",
            "floating_ip": "10.121.240.228",
            ]
        }
    ],

And here is the result :

openstack output will be in this color.

==> openstack: Loading flavor: Tiny_Linux
    openstack: Verified flavor. ID: 1
==> openstack: Not using temporary keypair
    openstack: Found Image ID: d91327b6-ef25-4632-b866-8773927c6a83
==> openstack: Launching server...
==> openstack: Launching server...
    openstack: Server ID: 805257ad-79fa-4e38-904c-ef1951e158bd
==> openstack: Waiting for server to become ready...
==> openstack: Error using provided floating IP '10.121.240.228': Resource not found
==> openstack: Terminating the source server: 805257ad-79fa-4e38-904c-ef1951e158bd ...
Build 'openstack' errored: Error using provided floating IP '10.121.240.228': Resource not found

==> Some builds didn't complete successfully and had errors:
--> openstack: Error using provided floating IP '10.121.240.228': Resource not found

But if a use the ID used by requesting openstack, it's working.

openstack output will be in this color.

==> openstack: Loading flavor: Tiny_Linux
    openstack: Verified flavor. ID: 1
==> openstack: Not using temporary keypair
    openstack: Found Image ID: d91327b6-ef25-4632-b866-8773927c6a83
==> openstack: Launching server...
==> openstack: Launching server...
    openstack: Server ID: 324e2b3c-5f83-4829-ad6f-ce706f87f79a
==> openstack: Waiting for server to become ready...
    openstack: Selected floating IP: '1d869a1f-9378-4069-a087-7050d337d8a3' (10.121.240.228)
==> openstack: Associating floating IP '1d869a1f-9378-4069-a087-7050d337d8a3' (10.121.240.228) with instance port...
    openstack: Added floating IP '1d869a1f-9378-4069-a087-7050d337d8a3' (10.121.240.228) to instance!

Packer version

1.5.0 (yesterday nightly build)

Simplified Packer Buildfile

Please see above

Operating system and Environment details

OS: RHEL 7.3
Architecture: x86_64

Log Fragments and crash.log files

openstack: Found Image ID: d91327b6-ef25-4632-b866-8773927c6a83
==> openstack: Launching server...
==> openstack: Launching server...
openstack: Server ID: dc67299d-0523-44cf-8ac9-7495d6cd6b61
2019/10/31 14:45:31 packer_linux_amd64: 2019/10/31 14:45:31 server id: dc67299d-0523-44cf-8ac9-7495d6cd6b61
2019/10/31 14:45:31 packer_linux_amd64: 2019/10/31 14:45:31 Waiting for state to become: [ACTIVE]
==> openstack: Waiting for server to become ready...
2019/10/31 14:45:32 packer_linux_amd64: 2019/10/31 14:45:32 Waiting for state to become: [ACTIVE] currently BUILD (0%)
2019/10/31 14:45:34 packer_linux_amd64: 2019/10/31 14:45:34 Waiting for state to become: [ACTIVE] currently BUILD (0%)
2019/10/31 14:45:38 packer_linux_amd64: 2019/10/31 14:45:38 Waiting for state to become: [ACTIVE] currently BUILD (0%)
2019/10/31 14:45:41 packer_linux_amd64: 2019/10/31 14:45:41 Waiting for state to become: [ACTIVE] currently BUILD (0%)
2019/10/31 14:45:44 packer_linux_amd64: 2019/10/31 14:45:44 [INFO] Not using winrm communicator, skipping get password...
==> openstack: Error using provided floating IP '10.121.240.228': Resource not found
==> openstack: Terminating the source server: dc67299d-0523-44cf-8ac9-7495d6cd6b61 ...
2019/10/31 14:45:45 packer_linux_amd64: 2019/10/31 14:45:45 Waiting for state to become: [DELETED]
2019/10/31 14:45:46 packer_linux_amd64: 2019/10/31 14:45:46 Waiting for state to become: [DELETED] currently ACTIVE (0%)
Build 'openstack' errored: Error using provided floating IP '10.121.240.228': Resource not found

==> Some builds didn't complete successfully and had errors:
--> openstack: Error using provided floating IP '10.121.240.228': Resource not found

==> Builds finished but no artifacts were created.
2019/10/31 14:45:48 [INFO] (telemetry) ending openstack
2019/10/31 14:45:48 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2019/10/31 14:45:48 machine readable: openstack,error []string{"Error using provided floating IP '10.121.240.228': Resource not found"}
==> Builds finished but no artifacts were created.
2019/10/31 14:45:48 [INFO] (telemetry) Finalizing.
2019/10/31 14:45:48 packer_linux_amd64: 2019/10/31 14:45:48 [INFO] 404 on ServerStateRefresh, returning DELETED
2019/10/31 14:45:48 [WARN] (telemetry) Error finalizing report. This is safe to ignore. Post https://checkpoint-api.hashicorp.com/v1/telemetry/packer: proxyconnect tcp: tls: first record does not look like a TLS handshake
2019/10/31 14:45:48 waiting for all plugin processes to complete...
2019/10/31 14:45:48 /home/vagrant/btp_base_image/packer_linux_amd64: plugin process exited
2019/10/31 14:45:48 /home/vagrant/btp_base_image/packer_linux_amd64: plugin process exited

@gkoudjou gkoudjou added the bug label Oct 31, 2019
@nywilken nywilken added the community-supported-plugin denotes requests for plugins that are supported by the community, not by HashiCorp engineers label Nov 18, 2020
@ghost ghost closed this as completed Apr 21, 2021
@ghost
Copy link

ghost commented Apr 21, 2021

This issue has been automatically migrated to hashicorp/packer-plugin-openstack#17 because it looks like an issue with that plugin. If you believe this is not an issue with the plugin, please reply to hashicorp/packer-plugin-openstack#17.

@ghost
Copy link

ghost commented May 22, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators May 22, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug builder/openstack community-supported-plugin denotes requests for plugins that are supported by the community, not by HashiCorp engineers remote-plugin/openstack
Projects
None yet
Development

No branches or pull requests

3 participants