.. _update-procedure:

Update Procedure
================

This section contains an overview of the NetEye update
procedure. Please read it carefully before actually starting the
update procedure.

Moreover, starting from release **4.23**, NetEye is based on **RHEL
8**: a number of useful information, including RHEL life cycle,
license, and benefits, can be found in section :ref:`rhel-os`.

NetEye installations can be updated by using the command
:command:`neteye update`, which will carry out a number of tasks, some
of which on Clusters **only**. The command requires almost no
interaction and should normally conclude successfully, except for the
following situations:

#. A (health) check fails
#. An .rpmnew and/or .rpmsave file is found
#. The elected NetEye Master node is in standby mode

Check the sections :ref:`neteye-update-single` and
:ref:`neteye-update-cluster` for details on the tasks executed and
section :ref:`update-ts` for directions on how to tackle these
problems.

.. _neteye-update-single:

NetEye Single Instance
----------------------

On a NetEye Single Instance, the update procedure is carried out by
running:

.. code:: bash

   # nohup neteye update

All the tasks carried out by the command are listed in section
:ref:`neteye-update`.
     
If the command is successful, a message will inform you that the
update procedure has concluded successful; otherwise, check section
:ref:`update-ts` to fix the problems, then run the command again.

Finally, to ensure that any potentially stopped and/or newly installed NetEye
services are running, use the command

.. code:: bash

   # neteye start

.. _neteye-update-cluster:

NetEye Cluster
--------------

Updating a cluster will take a nontrivial amount of time, however no
downtime needs to be planned. During the cluster update, individual
nodes will be put into standby mode and so overall cluster performance
will be degraded until the update procedure is completed and all nodes
are removed from standby mode.

An estimate for the time needed for a full upgrade (update + upgrade)
when the cluster is healthy, there is no additional NetEye modules
installed, and the procedure is successful is approximately **30
minutes**, plus **15 minutes per node**.

.. warning:: This estimate **does not** include the time required to
   download the packages and for any manual intervention due to
   failure of tasks during the execution of the :command:`neteye
   update` and :command:`neteye upgrade` commands.


Prerequisites
~~~~~~~~~~~~~

.. rubric::  Kernel and DRBD version

It is critical that the versions of the Linux kernel and *drbd* match.
Clusters **must not** be updated if a package update would cause a
version mismatch.

You can find the currently installed and the available package
versions by running the following two commands, then checking that the
version numbers reported in the line `Installed Packages` match those
reported on the last line of the `Available Packages` column.

.. code:: bash

   # dnf list kernel --show-duplicates

.. container:: codeblock

   .. code:: bash

      Installed Packages
      kernel.x86_64      3.10.0-1160.42.2.el7      @updates

.. code:: bash

   # dnf list kmod-drbd --show-duplicates

.. container:: codeblock

   .. code:: bash

      Installed Packages
      kmod-drbd.x86_64      9.0.30_3.10.0_1160.42.2-1      @neteye-os

In this case, the versions match: **3.10.0-1160.42.2**\.el7  9.0.30\_\
**3.10.0_1160.42.2**\ -1

If :command:`dnf` reports that either the kernel or *drbd* has a newer
version available, you need to check that after an update their
versions will again be the same.

Running the Update
~~~~~~~~~~~~~~~~~~

On a NetEye Single Instance, the update procedure is carried out by
running:

.. code:: bash

   # nohup neteye update


All the tasks carried out by the command are listed in section
:ref:`neteye-update`.
     
If the command is successful, a message will inform you that the
update procedure has concluded successful; otherwise, check section
:ref:`update-ts` to fix the problems, then run the command again.

.. _update-step-two:

Cluster Reactivation
~~~~~~~~~~~~~~~~~~~~

You can now restore the cluster to high availability operation.

* Run the following command to remove all nodes from standby mode (it
  doesn’t matter which node this command is run on)::

   # pcs node unstandby --all

* Please ensure your cluster is healthy by checking the standard
  procedure described in the section :ref:`check-cluster-status`.
* If you previously disabled *stonith* above to disable fencing,
  re-enable it::

   # pcs property set stonith-enabled=true

.. _neteye-update-satellites:

NetEye Satellites
-----------------

.. include:: /includes/satellite-update.rst

