Skip to content
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

etcd: compatibility with check mode #470

Merged
merged 5 commits into from
Sep 14, 2023
Merged

etcd: compatibility with check mode #470

merged 5 commits into from
Sep 14, 2023

Conversation

vitabaks
Copy link
Owner

@vitabaks vitabaks commented Sep 14, 2023

do not install etcd in check mode

ansible-playbook --check (don't make any changes; instead, try to predict some of the changes that may occur)

Fixed:

TASK [etcd : Download "etcd" package] ******************************************
failed: [10.129.50.35] (item=https://github.com/etcd-io/etcd/releases/download/vv3.3.27/etcd-v3.3.27-linux-amd64.tar.gz) => {"ansible_loop_var": "item", "changed": false, "dest": "/tmp/", "elapsed": 0, "gid": 0, "group": "root", "item": "https://github.com/etcd-io/etcd/releases/download/v3.3.27/etcd-v3.3.27-linux-amd64.tar.gz", "mode": "01777", "msg": "Request failed", "owner": "root", "response": "HTTP Error 404: Not Found", "size": 4096, "state": "directory", "status_code": 404, "uid": 0, "url": "https://github.com/etcd-io/etcd/releases/download/v3.3.27/etcd-vv3.3.27-linux-amd64.tar.gz"}

Related PR: #459

Additionally:

  • Add ETCDCTL_API: "3" to environment
  • expect 'is healthy' status in stdout or in stderr
    • In certain scenarios (for example the old etcd version), even when a command executes without errors (.rc=0), the output may reside in stderr instead of stdout. Now we accommodate for 'is healthy' in either output stream.

@vitabaks vitabaks self-assigned this Sep 14, 2023
@vitabaks vitabaks changed the title etcd: do not install in check mode etcd: compatibility with check mode Sep 14, 2023
In certain scenarios (for example the old etcd version), even when a command executes without errors (.rc=0), the output may reside in stderr instead of stdout. Now we accommodate for 'is healthy' in either output stream.
@vitabaks vitabaks merged commit ff7713a into master Sep 14, 2023
18 checks passed
@vitabaks vitabaks deleted the etcd-check-mode branch September 14, 2023 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant