'ssh_agent_auth' and 'ssh_keypair_name' params doesnt work w/o 'ssh_private_key_file'
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Không có tệp nguồn, bài kiểm thử hoặc điểm vào nào được nêu. Bắt đầu bằng cách tái hiện cấu hình build OpenStack đơn giản hóa với ssh_keypair_name và ssh_agent_auth nhưng không có ssh_private_key_file, sau đó lần theo thiết lập keypair và SSH của plugin; hoàn tất khi keypair hiện có được gắn vào và xác thực SSH thành công mà không cần đường dẫn đến khóa riêng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
'ssh_agent_auth' and 'ssh_keypair_name' parameters not working as expected
The folowing param set
ssh_username = "<image user name>"
ssh_keypair_name = "<existing keypair name>"
ssh_agent_auth = true
creates VM without any keypair. As a result SSH-auth falls.
Adding the path to a completely random private key to the ssh_private_key_file parameter fixes this as a workaround (although it doesn't make sense)
Reproduction Steps
see above
Plugin and Packer version
Packer v1.7.8
packer-plugin-openstack_v1.0.0_x5.0_linux_amd64
Simplified Packer Buildfile
packer {
required_plugins {
openstack = {
version = "1.0.0"
source = "github.com/hashicorp/openstack"
}
}
}
source "openstack" "centos8" {
identity_endpoint = "https://some.domain:13000"
application_credential_id = var.openstack_app_credid
application_credential_secret = var.openstack_app_secret
source_image_name = "centos_8.4"
image_name = "centos_8.4_new"
flavor = "Standard-2-4"
networks = ["42692968-11a7-4010-b958-a03ee9f2431e"]
use_blockstorage_volume = true
# # Provision
communicator = "ssh"
ssh_username = "centos"
ssh_keypair_name = "existed_key"
# Uncomment following line for workaround fix
#ssh_private_key_file = "/root/.ssh/id_rsa"
ssh_agent_auth = true
}
build {
sources = ["source.vsphere-iso.centos8","source.openstack.centos8"]
provisioner "shell" {
environment_vars = var.shell_envs[*]
use_env_var_file = true
scripts = fileset(".", "${path.root}/.build/scripts/*")
}
}
Operating system and Environment details
docker.io/hashicorp/packer
x86_64
Log Fragments and crash.log files
2021/11/16 14:18:33 packer-provisioner-shell plugin: [INFO] Packer version: 1.7.8 [go1.17.2 linux amd64]
2021/11/16 14:18:33 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/11/16 14:18:33 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2021/11/16 14:18:33 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2021/11/16 14:18:33 packer-provisioner-shell plugin: [INFO] Setting cache directory: /root/.cache/packer
2021/11/16 14:18:33 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2021/11/16 14:18:33 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin3998114135
2021/11/16 14:18:33 packer-provisioner-shell plugin: Waiting for connection...
2021/11/16 14:18:33 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin3998114135
2021/11/16 14:18:33 packer-provisioner-shell plugin: Serving a plugin connection...
2021/11/16 14:18:33 Build debug mode: false
2021/11/16 14:18:33 Force build: true
openstack.centos8: output will be in this color.
2021/11/16 14:18:33 On error:
2021/11/16 14:18:33 Waiting on builds to complete...
2021/11/16 14:18:33 Starting build run: openstack.centos8
2021/11/16 14:18:33 Running builder:
2021-11-16T14:18:33+03:00: ==> openstack.centos8: Loading flavor: Standard-2-4
2021/11/16 14:18:33 packer-plugin-openstack_v1.0.0_x5.0_linux_amd64 plugin: 2021/11/16 14:18:33 [INFO] Loading flavor by ID: Standard-2-4
2021/11/16 14:18:34 packer-plugin-openstack_v1.0.0_x5.0_linux_amd64 plugin: 2021/11/16 14:18:34 [ERROR] Failed to find flavor by ID: Resource not found
2021/11/16 14:18:34 packer-plugin-openstack_v1.0.0_x5.0_linux_amd64 plugin: 2021/11/16 14:18:34 [INFO] Loading flavor by name: Standard-2-4
2021-11-16T14:18:34+03:00: openstack.centos8: Verified flavor. ID: 2a1f1c8a-32f4-498d-8594-a7146ac167bf
2021/11/16 14:18:34 packer-plugin-openstack_v1.0.0_x5.0_linux_amd64 plugin: 2021/11/16 14:18:34 Using Image Filters {ID: Limit:0 Marker: Name:centos_8.4 Visibility: MemberStatus: Owner: Status: SizeMin:0 SizeMax:0 Sort: SortKey: SortDir: Tags:[] CreatedAtQuery:<nil> UpdatedAtQuery:<nil> ContainerFormat: DiskFormat:}
2021-11-16T14:18:34+03:00: ==> openstack.centos8: Using SSH Agent for existing key pair existed_key
2021-11-16T14:18:34+03:00: openstack.centos8: Found Image ID: ea5e0e16-809b-4faf-b96f-601804a79a78
2021-11-16T14:18:34+03:00: ==> openstack.centos8: Creating volume...
2021-11-16T14:18:35+03:00: ==> openstack.centos8: Waiting for volume packer_61939389-0b00-9f71-91bb-e06facfc4644 (volume id: 595ca0de-1b48-49d9-a46a-fc0e427f70a6) to become available...
2021/11/16 14:18:35 packer-plugin-openstack_v1.0.0_x5.0_linux_amd64 plugin: 2021/11/16 14:18:35 Waiting for volume creation status: creating
2021-11-16T14:18:37+03:00: openstack.centos8: Volume ID: 595ca0de-1b48-49d9-a46a-fc0e427f70a6
2021-11-16T14:18:37+03:00: ==> openstack.centos8: Launching server...
2021-11-16T14:18:37+03:00: ==> openstack.centos8: Launching server...
2021-11-16T14:18:39+03:00: openstack.centos8: Server ID: daae0e0f-0aa5-4043-ba88-0ef8d8989d7c
2021/11/16 14:18:39 packer-plugin-openstack_v1.0.0_x5.0_linux_amd64 plugin: 2021/11/16 14:18:39 server id: daae0e0f-0aa5-4043-ba88-0ef8d8989d7c
2021-11-16T14:18:39+03:00: ==> openstack.centos8: Waiting for server to become ready...
....
2021/11/16 14:20:56 packer-plugin-openstack_v1.0.0_x5.0_linux_amd64 plugin: 2021/11/16 14:20:56 [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/11/16 14:20:56 packer-plugin-openstack_v1.0.0_x5.0_linux_amd64 plugin: 2021/11/16 14:20:56 [DEBUG] Detected authentication error. Increasing handshake attempts.
2021-11-16T14:20:56+03:00: ==> openstack.centos8: Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
- Ngôn ngữ chính
- Go
- Star
- 29
- Fork
- 27
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hashicorp/packer-plugin-openstack
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Error initializing block storage client with Openstack 2026.1Có thể đã có người làm @elelaysh đã nhận 72 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
hashicorp/packer-plugin-openstack#162 · 1 bình luận ·
-
Feature Request: Add keep_volume option to preserve boot volume artifacts in OpenStack builderĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
hashicorp/packer-plugin-openstack#151 · 1 bình luận · 1 reaction ·
-
Packer 1.12.0-alpha1 testingĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Response Error: No image found with ID .... code 404 Not Found title Not Found (Floating problem )Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
hashicorp/packer-plugin-openstack#130 · 1 bình luận ·
Tất cả issue của hashicorp/packer-plugin-openstack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/TypeScript#65370 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug tech debt testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/amazon-vpc-cni-k8s#3976 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
txn2/mcp-data-platform#2522 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-telemetry/opentelemetry-go-contrib#10234 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
discovery/backoff: default FindPeers limit yields no fresh peersCó thể đã có người làm @zakazaka95 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100