writeNetworkInterfaces: recognize own profile names and verify networkd selection after apply

オープン
#500 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
go, linux

調査の方向性

Start with writeNetworkInterfaces in platform/net/ubuntu_net_manager.go (around lines 374-458) and trace how it decides which files under /etc/systemd/network are stale. Check whether a legacy 10_<iface>.network file would be treated as foreign. Area 2 would add a post-apply networkctl status check, so find where the agent already runs commands. Done means the open design questions are settled with the maintainers, then the changes are tested.

索引モデルが issue の本文から書いたものです。

説明

Background

PR #495 fixed a file-ordering collision on Azure by renaming the generated networkd profile from 10_<iface>.network to 09-<iface>.network. During review, @s4heid raised two robustness concerns about writeNetworkInterfaces that are worth investigating as a follow-up.

Area 1 - stale-detection and own legacy profile names

writeNetworkInterfaces should recognise its own profiles, including the legacy 10_<iface>.network name, rather than treating unrelated entries under /etc/systemd/network as stale. Today the function treats almost everything under /etc/systemd/network as stale unless it was just generated or has the special excluded suffix.

It's worth investigating whether the stale-detection logic would incorrectly classify a BOSH-owned 10_<iface>.network file (present on VMs deployed before the rename) as a foreign file on an upgraded agent.

Relevant code: writeNetworkInterfaces L374–458

Area 2 - no verification that networkd actually selected the BOSH profile

Successfully writing the .network file did not protect against the original failure - the file was written but a competing file won silently. It may be worth investigating whether the agent should inspect networkctl status <iface> after applying configuration and check the Network File field, surfacing a mismatch explicitly rather than silently assuming the config took effect.

Related to: https://github.com/cloudfoundry/bosh-linux-stemcell-builder/issues/791

主要言語
Go
スター
62
フォーク
124
平均マージ
2日 6時間
マージ済み PR(30日)
8

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudfoundry/bosh-agent のほかの issue

cloudfoundry/bosh-agent の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。