CKS: validate-cks-node merges missing package names into one string on Debian/Ubuntu

未關閉 適合新手
#14,755 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
72/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
bash, kubernetes
領域
cloud

研究方向

從 kubernetes-service 外掛中的 validate-cks-node 腳本開始,找到 Debian/Ubuntu 分支中使用字串追加 +="$package" 來建構 MISSING_PACKAGES 的部分。將其宣告為陣列並追加元素,然後讓訊息以空格連接這些元素,並回報實際數量。使用一個樁化的 dpkg 執行腳本邏輯,其中只有部分套件已安裝;當數量與缺少的套件數相符,且每個名稱都是獨立項目時,即完成。

由索引模型根據 Issue 內容生成。

描述

Problem

validate-cks-node (kubernetes-service plugin) checks a node for required packages before it is added to a CKS cluster. On Debian/Ubuntu it collects the missing ones with:

MISSING_PACKAGES+="$package"

On an array, this appends to the string in element 0. It does not add an element.

Effect Detail
Count always 1, however many are missing
Message names run together, e.g. cloud-guest-utilsapt-transport-httpscurl...
Exit status still 1, so the node is rejected, but the log does not say what to install

The RPM branch uses a different append and is not affected.

Reproduce

Run the script logic with dpkg stubbed so that only some packages are "installed":

1
Following packages are missing in the node template: cloud-guest-utilsapt-transport-httpscurlgnupg-agentsoftware-properties-commonpython3-json-pointerpython3-jsonschema
Expected

Each missing package is an array element: the count is correct and the names are separated by spaces.

Versions

4.22, main

主要語言
Java
星號
3.1k
分支
1.4k
平均合併
6 天 18 小時
30 天內合併 PR
11

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/cloudstack 的其他 Issue

查看 apache/cloudstack 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。