-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fixing issue with doryd service not coming up #586
base: master
Are you sure you want to change the base?
Changes from all commits
96f3091
d42384d
aa2ef6e
c576f82
4e1b258
32f4460
6429143
8457dc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,34 @@ | |
daemon_reload: yes | ||
enabled: yes | ||
name: doryd.service | ||
|
||
- name: collect facts about system services | ||
service_facts: | ||
register: services_state | ||
|
||
- name: If the service failed to start, use another kubeconfig | ||
ini_file: | ||
path: /etc/systemd/system/doryd.service | ||
section: Service | ||
option: ExecStart | ||
value: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/hpe.com~hpe/doryd /etc/origin/master/admin.kubeconfig hpe.com | ||
when: services_state['ansible_facts']['services']['doryd.service']['state'] == "stopped" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can there be a possible race condition between the two attempts to start the service? |
||
|
||
- name: restart doryd service, also issue daemon-reload to pick up config changes | ||
systemd: | ||
state: started | ||
daemon_reload: yes | ||
enabled: yes | ||
name: doryd.service | ||
when: services_state['ansible_facts']['services']['doryd.service']['state'] == "stopped" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to check against started rather than stopped |
||
|
||
- name: Getting the status of the service | ||
service_facts: | ||
register: services_state_2 | ||
when: services_state['ansible_facts']['services']['doryd.service']['state'] == "stopped" | ||
|
||
- name: Fail if the service fails to start | ||
fail: | ||
msg: "Failed to start doryd service" | ||
when: services_state['ansible_facts']['services']['doryd.service']['state'] == "stopped" and services_state_2['ansible_facts']['services']['doryd.service']['state'] == "stopped" | ||
|
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.
Stopgap fix. The long term fix would be to understand which config file works for which version of openshift/kubernetes