updateConfiguration with a scope id returns the global value in its response
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.4k
- Merge medio
- 7g 16h
- PR unite (30g)
- 15
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
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizeForse già presa @bhouse-nexthop l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/cloudstack#14645 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedForse già presa @bhouse-nexthop l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/cloudstack#14633 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Forse già presa @bhouse-nexthop l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/cloudstack#14631 · 1 commento ·
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 @willbennett-devops l’ha presa 12 giorni fa. 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
Tutte le issue di apache/cloudstack
Issue simili
-
[Bug]: Nullable implicit operator on string extensible enums still throws for a null stringForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug emitter:client:csharp
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/typespec#12572 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Java SDK MountRequest always sends update-optional fields, resetting stored mount settingsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationForse già presa @amalsaidov l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni