Upgrade from 4.17 to 4.18¶
This guide will lead you through the steps specific for upgrading from a NetEye Single Node installation from version 4.17 to 4.18.
Warning
Remember that you must upgrade sequentially without skipping versions, therefore an update to 4.18 is possible only from 4.17; if you have a 4.15 you must first upgrade to 4.16, then to 4.17.
Before starting an upgrade, you should very carefully read the the release notes on NetEye’s blog and check the feature changes and deprecations specific to the version being upgraded. You can check also the Additional steps to verify if there are changes that might significantly impact your NetEye installation.
Update Procedure¶
Ensure that you have already updated your operating system by following the CentOS and NetEye Update procedures.
Note
The update procedure must be completed successfully before starting the upgrade.
Verify eligibility to upgrade¶
In order to verify if your installation can be upgraded, run from the command line the command:
# nohup neteye upgrade
The neteye upgrade command will run a number of checks to make sure that:
The version on NetEye installed is eligible for upgrade, that is, it checks which is the installed version (i.e., 4.xx) and that the last upgrade was finalized, i.e., the
neteye_finalize_installation
script was carried out successfully.NetEye is fully updated and there are no minor (bugfix) updates to be installed.
Warning
The neteye upgrade
command may take a long time
before it completes successfully, so please do not interrupt it
until it exits.
If any of these tasks is unsuccessful, a message will explain where the command failed, allowing you to manually fix the corresponding step. For example, if the exit message is similar to the following one, you need to manually install the latest updates.
"Found updates not installed"
"Example: icingacli, version 2.8.2_neteye1.82.1"
Then, if needed, the command will:
Update all the NetEye repositories to the newer version (i.e., 4.yy, which is the next version to which it is possible to upgrade)
Install all the RPMs of the newer version (i.e., 4.yy)
Upgrade the NetEye’s yum groups
If the command is successful, a message will inform you that it is possible to continue the upgrade procedure, by checking if there are some manual migrations to carry out: if there are, they will be listed in the next section.
Additional steps¶
In this upgrade, no additional manual step is required.
Migration of RPM Configuration¶
Each upgraded package can potentially create .rpmsave and/or .rpmnew files. You will need to verify and migrate all such files.
You can find more detailed information about what those files are and why they are generated in the official RPM documentation.
Briefly, if a configuration file has changed since the last version, and the configuration file was edited since the last version, then the package manager will do one of these two things:
If the new system configuration file should replace the edited version, it will save the old edited version as an .rpmsave file and install the new system configuration file.
If the new system configuration file should not replace the edited version, it will leave the edited version alone and save the new system configuration file as an .rpmnew file.
Note
You can use the following commands to locate .rpmsave and .rpmnew files:
# updatedb
# locate *.rpmsave*
# locate *.rpmnew*
The instructions below will show you how to keep your customized operating system configurations.
How to Migrate an .rpmnew Configuration File
The update process creates an .rpmnew file if a configuration file has changed since the last version so that customized settings are not replaced automatically. Those customizations need to be migrated into the new .rpmnew configuration file in order to activate the new configuration settings from the new package, while maintaining the previous customized settings. The following procedure uses Elasticsearch as an example.
First, run a diff between the original file and the .rpmnew file:
# diff -uN /etc/sysconfig/elasticsearch /etc/sysconfig/elasticsearch.rpmnew
OR
# vimdiff /etc/sysconfig/elasticsearch /etc/sysconfig/elasticsearch.rpmnew
Copy all custom settings from the original into the .rpmnew file. Then create a backup of the original file:
# cp /etc/sysconfig/elasticsearch /etc/sysconfig/elasticsearch.01012018.bak
And then substitute the original file with the .rpmnew:
# mv /etc/sysconfig/elasticsearch.rpmnew /etc/sysconfig/elasticsearch
How to Migrate an .rpmsave Configuration File
The update process creates an .rpmsave file if a configuration file has been changed in the past and the updater has automatically replaced customized settings to activate new configurations immediately. In order to preserve your customizations from the previous version, you will need to migrate those from the original .rpmsave into the new configuration file.
Run a diff between the new file and the .rpmsave file:
# diff -uN /etc/sysconfig/elasticsearch.rpmsave /etc/sysconfig/elasticsearch
OR
# vimdiff /etc/sysconfig/elasticsearch.rpmsave /etc/sysconfig/elasticsearch
Copy all custom settings from the .rpmsave into the new configuration file, and preserve the original .rpmsave file under a different name:
# mv /etc/sysconfig/elasticsearch.rpmsave /etc/sysconfig/elasticsearch.01012018.bak
Finalization Procedure¶
Once all the steps in the upgrade procedure have been carried out, you should finalize them. The following command will apply the necessary changes to your NetEye installation:
# neteye_secure_install
Next, start any potentially stopped and/or newly installed NetEye services:
# neteye start
Complete the upgrade process by launching the following script:
# neteye_finalize_installation
Note
You should launch the finalize command only if all previous steps have been completed successfully. If you encounter any errors or problems during the upgrade process, please contact our our service and support team to evaluate the best way forward for upgrading your NetEye system.
Troubleshooting: Failing health checks, migration of modules¶
After the finalization procedure has successfully ended, you might notice in the Problems View that some health check fails and is in state WARNING. The reason is that you are using some module that needs to be migrated, because some breaking change has been introduced in the release.
Hence, you should go to the Problems View and check which health check is failing. There you will also find instructions for the correct migration of the module, which is in almost all cases amounts to enabling an option: the actual migration will then be executed manually.