VR reports a load balancer change as applied when haproxy.cfg cannot be replaced
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- backend, networking
調査の方向性
systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py の CsLoadBalancer.process() から始め、haproxy.cfg.new を haproxy -c で検証した後、CsHelper.copy() の結果をどのように処理するかを追ってください。インストールに失敗した場合に設定実行へどのように報告されるかを確認し、既存の検証失敗時の処理経路と比較してください。インストール失敗によって適用が失敗し、管理サーバーがロールバックできるようになれば完了です。
索引モデルが issue の本文から書いたものです。
説明
problem
When a virtual router can't replace /etc/haproxy/haproxy.cfg, it still reports a load balancer config change as applied.
CsLoadBalancer.process() (systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py) writes the new config to haproxy.cfg.new, checks it with haproxy -c, and then installs it with CsHelper.copy(). CsHelper.copy() catches the IOError, logs Could not copy /etc/haproxy/haproxy.cfg.new to /etc/haproxy/haproxy.cfg, and returns. The router then reloads HAProxy, which reads the old file, and the config run ends successfully.
The management server therefore gets a successful answer, records the change as applied, and doesn't roll it back, while the router keeps serving the old configuration. A config that fails haproxy -c already makes the apply fail, so only this path is silent.
versions
4.22 (the code is the same on main).
The steps to reproduce the bug
- Create a load balancer rule on an isolated network or VPC served by a virtual router.
- On the router, make the config file unwritable, for example
chattr +i /etc/haproxy/haproxy.cfg. - Change the rule, for example
updateLoadBalancerRule algorithm=leastconn, or add a rule. - The API call succeeds and
listLoadBalancerRulesshows the new values. The router's/var/log/cloud.loghasCould not copy /etc/haproxy/haproxy.cfg.new to /etc/haproxy/haproxy.cfg, and/etc/haproxy/haproxy.cfgstill has the old config.
What to do about it?
Fail the apply when the new config can't be installed, the same way as when it fails haproxy -c, so that the management server sees the failure and rolls back.
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 6日 20時間
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/cloudstack のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14645 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/cloudstack#14631 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/cloudstack#14625 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14545 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Hardening] F-21: Base64-Encoded User Data Containing Plain Text Passwords in DB.対応中かも @DaanHoogland が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14530 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
apache/cloudstack の issue をすべて見る
似ている issue
-
type: dependency-upgrade
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
spring-projects/spring-graphql#1556 ·
-
hermes-queue
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
chrisalunlloyd2-sudo/mindpalace#373 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug priority: lowest
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
SkriptLang/Skript#8953 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
quality-assurance
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#228 ·
メンテナーはふだん 1 日以内に返信