Packer keeps trying to pull a non existent source image

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

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

評価

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

調査の方向性

ファイルやテストは指定されていません。まず external_source_image_url の処理と画像状態のリトライループを特定し、次に 404 を返す URL で再現してください。完了条件には、リトライを繰り返すのではなく、明確なエラーメッセージを伴う、回数が制限された、または終了する失敗処理を含めてください。

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

説明

bug
Overview of the Issue

I've noticed that one Packer CI job was running for a very long time: more than 30 minutes, when the average job's duration is less than 10 minutes. The following message was logged over and over again:

openstack.debian: Image not Active, retrying in 10 seconds

I killed the job and found the issue: the image declared in the external_source_image_url variable did not exist: the HTTP endpoint was returning a 404 error.

Reproduction Steps

Set the external_source_image_url variable to a non existent image.

Plugin and Packer version

Packer 1.7.8
Openstack plugin 1.0.0

Simplified Packer Buildfile
packer {
  required_version = "1.7.8"
  required_plugins {
    openstack = {
      version = "1.0.0"
      source  = "github.com/hashicorp/openstack"
    }
  }
}

source "openstack" "debian" {
  cloud                        = "dc1"
  external_source_image_format = "raw"
  external_source_image_url    = "http://cdimage.debian.org/cdimage/openstack/10.11.1-20211029/debian-10.11.1-20211029-openstack-amd64.raw"
  image_min_disk               = "10"
  image_name                   = "bla"
  flavor                       = "packer"
  ssh_username                 = "debian"
}

build {
  sources = ["source.openstack.debian"]
}
Operating system and Environment details

Debian Buster

Log Fragments and crash.log files
$ packer build debian.pkr.hcl
116openstack.debian: output will be in this color.
117==> openstack.debian: Loading flavor: packer
118    openstack.debian: Verified flavor. ID: 121d18c3-f0e0-4096-ba60-54c4050ea109
119==> openstack.debian: Creating temporary keypair: packer_61d470f3-fd3e-a797-819b-21b31030b544 ...
120==> openstack.debian: Created temporary keypair: packer_61d470f3-fd3e-a797-819b-21b31030b544
121==> openstack.debian: Creating image using external source image with name packer_61d470f3-fcb1-75b4-1c99-251728853883
122==> openstack.debian: Using disk format raw
123==> openstack.debian: Created image with ID 4964814c-7512-4293-879d-50b5b25b37cb
124==> openstack.debian: Importing External Source Image from URL http://cdimage.debian.org/cdimage/openstack/10.11.1-20211029/debian-10.11.1-20211029-openstack-amd64.raw
125    openstack.debian: Image not Active, retrying in 10 seconds
126    openstack.debian: Image not Active, retrying in 10 seconds
127    openstack.debian: Image not Active, retrying in 10 seconds
128    openstack.debian: Image not Active, retrying in 10 seconds
129    openstack.debian: Image not Active, retrying in 10 seconds
130    openstack.debian: Image not Active, retrying in 10 seconds
131    openstack.debian: Image not Active, retrying in 10 seconds
132    openstack.debian: Image not Active, retrying in 10 seconds
主要言語
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 を短くまとめたダイジェスト。