kind: v0.14.7 control-plane readiness block reads the wrong kubeconfig path (provision always fails)
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- aws, bash, fedora, go, kubernetes
- Lĩnh vực
- cloud, infrastructure
Hướng nghiên cứu
Bắt đầu với heredoc readiness trong pkg/target/service/kind/cloud-config và lần theo nơi kubeconfig được ghi và đọc. Đồng bộ các đường dẫn đó, rồi xác minh cloud-config đã render sử dụng cùng một đường dẫn cho cả hai lệnh. Công việc hoàn tất khi mapt aws kind create chạy xong trên image Fedora được mô tả mà không chuyển sang localhost:8080.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
mapt aws kind create fails on v0.14.7 whenever cloud-init runs runcmd with a cwd other than /root, which is the case on current Fedora Cloud Base images. The control-plane readiness block added in this release writes the kubeconfig to a relative path but reads it from an absolute one, so kubectl silently falls back to http://localhost:8080, the 300 s budget always expires, and cloud-init reports a failed scripts_user module.
Where
pkg/target/service/kind/cloud-config — the readiness heredoc in runcmd:
- cmdKubeconfig="kind get kubeconfig --name kind-mapt > kubeconfig" # relative
- cmdCheckCluster="kubectl --request-timeout=3s --insecure-skip-tls-verify --kubeconfig kubeconfig get node >/dev/null 2>&1"
- until eval $cmdCheckCluster; do eval $cmdKubeconfig; done # OK: same relative path
- |
#!/bin/bash
set -e
export KUBECONFIG=/root/kubeconfig # absolute — the file is not here
...
kubectl get pods -n kube-system -l component=kube-apiserver … # → http://localhost:8080
Why it fails
cloud-init executes the scripts_user module's scripts with cwd /var/lib/cloud/instance/scripts, so step 6 above writes the kubeconfig there and works. The readiness block then reads /root/kubeconfig, which never exists; with KUBECONFIG pointing at a missing file kubectl falls back to its default http://localhost:8080, every poll fails fast, ELAPSED > 300, the block exit 1s, cloud-init marks scripts_user failed, and mapt's cloud-init status --long --wait || [[ $? -eq 2 || $? -eq 0 ]] guard aborts the whole provision.
The failure is silent in the worst way: the readiness loop prints nothing per iteration, so the only symptom is a 5-minute stall and then a generic cloud-init error.
Note this block is the only change in the v0.14.7 release commit (459b4b249, "chore(cut): v0.14.7", 74 added lines) — v0.14.6 has no readiness block.
Reproduction without a cloud provider
Render pkg/target/service/kind/cloud-config with Arch: x86_64, Username: fedora, PublicIP: <any> and boot a current Fedora Cloud Base image (the AMI mapt itself selects: owner 125523088429, Fedora-Cloud-Base-AmazonEC2.x86_64-4*). The run ends with:
=== [6/9] wait for a reachable API === # succeeds
=== [7/9] control-plane readiness (MAX_WAIT=300) ===
Waiting for control-plane pods to reach Ready state...
... 300 s later ...
ERROR: control-plane readiness timeout after 300s
E1201 … "Couldn't get current server API group list" err="Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
The connection to the server localhost:8080 was refused - did you specify the right host or port?
cc_scripts_user.py[WARNING]: Failed to run module scripts_user (scripts in /var/lib/cloud/instance/scripts)
Confirm with ls /root/kubeconfig (absent) and ls /var/lib/cloud/instance/scripts/kubeconfig (present). The cloud-init in that image is recent enough to run from /usr/lib/python3.14/site-packages/cloudinit/.
Impact
Every mapt aws kind create on v0.14.7 in such an environment — which includes the Konflux tekton-integration-catalog kind-aws-provision StepAction (0.3/0.4), and every pipeline that provisions a Kind cluster through it. The bump to v0.14.7 landed in tekton-integration-catalog@c05ae23 on 2026-11-30, so all consumers resolving that StepAction from main started failing then.
Controlled side-by-side (same task, VPC, instance type, AMI, port mappings, spot=false; only the catalog revision — hence the mapt image — differing):
| mapt | result |
|---|---|
| v0.14.6 | provision succeeds, 3m58 |
| v0.14.7 | fails after ~8m, cloud-init scripts_user / Runparts: 1 failures (runcmd) |
Suggested fix
Use the same absolute path in both places:
-- cmdKubeconfig="kind get kubeconfig --name kind-mapt > kubeconfig"
-- cmdCheckCluster="kubectl --request-timeout=3s --insecure-skip-tls-verify --kubeconfig kubeconfig get node >/dev/null 2>&1"
+- cmdKubeconfig="kind get kubeconfig --name kind-mapt > /root/kubeconfig"
+- cmdCheckCluster="kubectl --request-timeout=3s --insecure-skip-tls-verify --kubeconfig /root/kubeconfig get node >/dev/null 2>&1"
(or export KUBECONFIG=$(pwd)/kubeconfig in the readiness block — as long as write and read agree).
Two follow-ups worth doing at the same time:
- Fail loudly and diagnosably: verify the kubeconfig exists and the API answers before starting the 300 s countdown, and on timeout print
kubectl get pods -n kube-system -o wideplus recent events. Today the message gives no hint which step stalled. - Consider whether
set -e+exit 1insideruncmdis the right failure mode at all: it turns a slow control plane into a failed provision with no diagnostics preserved on the instance.
Workaround
Pin the provisioning StepAction to a revision carrying mapt v0.14.6 (i.e. below tekton-integration-catalog@c05ae23). In Konflux this means the catalog-revision parameter of the kind-aws-provision task — not the task's own revision, since the nested StepAction is resolved from catalog-revision (default main).
- Ngôn ngữ chính
- Go
- Star
- 26
- Fork
- 41
- Merge trung bình
- 3 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 redhat-developer/mapt
-
Host/username secret values contain trailing newlines, sanitization fix breaks SSH keyCó thể làm lại được @abdulazeem-tk4vr đã nhận 167 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
redhat-developer/mapt#817 · 12 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
redhat-developer/mapt#991 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
openshift-snc: pick the latest published version when --version is not set (AWS and IBM Cloud)Đang mởenhancement provider/AWS provider/IBMCLOUD target/openshift-snc
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
redhat-developer/mapt#990 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
redhat-developer/mapt#974 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
openshift-snc: align cluster ingress domain with the nip.io access domain (crc.testing split-brain)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
redhat-developer/mapt#968 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của redhat-developer/mapt
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stefanpejcic/OpenPanel#1415 ·
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 78/100
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 68/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
status:needs-review type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Gentleman-Programming/engram#2512 ·
Maintainer thường phản hồi trong vòng 1 ngày