Source image not found when searching by image name
まだ誰も着手していません。
評価
調査の方向性
source_image を処理する OpenStack builder path から始め、提供された build.json configuration を使用して、blockstorage options がある場合とない場合の実行を比較します。image name での失敗と image ID での成功した実行を再現します。指定した source image がこれらの options なしで正しく起動すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This issue was originally opened by @v0lumehi as hashicorp/packer#8630. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Hello guys,
I think I discovered a bug in the openstack builder.
I have following packer version:
$ packer --version
1.5.1
This is my packer config and it is working fine:
{
"variables": {
"git_username": "",
"git_password": ""
},
"builders": [{
"type": "openstack",
"flavor": "m.large",
"image_name": "jenkins-chef-slave-nightly",
"source_image": "ubuntu-18.04-x86_64-latest",
"ssh_username": "ubuntu",
"identity_endpoint": "https://my.great.cloud:5000/v3",
"networks": ["6e80f6c6-3a24-44be-b15c-54b1f9d86c6e"],
"floating_ip_network": "6541b7d0-db72-4a17-9d7e-de5d5b894ead",
"security_groups": ["97e99840-e6f0-4fff-8f67-2afd3b8a3c43"],
"use_blockstorage_volume": true,
"volume_size": 10,
"volume_name": "jenkins-chef-slave-nightly-volume",
"image_disk_format": "qcow2",
"metadata": {
"image_name": "jenkins-chef-slave-nightly"
}
}],
"provisioners": [{
"type": "shell",
"environment_vars": [
"GIT_USERNAME={{user `git_username`}}",
"GIT_PASSWORD={{user `git_password`}}"
],
"scripts": [
"./common/scripts/ubuntu/base.sh",
"./common/scripts/ubuntu/docker.sh",
"./common/scripts/ubuntu/chefdk.sh",
"./common/scripts/ubuntu/users.sh",
"./common/scripts/ubuntu/cleanup.sh"
]
}
]
}
Now if I remove this block:
"use_blockstorage_volume": true,
"volume_size": 10,
"volume_name": "jenkins-chef-slave-nightly-volume",
"image_disk_format": "qcow2",
and run packer, packer throws this error:
$ packer build build.json
openstack output will be in this color.
==> openstack: Loading flavor: m.large
openstack: Verified flavor. ID: 92506745-0305-4997-a58a-0f1a6be40a08
==> openstack: Creating temporary keypair: packer_5e26cac3-61bd-d7be-f4b1-463cc436cbc4 ...
==> openstack: Created temporary keypair: packer_5e26cac3-61bd-d7be-f4b1-463cc436cbc4
==> openstack: Launching server...
==> openstack: Launching server...
==> openstack: Error launching source server: Bad request with: [POST https://my.great.cloud:8774/v2.1/2b1777b0d2ec4263a6f0a63a0f313670/servers], error message: {"badRequest": {"message": "Invalid input for field/attribute imageRef. Value: ubuntu-18.04-x86_64-latest. u'ubuntu-18.04-x86_64-latest' is not valid under any of the given schemas", "code": 400}}
==> openstack: Terminating the source server: ...
==> openstack: Error terminating server, may still be around: Resource not found
==> openstack: Deleting temporary keypair: packer_5e26cac3-61bd-d7be-f4b1-463cc436cbc4 ...
Build 'openstack' errored: Error launching source server: Bad request with: [POST https://my.great.cloud:8774/v2.1/2b1777b0d2ec4263a6f0a63a0f313670/servers], error message: {"badRequest": {"message": "Invalid input for field/attribute imageRef. Value: ubuntu-18.04-x86_64-latest. u'ubuntu-18.04-x86_64-latest' is not valid under any of the given schemas", "code": 400}}
==> Some builds didn't complete successfully and had errors:
--> openstack: Error launching source server: Bad request with: [POST https://my.great.cloud:8774/v2.1/2b1777b0d2ec4263a6f0a63a0f313670/servers], error message: {"badRequest": {"message": "Invalid input for field/attribute imageRef. Value: ubuntu-18.04-x86_64-latest. u'ubuntu-18.04-x86_64-latest' is not valid under any of the given schemas", "code": 400}}
==> Builds finished but no artifacts were created.
If I replace the source_image name with its ID, it's working properly:
$ packer build build.json
openstack output will be in this color.
==> openstack: Loading flavor: m.large
openstack: Verified flavor. ID: 92506745-0305-4997-a58a-0f1a6be40a08
==> openstack: Creating temporary keypair: packer_5e26cb83-cafb-8502-3cd6-727f291199f5 ...
==> openstack: Created temporary keypair: packer_5e26cb83-cafb-8502-3cd6-727f291199f5
==> openstack: Launching server...
==> openstack: Launching server...
openstack: Server ID: 0c516d5d-d23e-4ee4-8355-b78d28bdc6b3
==> openstack: Waiting for server to become ready...
==> openstack: Creating floating IP using network 6541b7d0-db72-4a17-9d7e-de5d5b894ead ...
openstack: Created floating IP: 'f58318df-3644-420a-af6b-fdfa3c803549' (10.0.30.38)
==> openstack: Associating floating IP 'f58318df-3644-420a-af6b-fdfa3c803549' (10.0.30.38) with instance port...
openstack: Added floating IP 'f58318df-3644-420a-af6b-fdfa3c803549' (10.0.30.38) to instance!
==> openstack: Using ssh communicator to connect: 10.0.30.38
==> openstack: Waiting for SSH to become available...
==> openstack: Connected to SSH!
==> openstack: Provisioning with shell script: ./common/scripts/ubuntu/base.sh
...
==> openstack: Deleting temporary keypair: packer_5e26cb83-cafb-8502-3cd6-727f291199f5 ...
Build 'openstack' finished.
==> Builds finished. The artifacts of successful builds are:
--> openstack: An image was created: 0983f994-6de4-4894-8fd1-4f700c2dc644
Do you got any idea what causes this? Am I overseeing something?
Best Regards
- 主要言語
- Go
- スター
- 29
- フォーク
- 27
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hashicorp/packer-plugin-openstack のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Error initializing block storage client with Openstack 2026.1対応中かも @elelaysh が 72 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
hashicorp/packer-plugin-openstack#162 · コメント 1 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
hashicorp/packer-plugin-openstack#151 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
Response Error: No image found with ID .... code 404 Not Found title Not Found (Floating problem )オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
hashicorp/packer-plugin-openstack#130 · コメント 1 件 ·
hashicorp/packer-plugin-openstack の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
multica-ai/multica#10081 ·
メンテナーはふだん 1 日以内に返信
-
csp-probe needs efqdn to probe CSP domains対応中かも @unknownhackerworld が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
projectdiscovery/httpx#2725 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
stefanpejcic/OpenPanel#1321 ·
メンテナーはふだん 1 日以内に返信
-
bug triage/pending
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信