salt: Problem re-installing salt-minion

Description of Issue/Question

I found the salt-minion on a server broken, I had to un-install it with,

yum --setopt=tsflags=noscripts remove salt-minion

As I kept getting,

===========
8><---
Running Transaction
error: %preun(salt-minion-2017.7.0-1.el6.noarch) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package salt-minion
8><---
===========

So when I try to install it and run it I get,

===========
[root@vuwunicocatd001 etc]# yum -y install salt-minion
Loaded plugins: product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package salt-minion.noarch 0:2017.7.0-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================
 Package                           Arch                         Version                               Repository                            Size
=================================================================================================================================================
Installing:
 salt-minion                       noarch                       2017.7.0-1.el6                        saltstack-salt                        36 k

Transaction Summary
=================================================================================================================================================
Install       1 Package(s)

Total download size: 36 k
Installed size: 76 k
Downloading Packages:
salt-minion-2017.7.0-1.el6.noarch.rpm                                                                                     |  36 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : salt-minion-2017.7.0-1.el6.noarch                                                                                             1/1 
  Verifying  : salt-minion-2017.7.0-1.el6.noarch                                                                                             1/1 

Installed:
  salt-minion.noarch 0:2017.7.0-1.el6                                                                                                            

Complete!
[root@vuwunicocatd001 etc]# service salt-minion stop
ERROR: Unable to look-up config values for /etc/salt
[root@vuwunicocatd001 etc]# cd salt
[root@vuwunicocatd001 salt]# ls -l
total 72
-rw-r-----. 1 root root 34771 Jul 13 06:08 minion
drwxr-xr-x. 2 root root  4096 Jul 18 07:34 minion.d
drwxr-xr-x. 3 root root  4096 Aug  1 10:03 pki
-rw-r-----. 1 root root 28002 Jul 13 06:08 proxy
[root@vuwunicocatd001 salt]# salt-minion -l debug
Traceback (most recent call last):
  File "/usr/bin/salt-minion", line 6, in <module>
    from salt.scripts import salt_minion
ImportError: No module named salt.scripts
[root@vuwunicocatd001 salt]# 
=============

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

======
[root@vuwunicocatd001 salt]# rpm -q salt-minion
salt-minion-2017.7.0-1.el6.noarch
[root@vuwunicocatd001 salt]# 
======

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 39 (15 by maintainers)

Most upvoted comments

@gzcwnk The issue can be due to not having the older support for Redhat 6 totally removed (it uses Python 2.6). Starting with 2017.7.x, salt uses Python 2.7 on Redhat 6.

Some other users have reported issues with not finding the scripts too and it was found that it was due to their environment having python 2.7 already installed, for example in /usr/local/lib. Salt 2017.7.x installs a version of Python 2.7 in /usr/lib and it is this version which must be available to use with salt so that the correct scripts can be located /usr/lib/python2.7/site-packages/salt/scripts.py

[root@localhost salt]# /usr/bin/python2.7 --version Python 2.7.13

Hopefully this information helps to resolve your issue.