Closed blackwood821 closed 2 years ago
@bahamat I made your suggested change.
@bahamat I made your suggested changes.
There's an image in the experimental channel. Can you try it out and make sure it's behaving as you expect?
@bahamat I'm testing the image now:
[root@headnode (neptune) ~]# sdcadm avail -C experimental cmon
SERVICE IMAGE VERSION
cmon cc8b9f68-3620-4e6e-88d2-a19489348a09 cmon@PR-36-20220222T220200Z-g141d707
[root@headnode (neptune) ~]# sdcadm update -C experimental cmon
Finding candidate update images for the "cmon" service.
Using channel experimental
This update will make the following changes:
download 1 image (60 MiB):
image cc8b9f68-3620-4e6e-88d2-a19489348a09
(cmon@PR-36-20220222T220200Z-g141d707)
update "cmon" service to image cc8b9f68-3620-4e6e-88d2-a19489348a09
(cmon@PR-36-20220222T220200Z-g141d707):
instance "29439549-5a40-4273-b8d5-772c1472161c" (cmon0) on server 5c2e28ab-b9e2-d8e5-18fc-94c691a3baae
Would you like to continue? [y/N] y
Create work dir: /var/sdcadm/updates/20220223T135755Z
Downloading image cc8b9f68-3620-4e6e-88d2-a19489348a09
(cmon@PR-36-20220222T220200Z-g141d707)
Imported image cc8b9f68-3620-4e6e-88d2-a19489348a09
(cmon@PR-36-20220222T220200Z-g141d707)
"cmon" VM already has a delegate dataset
Updating image for SAPI service "cmon"
service uuid: 56d0225b-d9a6-4dda-b51d-cf9d1df2c296
Installing image cc8b9f68-3620-4e6e-88d2-a19489348a09
(cmon@PR-36-20220222T220200Z-g141d707)
Reprovisioning VM 29439549-5a40-4273-b8d5-772c1472161c on server 5c2e28ab-b9e2-d8e5-18fc-94c691a3baae
Waiting for cmon instance 29439549-5a40-4273-b8d5-772c1472161c to come up
Updated successfully (elapsed 42s).
[root@headnode (neptune) ~]# sdcadm insts cmon
INSTANCE SERVICE HOSTNAME VERSION ALIAS
29439549-5a40-4273-b8d5-772c1472161c cmon headnode PR-36-20220222T220200Z-g141d707 cmon0
@bahamat I've tested the experimental image using the following values for discover_include_stopped
:
"true"
"false"
"foobar"
All scenarios worked as expected where stopped containers were only included in the discover response for test case 1.
@bahamat I made your suggested changes and tested them. I also stepped through the new code in the debugger and verified that the cache entry for a VM that transitions from running
to stopped
gets removed when discover_include_stopped
is not enabled.
The default behavior will remain unchanged but you can opt-in to discover
stopped
instances in addition torunning
instances via a newdiscover_include_stopped
SAPI configuration parameter.