updateConfiguration with a scope id returns the global value in its response
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Read ConfigurationManagerImpl.updateConfiguration(UpdateCfgCmd) and UpdateCfgCmd.setResponseValue(), then compare the scoped update path with the global findByName(name) return. The issue says the inner update already returns the normalized scoped value; trace how that reaches the API response. Done when the response reports the value set for the requested scope, including implicit scopes. Pull request #14641 is already open.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
problem
On main, updateConfiguration with a scope id (zoneid, clusterid, storageid, accountid, domainid, imagestoreuuid or managementserverid) returns the global value of the setting in its response, not the value that was just set. The scoped value is stored correctly. listConfigurations with the same scope id shows it, and it takes effect.
$ cmk update configuration name=drs.algorithm value=condensed clusterid=<cluster>
{"name": "drs.algorithm", "value": "balanced", "scope": "cluster", ...} <- global value
$ cmk list configurations name=drs.algorithm clusterid=<cluster>
... "value": "condensed" <- the value that was set
A script or UI that checks the response sees the wrong value.
Cause:
ConfigurationManagerImpl.updateConfiguration(UpdateCfgCmd)ends withreturn _configDao.findByName(name);. That is the globalconfigurationrow, whatever the scope.- Since #11770,
UpdateCfgCmd.setResponseValue()copiescfg.getValue()into the response. Before that change, it echoed the value from the request. So for a scoped update, the response now has the global value.
The same applies to the implicit scope a domain admin or a user gets when they call the API without a scope id.
versions
main (24.0.0-SNAPSHOT), since #11770. 4.22 and earlier echo the value from the request and are not affected.
The steps to reproduce the bug
- Note the global value of a cluster-scoped setting, for example
drs.algorithm(balancedby default). updateConfiguration name=drs.algorithm value=condensed clusterid=<cluster>.- The response's
valueisbalanced. listConfigurations name=drs.algorithm clusterid=<cluster>returnscondensed.
What to do about it?
Have updateConfiguration return the value that was set in the requested scope when a scope is given. The inner updateConfiguration(...) already returns that value, after normalization (for example, lowercased booleans).
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.4k
- Ø Merge
- 7 T. 16 Std.
- Gemergte PRs (30 T.)
- 15
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
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizeEvtl. vergeben @bhouse-nexthop hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/cloudstack#14645 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedEvtl. vergeben @bhouse-nexthop hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/cloudstack#14633 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Evtl. vergeben @bhouse-nexthop hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/cloudstack#14631 · 1 Kommentar ·
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 @willbennett-devops hat das vor 12 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/cloudstack#14545 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in apache/cloudstack
Ähnliche Issues
-
[Bug]: Nullable implicit operator on string extensible enums still throws for a null stringEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug emitter:client:csharp
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
microsoft/typespec#12572 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG]: Java SDK MountRequest always sends update-optional fields, resetting stored mount settingsOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationEvtl. vergeben @amalsaidov hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
needs-area-label
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen