salt icon indicating copy to clipboard operation
salt copied to clipboard

Salt 2018.3.0: libnacl missing error

Open jmcook1 opened this issue 8 years ago • 2 comments

Salt 2018.3.0 appears to need a newer version of libnacl than what's provided in the saltstack repo.

Broken setup:

           Salt: 2018.3.0

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.3
        libgit2: Not Installed
        libnacl: 1.4.3
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.1
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.4.1708 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.21.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.4.1708 Core
# yum info python-libnacl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.es.its.nyu.edu
 * epel: mirror.beyondhosting.net
 * extras: mirror.fdcservers.net
 * updates: mirror.trouble-free.net
Installed Packages
Name        : python-libnacl
Arch        : noarch
Version     : 1.4.3
Release     : 1.el7
Size        : 79 k
Repo        : installed
From repo   : saltstack-repo
Summary     : Python bindings for libsodium/tweetnacl based on ctypes
URL         : https://github.com/saltstack/libnacl
License     : ASL 2.0
Description : This library is used to gain direct access to the functions exposed by Daniel
            : J. Bernstein's nacl library via libsodium or tweetnacl. It has been constructed
            : to maintain extensive documentation on how to use nacl as well as being
            : completely portable. The file in libnacl/__init__.py can be pulled out and
            : placed directly in any project to give a single file binding to all of nacl.
            :
            : This is the Python 2 build of the module.

Running anything related to libnacl returns "'nacl' virtual returned False: libnacl import error, perhaps missing python libnacl package or should update." Example below:

# salt-call --local nacl.keygen
'nacl' __virtual__ returned False: libnacl import error, perhaps missing python libnacl package or should update.

Apparent Fix

Uninstalling the python-libnacl package, installing pip (via the python2-pip package), and then upgrading libnacl fixes the issue (BTW, yum erase python-libnacl doesn't appear to clean up everything):

# pip install libnacl
Requirement already satisfied (use --upgrade to upgrade): libnacl in /usr/lib/python2.7/site-packages
You are using pip version 8.1.2, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

# pip install libnacl --upgrade
Collecting libnacl
 Downloading libnacl-1.6.1-py2.py3-none-any.whl
Installing collected packages: libnacl
 Found existing installation: libnacl 1.4.3
   DEPRECATION: Uninstalling a distutils installed project (libnacl) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
   Uninstalling libnacl-1.4.3:
     Successfully uninstalled libnacl-1.4.3
Successfully installed libnacl-1.6.1
You are using pip version 8.1.2, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Versions after upgrading via pip:

Salt Version:
           Salt: 2018.3.0

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.3
        libgit2: Not Installed
        libnacl: 1.6.1
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.1
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.4.1708 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.21.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.4.1708 Core

It would appear that the version provided in the saltstack repo for 2018.3.x needs to be updated.

Please let me know if you need any addition info.

jmcook1 avatar Apr 09 '18 19:04 jmcook1

Thanks for the notice. This should be fixed with the next point release for Redhat 7 support.

Note: that packaging issues are dealt with https://github.com/saltstack/salt-pack for Python 2 and https://github.com/saltstack/salt-pack-py3 for Python 3

dmurphy18 avatar Apr 09 '18 22:04 dmurphy18

This should be fixed in the next point releases

dmurphy18 avatar Apr 20 '18 21:04 dmurphy18