[OpenStack] floating_ip is actually floating_ip_id

オープン
#17 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
cloud

調査の方向性

Issue でリンクされている OpenStack builder のドキュメントのセクションと、floating_ip を使用する簡略化された buildfile から始めます。アドレスと ID で不一致を再現し、報告されたエラーを起点に builder の floating-IP 検索を追跡します。文書化された入力と builder が受け入れる値に一貫性があり、報告されたケースがカバレッジされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug builder/openstack community-supported plugin

This issue was originally opened by @gkoudjou as hashicorp/packer#8300. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


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

主要言語
Go
スター
29
フォーク
27
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hashicorp/packer-plugin-openstack のほかの issue

hashicorp/packer-plugin-openstack の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。