+++ This bug was initially created as a clone of Bug #1559143 +++ Description of problem: Since the upgrade does an in-place upgrade, we would really like to be able to upgrade the base os (operating system, RHEL) while the node is drained and not running. As it current stands, we need to drain a node 2x during an upgrade to get Openshift and then RHEL upgraded. If we don't have an option, we'd like to have a hook that we can plug in to and run while openshift node is not running and the node is drained. --- Additional comment from Scott Dodson on 2018-04-26 14:55:21 EDT --- For master / 3.10 https://github.com/openshift/openshift-ansible/pull/7743 https://github.com/openshift/openshift-ansible/pull/7736
community provided backport pr https://github.com/openshift/openshift-ansible/pull/8095 Should be in openshift-ansible-3.9.27-1 and later
*** Bug 1493921 has been marked as a duplicate of this bug. ***
Verify this bug with openshift-ansible-3.9.28-1.git.0.4fc2ce4.el7.noarch With node pre-upgrade hook, we could do OS upgrade after node is unschedulable and drained, also with upgrade hook which would run after node is upgraded and before being schedulable again, we could also finished a server reboot. Add the hooks definition in ansible inventory while doing upgrade: openshift_node_upgrade_pre_hook=/root/workspace/pre_node.yml openshift_node_upgrade_hook=/root/workspace/node.yml [root@gpei-preserved ~]# cat /root/workspace/pre_node.yml --- - name: Note the start of node OS upgrade debug: msg: "Node OS upgrade of {{ inventory_hostname }} is about to start" - name: Upgrade the OS yum: name=* state=latest - name: debug: msg: "OS upgrade of {{ inventory_hostname }} finished" [root@gpei-preserved ~]# cat /root/workspace/node.yml - name: Note the reboot of node debug: msg: "Node {{ inventory_hostname }} is upgraded, going to be rebooted..." - name: Restart server shell: sleep 2 && shutdown -r now "Ansible updates triggered" async: 1 poll: 0 become: true ignore_errors: true - name: Waiting for the server to come back wait_for_connection: delay: 120 timeout: 300 - name: Ensure that required services are running service: name: "{{ item }}" state: started enabled: yes with_items: - docker - atomic-openshift-node.service - dnsmasq Run 3.7 -> 3.9 upgrade, /root/workspace/pre_node.yml and /root/workspace/node.yml were executed on each node successfully. And the whole upgrade is finished.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:2013