restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Leggi RestartNetworkCmd.execute() e confronta la gestione delle eccezioni con quella di RestartVPCCmd.execute(), indicato nell’issue come riferimento. Controlla le eccezioni dichiarate in NetworkService.restartNetwork() e segui le corrispondenze degli errori descritte nel report. Il lavoro è completato quando gli stessi errori producono codici di errore API coerenti e i livelli di log previsti per entrambi i comandi di riavvio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.4k
- Merge medio
- 6g 20h
- PR unite (30g)
- 17
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/cloudstack
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/cloudstack#14645 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/cloudstack#14633 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/cloudstack#14625 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/cloudstack#14545 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Hardening] F-21: Base64-Encoded User Data Containing Plain Text Passwords in DB.Forse già presa @DaanHoogland l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/cloudstack#14530 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/cloudstack
Issue simili
-
type: dependency-upgrade
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
spring-projects/spring-graphql#1556 ·
-
hermes-queue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
chrisalunlloyd2-sudo/mindpalace#373 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug priority: lowest
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
SkriptLang/Skript#8953 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
quality-assurance
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#228 ·
I maintainer di solito rispondono entro 1 giorno