restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
RestartNetworkCmd.execute()を読み、その例外処理を、issueで参照例として示されているRestartVPCCmd.execute()と比較してください。NetworkService.restartNetwork()で宣言されている例外を確認し、レポートに記載された対応するエラーマッピングを追ってください。両方の再起動コマンドで、同じ失敗が一貫したAPIエラーコードと想定されるログレベルになることが完了条件です。
索引モデルが issue の本文から書いたものです。
説明
problem
A restartNetwork that fails with a ResourceUnavailableException is reported as an unexpected error, while the same failure from restartVPC is not.
RestartNetworkCmd.execute() doesn't catch the checked exceptions that NetworkService.restartNetwork() declares, so they reach ApiAsyncJobDispatcher. The dispatcher logs anything that isn't a ServerApiException at ERROR as Unexpected exception while executing ... RestartNetworkCmd, with a stack trace, and fails the job with error code 530.
RestartVPCCmd.execute() catches the same exceptions and maps them to ServerApiException: ResourceUnavailableException gives 534 at WARN, ConcurrentOperationException 530 and InsufficientCapacityException 533. API clients therefore see a different error code for the same condition depending on whether the network is in a VPC, and the management server log shows an ERROR for an expected refusal.
versions
4.22 (the code is the same on main).
The steps to reproduce the bug
- Make a network restart fail with a
ResourceUnavailableException. For example, stop the CloudStack agent on the host that runs the network's router, so that the commands to the router fail withAgentUnavailableException, and callrestartNetworkon that network. - The async job fails with error code 530, and the management server logs
Unexpected exception while executing org.apache.cloudstack.api.command.user.network.RestartNetworkCmdat ERROR. - Do the same with
restartVPCon a VPC: the job fails with 534, and the exception is logged at WARN.
What to do about it?
Catch the exceptions in RestartNetworkCmd.execute() the way RestartVPCCmd.execute() does.
- 主要言語
- 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#14633 ·
メンテナーはふだん 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 日以内に返信