-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ceph_orch_apply multiple yaml #9
base: main
Are you sure you want to change the base?
Conversation
this fix will load exisitng orch when we have more than one yaml returnet for same serice.
I see now there is a issue with idempotency check. Look like it's compare keys but the problem is when we have a list of dict(service spec). I will try to find a solution about this, probably we can use service_type and service_id keys if they match then continue with existing keys check. I'm not sure how relevant is this check but I think ceph service can be identified by pair of those two keys |
this help when we have more than one service
since ceph aways set it to service_id+service_type if we use custom service_name then we aways will get staus changed
Latest changes handle all cases with multiple exiting service. so we use 2 parameters parameters one of them is unique which help to get correct existing service to compare. |
I will wait this MR to be reviewed , if is submitted or other solution is implemented to fix the exiting problem then I think I can add and state: (service to be present or removed :) ) but imo changes must be done one by one |
also please let me know if I should bump version (1.1.0 > 1.1.1 since is a bug fix ?) |
No need for now, we will do it just before releasing a new version |
@NikolayDachev As you can see in the checks https://github.com/ceph/ceph.automation/actions/runs/12905142747/job/36124058813?pr=9 the one related to changelog failed. Thx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@asm0deuz Thank you for this approval, however look like I left some trailing spaces in fragment yaml, please approve workflow when is possible regards, |
this fix will load existing orch service when we have more than one yaml return for same service.
Current yaml.safe_load return exception when we have more than 1 yaml output exist via
This is expected behavior of yaml.safe_load however we should expet more than 1 yaml "document" for example
To handle that we should use yaml.safe_load_all
This is a simple fix , this is my first time with ceph.automation , from what I see this module is ceph/cephadm "on steroids :) " so no surprises , my point is ... I hope I not miss something please double check
Regards,