-
Notifications
You must be signed in to change notification settings - Fork 92
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
Returns Success even if Minio Service Didn't start Successfully #28
Comments
Hi @katia-e, do you have any example of variables you used to configure the role to try to reproduce the issue? |
For example I set up the following
This config cannot succeed due to the number of PLAY RECAP *************************************************************************************************************
195.134.212.39 : ok=13 changed=1 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 But MinIO service failed to start on the remote machine. With this issue I was wondering if it's possible to return error if MinIO failed to start. Otherwise Ansible reports success, while some tasks failed. |
I discovered this by accident when trying to change users and permissions are wrong. One problem I found is that some issues actually the playbook may be returning OK because this check ansible-minio/tasks/install-server.yml Lines 86 to 90 in 15ad3a3
Actually not fail. And this may happens because take some seconds to systemd actually report the minio as failed because minio may take some time to report as failed for real I'm not very sure how to implement a check for this, but maybe one very simple way would be give at least a few seconds (for sure no less than 5 seconds) to check at at the end of the playbook if the service still working. Note about molecule tests & check if services are runningThese types of check are complicated to test with docker and may require much larger docker images that have systemd or equivalent. If the current docker images already not works with these checks, not enable such checks when running inside containers could still valid, since on real VPS they are likely to work fine. |
I think this is a general problem with Ansible, and/or maybe systemd. You can do a Otherwise, I've created a play to do this (I run 4 nodes, so adjust your output):
|
For example if odd number of shards is provided to MinIO configuration, playbook will install successfully, but MinIO service will fail to start. I'd expect in this case Playbook to report an error from systemctl. Currently it reports success, even if MinIO failed to start.
The text was updated successfully, but these errors were encountered: