updateConfiguration with a scope id returns the global value in its response
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.4k
- Merge trung bình
- 7 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/cloudstack
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizeCó thể đã có người làm @bhouse-nexthop đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/cloudstack#14645 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedCó thể đã có người làm @bhouse-nexthop đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/cloudstack#14633 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Có thể đã có người làm @bhouse-nexthop đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/cloudstack#14631 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/cloudstack#14625 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Có thể đã có người làm @willbennett-devops đã nhận 12 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/cloudstack#14545 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/cloudstack
Issue tương tự
-
untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
Good First Issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
hiero-ledger/hiero-sdk-java#3059 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug live-tv platform:desktop platform:mobile platform:tv
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
fk0u/cleanyourtv-tahoe#102 ·
Maintainer thường phản hồi trong vòng 1 ngày