wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
64 stars 30 forks source link

Test: Upgrade #49

Closed chemamartinez closed 5 years ago

chemamartinez commented 5 years ago

Upgrade test

Version Revision Branch
3.9.0 rc4 3.9

RPM (Linux)

DEB (Linux)

macOS

Solaris (Intel)

Solaris (SPARC)

HP-UX

AIX

Sources

juan70 commented 5 years ago

2019-03-28

juan70 commented 5 years ago

As seen while testing the installation, wazuh-manager v3.9 seems to break yum on Fedora 29.

#  yum install vim
Traceback (most recent call last):
  File "/usr/bin/yum", line 57, in <module>
    from dnf.cli import main
ModuleNotFoundError: No module named 'dnf'

If Python is deactivated (so to say):

# mv /var/ossec/framework/python/ /var/ossec/framework/python_backup
# yum install vim
Last metadata expiration check: 0:13:58 ago on Thu 28 Mar 2019 09:26:32 AM UTC.
Dependencies resolved.
=======================================================================================================================
 Package                        Architecture           Version                           Repository               Size
=======================================================================================================================
Installing:
 vim-enhanced                   x86_64                 2:8.1.998-1.fc29                  updates                 1.3 M
Installing dependencies:
 vim-common                     x86_64                 2:8.1.998-1.fc29                  updates                 6.6 M
 vim-filesystem                 noarch                 2:8.1.998-1.fc29                  updates                  30 k
 gpm-libs                       x86_64                 1.20.7-16.fc29                    fedora                   19 k

Transaction Summary
=======================================================================================================================
Install  4 Packages

Total download size: 8.0 M
Installed size: 31 M
Is this ok [y/N]: 
...
# python3
Python 3.7.2 (default, Jan 16 2019, 19:49:22) 
[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import pprint
>>> pprint.pprint(sys.path)
['',
 '/usr/lib64/python37.zip',
 '/usr/lib64/python3.7',
 '/usr/lib64/python3.7/lib-dynload',
 '/usr/lib64/python3.7/site-packages',
 '/usr/lib/python3.7/site-packages']
>>>

If Python is reactivated:

# mv /var/ossec/framework/python_backup /var/ossec/framework/python
#  yum install tree
Traceback (most recent call last):
  File "/usr/bin/yum", line 57, in <module>
    from dnf.cli import main
ModuleNotFoundError: No module named 'dnf'
# python3
Python 3.7.2 (default, Mar 25 2019, 17:35:48) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import pprint
>>> pprint.pprint(sys.path)
['',
 '/var/ossec/framework/python/lib/python37.zip',
 '/var/ossec/framework/python/lib/python3.7',
 '/var/ossec/framework/python/lib/python3.7/lib-dynload',
 '/var/ossec/framework/python/lib/python3.7/site-packages',
 '/var/ossec/framework/python/lib/python3.7/site-packages/wazuh-3.9.0-py3.7.egg']
>>>

On CentOS 7, this problem does not occur. Probably because Python3 is not installed by default and yum uses Python2:

# python3
-bash: python3: command not found
# python
Python 2.7.5 (default, Oct 30 2018, 23:45:53) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import pprint
>>> pprint.pprint(sys.path)
['',
 '/usr/lib64/python27.zip',
 '/usr/lib64/python2.7',
 '/usr/lib64/python2.7/plat-linux2',
 '/usr/lib64/python2.7/lib-tk',
 '/usr/lib64/python2.7/lib-old',
 '/usr/lib64/python2.7/lib-dynload',
 '/usr/lib64/python2.7/site-packages',
 '/usr/lib/python2.7/site-packages']
>>> 
juan70 commented 5 years ago

On Debian9 and Ubuntu1604, a warning message appears on the console while upgrading (from 3.6 to 3.9):

...
Preparing to unpack .../wazuh-manager_3.9.0-1_amd64.deb ...
Unpacking wazuh-manager (3.9.0-1) over (3.6.0-1) ...
dpkg: warning: unable to delete old directory '/var/ossec/queue/syscheck': Directory not empty
...

The installation ends correctly.

No such message on RPM systems (CentOS7 or Fedora29).