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

'Permission denied' error when it tries to kill k3s PID #2005

Closed
billimek opened this issue Jun 2, 2020 · 1 comment
Closed

'Permission denied' error when it tries to kill k3s PID #2005

billimek opened this issue Jun 2, 2020 · 1 comment

Comments

@billimek
Copy link

billimek commented Jun 2, 2020

The system upgrade controller plan ran on a k3s node and while it successfully upgraded the k3s binary, it failed to kill the k3s PID.

This was on an ubuntu 20.04 based OS with k3s installed on-top.

➜ k -n k3os-system logs -f apply-k3s-agent-on-k3s-pi4-c-with-5822e4c612633d6f88d07e5-mtqxt -c prepare
+ upgrade
+ get_k3s_process_info
+ ps -ef
+ grep -E 'k3s .*(server|agent)'
+ grep -E -v '(init|grep|channelserver)'
+ awk '{print $1}'
+ K3S_PID=1246
+ '[' -z 1246 ]
+ info 'K3S binary is running with pid 1246'
+ echo '[INFO] ' 'K3S binary is running with pid 1246'
[INFO]  K3S binary is running with pid 1246
+ cat /host/proc/1246/cmdline
+ awk '{print $1}'
+ head -n 1
+ K3S_BIN_PATH=/usr/local/bin/k3s
+ '[' 1246 '==' 1 ]
+ '[' -z /usr/local/bin/k3s ]
+ return
+ replace_binary
+ NEW_BINARY=/opt/k3s
+ FULL_BIN_PATH=/host/usr/local/bin/k3s
+ '[' '!' -f /opt/k3s ]
+ info 'Comparing old and new binaries'
+ echo '[INFO] ' 'Comparing old and new binaries'
[INFO]  Comparing old and new binaries
+ sha256sum /opt/k3s /host/usr/local/bin/k3s
+ cut '-d ' -f1
+ uniq
+ wc -l
+ BIN_COUNT=2
+ '[' 2 '==' 1 ]
+ info 'Deploying new k3s binary to /usr/local/bin/k3s'
+ echo '[INFO] ' 'Deploying new k3s binary to /usr/local/bin/k3s'
+ cp /opt/k3s /host/usr/local/bin/k3s
[INFO]  Deploying new k3s binary to /usr/local/bin/k3s
+ info 'K3s binary has been replaced successfully'
+ echo '[INFO] ' 'K3s binary has been replaced successfully'
+ return
+ kill_k3s_process
+ kill -SIGTERM 1246
[INFO]  K3s binary has been replaced successfully
sh: can't kill pid 1246: Permission denied
@cjellick cjellick transferred this issue from k3s-io/k3s-upgrade Jul 9, 2020
@stale
Copy link

stale bot commented Jul 31, 2021

This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.

@stale stale bot added the status/stale label Jul 31, 2021
@stale stale bot closed this as completed Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant