**With a recent move away from openshift-hyperkube towards openshift-kubelet
the upgrade process will break as the hyperkube package in 4.15 conflicts with
the kubelet package of 4.16. This fix will remove the hyperkube package if it is
installed. This should be backwards compatible, because this process is run before
the update to reinstall package occurs. In the event that the package was intended
to be on the system it will be reinstalled.
See https://github.com/openshift/kubernetes/pull/1882
This will likely require some testing. I would expect clusters upgrading
to the new packaging to be fine but still have all of the other packages
installed. Maybe at some point we should come back and remove the other
packages but it doesn't seem imperative now.
** The yum module was originally having issues with upgrades (conflicts). Yum had a swap but the issues persisted.
A custom workaround was used by downloading RPMs. The process worked except for upgrades. It appeared that the evs-vswitchd daemon
was not correctly restarting causing lost connections during the upgrade process. The DNF module will use the --allowerasing option to
remove and install the package at the same time, avoiding the issue.
** Also noting that there were sometimes issues when the upgrade for openvswitch would upgrade to a package of the same version. This problem
has also been tested and works better with the DNF module.
** RHCOS in 4.13 bumped to OVS 3.1, we should do the same for RHEL workers as the client side (SDN pods) may soon depend on 3.1 features and 3.1 is known to perfom better.
** Original PR merged (https://github.com/openshift/openshift-ansible/pull/12445) but the upgrade
was not correctly applying selinux configuration details. The selinux config is broken out into
another task and imported in install and upgrade tasks.
**Openvswitch 2.1 to 2.17 cause upgrade issues. The package conflicts with itself.
Further it causes issues when the original is removed and the next is attempted
to be installed because openvswitch causes network issues when it is removed.
The node tuning operator and potentially other cluster components
can change the selinux context of the kubelet dir. By adding the
kubelet dir to the fixfiles_exclude_dirs we can prevent that.
Fixes: https://issues.redhat.com/browse/OCPBUGS-5255
** Utilizing module_args so that the data can be applied from playbooks.
the new parameter is run_attempts and it is an integer.
** Added a pylint disbale for too many args
** Increased scaleup time by increasing the number of attempts from 30 to 60. This will double the time spent. Decided not to increase wait time because it would require a wait of 40+ seconds between attempts which may look like a frozen process. Instead alert the user every 20 seconds but attempt max of 60 times.
Prior to this change, there was an error when a swap mount existed in
the fstab and was propigated to a systemd swap unit. This change
modifies the behavior so that the list of systemd swap units to remove
is not obtained until after the fstab changes are made.