simp config SetHostnameAction edits /etc/sysconfig/network and calls ifdown/ifup
還沒有人認領這個 Issue。
評估
研究方向
Start with lib/simp/cli/config/items/action/set_hostname_action.rb, lines 33-34 (sed on /etc/sysconfig/network) and line 62 (ifdown/ifup), and read #223 for the sibling ConfigureNetworkAction. The change replaces both with hostnamectl and nmcli, and the issue leaves open whether the installer still creates the file, so confirm that before editing. Done means the action no longer depends on that file or on the ifup/ifdown binaries, with the existing specs passing on EL8-EL10.
由索引模型根據 Issue 內容生成。
描述
Problem
lib/simp/cli/config/items/action/set_hostname_action.rb:
- lines 33-34 run
sed -i '/HOSTNAME/d' /etc/sysconfig/networkand appendHOSTNAME=to it; - line 62 runs
/sbin/ifdown <interface>; /sbin/ifup <interface>; - the action is fatal on failure.
No package on EL8, EL9 or EL10 owns /etc/sysconfig/network, and it is absent from the AlmaLinux container images. ifup and ifdown come from network-scripts on EL8 and NetworkManager-initscripts-updown on EL9; nothing provides them on EL10.
Impact
Where the file is missing, sed -i fails and simp config aborts. On EL10 the interface bounce cannot run. Whether a full installer-built system still creates the file was not checked.
Proposed change
Set the hostname with hostnamectl set-hostname only, and replace ifdown/ifup with nmcli. Related: #223, which covers ConfigureNetworkAction.
🤖 Drafted by Claude.
- 主要語言
- Ruby
- 星號
- 2
- 分支
- 12
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 4
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
simp/rubygem-simp-cli 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 79/100
simp/rubygem-simp-cli#238 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
simp/rubygem-simp-cli#236 ·
-
simp config: write sssd::domains_entries instead of the deprecated sssd::domains可能已有人在做 @silug 於 4 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
simp/rubygem-simp-cli#227 ·
-
needs-attention
難度 5/5 一週以上 新手友好度 30/100
simp/rubygem-simp-cli#223 ·
-
難度 2/5 1-3 小時 新手友好度 25/100
simp/rubygem-simp-cli#200 ·
查看 simp/rubygem-simp-cli 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
simp/pupmod-simp-pki#163 ·
-
Status: Pending
難度 2/5 1-3 小時 新手友好度 76/100
OpenNebula/one#8279 · 1 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 72/100
resend/resend-ruby#266 ·
維護者通常 5 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
SeleniumHQ/selenium#18323 ·
維護者通常 1 天內回覆
-
Bug Ruby
難度 2/5 1-3 小時 新手友好度 76/100
getsentry/sentry-ruby#3211 · 1 則留言 ·
維護者通常 2 天內回覆