VR reports a load balancer change as applied when haproxy.cfg cannot be replaced
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 78/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- backend, networking
Rechercherichtung
Beginne mit CsLoadBalancer.process() in systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py und verfolge, wie das Ergebnis von CsHelper.copy() behandelt wird, nachdem haproxy.cfg.new mit haproxy -c validiert wurde. Prüfe, wie eine fehlgeschlagene Installation an den Konfigurationslauf gemeldet wird, und vergleiche dies anschließend mit dem bestehenden Pfad für fehlgeschlagene Validierungen. Erledigt ist die Aufgabe, wenn ein Installationsfehler dazu führt, dass das Anwenden fehlschlägt, sodass der Management Server ein Rollback durchführen kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.4k
- Ø Merge
- 6 T. 20 Std.
- Gemergte PRs (30 T.)
- 17
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apache/cloudstack
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/cloudstack#14645 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/cloudstack#14631 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
apache/cloudstack#14625 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/cloudstack#14545 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Hardening] F-21: Base64-Encoded User Data Containing Plain Text Passwords in DB.Evtl. vergeben @DaanHoogland hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/cloudstack#14530 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in apache/cloudstack
Ähnliche Issues
-
type: dependency-upgrade
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 61/100
spring-projects/spring-graphql#1556 ·
-
hermes-queue
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 91/100
chrisalunlloyd2-sudo/mindpalace#373 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug priority: lowest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
SkriptLang/Skript#8953 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
quality-assurance
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#228 ·
Maintainer antworten meist innerhalb von 1 Tag