Compare floating IP addresses as parsed IPs, not strings

オープン 初心者向け
#330 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, kubernetes
領域
backend

調査の方向性

internal/provider/load_balancer.goから始め、floatingIPNeedsRecreateとaddressAllocatorFromAnnotationsを読みます。これらの関数に対する既存のテストを確認し、最初に実行します。要求どおりにアドレスを解析して比較し、無効なアノテーション値を明確なエラーとともに拒否します。その後、同等の非正規アドレスがreconcileをまたいでも変更されず、無効な値によってreconciliationが失敗することを確認します。

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

説明

Kubernetes Cloud Controller Manager (CCM)

Context

floatingIPNeedsRecreate (internal/provider/load_balancer.go) compares fip.Ip != explicit.Ip as plain strings. When the oxide.computer/floating-ip annotation spells an address differently from Oxide (for example 2001:DB8::0001 vs 2001:db8::1), the strings never match. Every reconcile then detaches, deletes, and recreates a live floating IP. Each cycle briefly returns the address to the pool, where another project could claim it.

addressAllocatorFromAnnotations also doesn't validate the annotation value.

Scope

  • Parse both addresses with netip.ParseAddr and compare the parsed values.
  • Reject an unparseable oxide.computer/floating-ip value in addressAllocatorFromAnnotations with a clear error.

Done when

A service annotated with a non-canonical but equivalent address keeps its floating IP across reconciles, and an invalid annotation fails the reconcile instead of looping.

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

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

oxidecomputer/oxide-cloud-controller-manager のほかの issue

oxidecomputer/oxide-cloud-controller-manager の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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