Documentation of reuse_ips and behaviour mismatch

オープン 初心者向け
#167 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go

調査の方向性

docs-partials/builder/openstack/RunConfig-not-required.mdxにあるreuse_ipsの説明を読み、builder/openstack/step_allocate_ip.goの動作と比較してください。特に、74行目付近のリンク先のコードを確認してください。このオプションが利用可能なFloating IPを再利用するだけなのか、利用可能なものがない場合に作成するのかを明確にし、ドキュメントが観察した動作と一致しているか確認してください。

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

説明

bug

Overview

Documentation implies that reuse_ips will trial using any existing floating IPs then create a new one if it cannot find any. I find and code implies to me from a quick look that it will only try reuse_ips and hence if there is not a IP to reuse then will fail.

https://github.com/hashicorp/packer-plugin-openstack/blob/76283e5cef45a5cab6adcf968936c7f24b90e0d4/docs-partials/builder/openstack/RunConfig-not-required.mdx?plain=1#L35-L40

Reproduction Steps

GitLab-ci runner

build-image:
  stage: build
  image: hashicorp/packer
  before_script: 
    - mkdir -p ./openstack
    - mkdir -p /etc/openstack
    - echo "$CLOUDS_YAML" > ./openstack/clouds.yaml
    - cp openstack/clouds.yaml /etc/openstack
  script: 
    - packer init ubuntu.pkr.hcl
    - packer build -var ubuntu_version=noble ubuntu.pkr.hcl`
Plugin and Packer version

From packer version

Simplified Packer Buildfile
packer {
  required_plugins {
      openstack = {
        version = "~> 1"
        source  = "github.com/hashicorp/openstack"
    }
  }
}

source "openstack" "ubuntu" {
  flavor          = "general.v2.small"
  image_name       = "packer-test-ubuntu-${var.ubuntu_version}"
  external_source_image_url = "https://cloud-images.ubuntu.com/${var.ubuntu_version}/current/${var.ubuntu_version}-server-cloudimg-amd64.img"
  ssh_username    = "ubuntu"
  cloud = "openstack"
  networks = ["<removed>"]
  floating_ip_network = "external"
  reuse_ips = true
  insecure            = "true"
  image_disk_format   = "raw"
  use_blockstorage_volume = true
  volume_size = 10
  network_discovery_cidrs = ["<removed>"]

  username     = "ubuntu"
}

Operating system and Environment details

hashicorp/packer docker image, AMD64

Log Fragments related

Packer init versions

$ packer init ubuntu.pkr.hcl
Installed plugin github.com/hashicorp/openstack v1.1.4 in "/root/.config/packer/plugins/github.com/hashicorp/openstack/packer-plugin-openstack_v1.1.4_x5.0_linux_amd64"

Build failure output

==> openstack.ubuntu: Launching server...
==> openstack.ubuntu: Server ID: 3d10800f-b8a6-49b8-b103-7014cb708c55
==> openstack.ubuntu: Waiting for server to become ready...
==> openstack.ubuntu: Searching for unassociated floating IP
==> openstack.ubuntu: Error searching for floating IP: no free floating IPs found
==> openstack.ubuntu: Terminating the source server: 3d10800f-b8a6-49b8-b103-7014cb708c55 ...
==> openstack.ubuntu: Waiting for volume 2be9f422-8822-460d-b56a-d27327df072d to become available...
==> openstack.ubuntu: Deleting volume: 2be9f422-8822-460d-b56a-d27327df072d ...
==> openstack.ubuntu: Deleting temporary external source image: packer_6aeb58c1-a60a-345c-f49c-0f087813cf4b ...
==> openstack.ubuntu: Deleting temporary keypair: packer_6aeb58c1-74e9-b8e2-4f69-9bad19abed95 ...
Build 'openstack.ubuntu' errored after 1 minute 45 seconds: Error searching for floating IP: no free floating IPs found
==> Wait completed after 1 minute 45 seconds
==> Some builds didn't complete successfully and had errors:
--> openstack.ubuntu: Error searching for floating IP: no free floating IPs found
==> Builds finished but no artifacts were created.
主要言語
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 を短くまとめたダイジェスト。