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

Merge stop and remove systemd service task inreset/tasks/main.yml #10901

Closed
kimsehwan96 opened this issue Feb 8, 2024 · 0 comments · Fixed by #10902
Closed

Merge stop and remove systemd service task inreset/tasks/main.yml #10901

kimsehwan96 opened this issue Feb 8, 2024 · 0 comments · Fixed by #10902
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@kimsehwan96
Copy link
Contributor

kimsehwan96 commented Feb 8, 2024

What would you like to be added

There are stop and remove systemd service tasks in reset/tasks/main.yml (

- name: Reset | stop services
service:
name: "{{ item }}"
state: stopped
with_items:
- kubelet.service
- cri-dockerd.service
- cri-dockerd.socket
failed_when: false
tags:
- services
- name: Reset | remove services
file:
path: "/etc/systemd/system/{{ item }}"
state: absent
with_items:
- kubelet.service
- cri-dockerd.service
- cri-dockerd.socket
- calico-node.service
- containerd.service.d/http-proxy.conf
- crio.service.d/http-proxy.conf
- k8s-certs-renew.service
- k8s-certs-renew.timer
register: services_removed
tags:
- services
- containerd
- crio
)

By the way, the tasks that stop and remove etcd.service and etcd-events.service are in other tasks (

- name: Reset | stop etcd services
service:
name: "{{ item }}"
state: stopped
with_items:
- etcd
- etcd-events
failed_when: false
tags:
- services
- name: Reset | remove etcd services
file:
path: "/etc/systemd/system/{{ item }}.service"
state: absent
with_items:
- etcd
- etcd-events
register: services_removed
tags:
- services
)

And then, there is no systemd daemon-reload tasks after stop and remove etcd related systemd services, so if you run systemctl status etcd.service then the output shows inactivate etcd related services.

So I think it's better that merging the tasks stop and remove etcd.service, etcd-events.service.

Why is this needed

I think its better that merging the tasks that stop and remove systemd services because if do not, you can get some outputs from $ systemctl status etcd on etcd node after all reset tasks are done. and it may feel confusing about the systemd services are really removed or not.

@kimsehwan96 kimsehwan96 added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant