updateConfiguration with a scope id returns the global value in its response
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 35/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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).
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.4k
- Merge moyen
- 7 j 16 h
- PR mergées (30 j)
- 15
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/cloudstack
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizePeut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/cloudstack#14645 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedPeut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/cloudstack#14633 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Peut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/cloudstack#14631 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
apache/cloudstack#14625 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Peut-être pris @willbennett-devops l’a pris il y a 12 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/cloudstack#14545 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de apache/cloudstack
Issues similaires
-
[Bug]: Nullable implicit operator on string extensible enums still throws for a null stringPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertebug emitter:client:csharp
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
microsoft/typespec#12572 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
[BUG]: Java SDK MountRequest always sends update-optional fields, resetting stored mount settingsOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationPeut-être pris @amalsaidov l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
needs-area-label
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours