OCP Worker Node REBOOT

( işlemler sırası ile yapılmalı ) 1 - bastion makinesine bağlanılır. (ocp oc komutları yüklü ve ssh key install edilmiş bir linux makinede o...

( işlemler sırası ile yapılmalı )
1 - bastion makinesine bağlanılır. (ocp oc komutları yüklü ve ssh key install edilmiş bir linux makinede olur.)
2 - bastion ile cluster yapısına bağlanılır.
3 - " oc get co " ile ilk olarak servis durumuna bakılır, yine " oc get nodes " ile nodes durumlarına bakılır.
4 - " oc adm cordon <node-adı> " bu komut ile yeni worker yada hangi node reboot edilecek ise üzerine yeni pod alması engellenir.
5 - " oc adm drain <node-adı> --ignore-daemonsets --delete-emptydir-data --force " komutu ile worker veya hangi node reboot edilecek ise drain ( üzerindeki pod' lar boşaltılır ) edilir. Bu işlerin yoğunluğu diğer node' ların durumuna göre uzun sürebilir.
NOT : Eğer 5. adım uzun sürer ve hatalar alır iseniz aşağıdaki komutu denemelisiniz. 
" oc adm drain <node-adı> --ignore-daemonsets --delete-emptydir-data --force --disable-eviction "
6 - Sonrasında debug mode geçilir " oc debug node/<node-adı> " 
7 - " chroot /host " host klasörüne geçilir ve sonraki komut uygulanır.
8 - " systemctl reboot " system reboot edilir.

REBOOT Sonrası
9 - Fiziki olarak reboot işlemi bittikten sonra oc get nodes komutu ile reboot edilen node durumu ve açık olduğunda emin olunur ama burada üzerine otomatik pod almaz aşağıdaki komutu ile status change yapmamız gerekiyor. " oc adm uncordon <node-adı> "
10 - " oc get nodes "  ve " oc get co " komutları illede servis ve node durumları kontrol edilebilir.
Ek notlar 1 : oc get nodes çıktısında status bölümü not ready yazan node üzerinde bu işlemleri yapamazsınız. 
Ek notlar 2 : Bunun yerine eğer yine erişim yapılabiliyor iseniz ssh core@<node-adı> şeklinde girebilir ve reboot zorlayabilirsiniz. Yada en son çare ILO - İDRAC vb arayüzden erişerek reboot edebilirsiniz. Buradaki yöntemleri redhat support alıyor iseniz uygun görmez ve tavsiye edilmez üzerindeki pod ve container zarar görebilir.

Kısaca;
$ oc adm cordon node1.example.com
$ oc adm drain node1.example.com
$ oc debug node/node1.example.com
sh-4.4# chroot /host
sh-4.4# systemctl reboot
$ oc adm uncordon node1.example.com
$ oc get nodes

Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content