FreeBSD installation problem

128 views
Skip to first unread message

Wayne Fiori

unread,
Apr 11, 2012, 3:39:34 PM4/11/12
to salt-...@googlegroups.com
Guys,

I've been deploying saltstack (salt-0.9.8) recently. The installation
has be trouble free on all my Gentoo, Ubuntu, and most FreeBSD
servers. I have three FreeBSD servers that have the following python
trace:

ns-test-1# service salt_minion start
Starting salt_minion.
/usr/local/lib/python2.6/site-packages/salt/__init__.py:18:
DeprecationWarning: BaseException.message has been deprecated as of
Python 2.6
if e.message != 'No module named _msgpack':
Traceback (most recent call last):
File "/usr/local/bin/salt-minion", line 7, in <module>
import salt
File "/usr/local/lib/python2.6/site-packages/salt/__init__.py", line
14, in <module>
import salt.config
File "/usr/local/lib/python2.6/site-packages/salt/config.py", line
23, in <module>
import salt.crypt
File "/usr/local/lib/python2.6/site-packages/salt/crypt.py", line
16, in <module>
from M2Crypto import RSA
File "build/bdist.freebsd-9.0-RELEASE-i386/egg/M2Crypto/__init__.py",
line 22, in <module>
File "build/bdist.freebsd-9.0-RELEASE-i386/egg/M2Crypto/__m2crypto.py",
line 7, in <module>
File "build/bdist.freebsd-9.0-RELEASE-i386/egg/M2Crypto/__m2crypto.py",
line 6, in __bootstrap__
ImportError: //.python-eggs/M2Crypto-0.21.1-py2.6-freebsd-9.0-RELEASE-i386.egg-tmp/M2Crypto/__m2crypto.so:
Undefined symbol "PyGILState_Release"
/usr/local/etc/rc.d/salt_minion: WARNING: failed to start salt_minion

I followed the installation procedure from the docs
(http://salt.readthedocs.org/en/latest/topics/installation/freebsd.html)
for FreeBSD installs. The installs were successful on 11 BSD servers
that are identical (minor package differences).

Any pointers/suggestions about this issue?
--
=Wayne

Jeff Schroeder

unread,
Apr 11, 2012, 3:45:59 PM4/11/12
to salt-...@googlegroups.com

Is python-msgpack installed? From a python interpreter can you try:
import msgpack

Was the FBSD minion which was failing previously running salt and
upgraded or a fresh install?

--
Jeff Schroeder

Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com

Thomas S Hatch

unread,
Apr 11, 2012, 3:49:11 PM4/11/12
to salt-...@googlegroups.com
Are the FreeBSD servers all the same version? Maybe you gave an M2Crypto that is too old 

Wayne Fiori

unread,
Apr 11, 2012, 3:53:37 PM4/11/12
to salt-...@googlegroups.com
This is fresh install onto FreeBSD v9.0.

Yep, msgpack is installed.

ns-test-1# python
Python 2.6.7 (r267:88850, Apr 10 2012, 18:56:14)
[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9
Type "help", "copyright", "credits" or "license" for more information.
>>> import msgpack
>>>

The installed packages relevant to salt:

py26-Jinja2-2.6 A fast, and easy to use stand-alone template engine
py26-MarkupSafe-0.15 Implements a XML/HTML/XHTML Markup safe string for Python
py26-m2crypto-0.21.1 Crypto and SSL toolkit for Python
py26-msgpack-0.1.9 MessagePack (de)serializer for Python
py26-pycrypto-2.5 The Python Cryptography Toolkit
py26-pyzmq-2.1.11 Python bindings for ZeroMQ
py26-setuptools-0.6c11_3 Download, build, install, upgrade, and
uninstall Python pac
py26-yaml-3.10 Python YAML parser
zmq-2.1.11 Open source message queue optimised for performance
--
=Wayne

Wayne Fiori

unread,
Apr 11, 2012, 4:05:19 PM4/11/12
to salt-...@googlegroups.com


All the FreeBSD servers are at the same version. M2Crypto
(py26-m2crypto-0.21.1) is on all the servers (successful and
unsuccessful install). I've updated the ports today and re-installed
salt, and it's dependencies, with no success. The issue is at the RSA
import.

ns-test-1# python
Python 2.6.7 (r267:88850, Apr 10 2012, 18:56:14)
[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9
Type "help", "copyright", "credits" or "license" for more information.

>>> from M2Crypto import RSA


Traceback (most recent call last):

File "<stdin>", line 1, in <module>


File "build/bdist.freebsd-9.0-RELEASE-i386/egg/M2Crypto/__init__.py",
line 22, in <module>
File "build/bdist.freebsd-9.0-RELEASE-i386/egg/M2Crypto/__m2crypto.py",
line 7, in <module>
File "build/bdist.freebsd-9.0-RELEASE-i386/egg/M2Crypto/__m2crypto.py",
line 6, in __bootstrap__

ImportError: /root/.python-eggs/M2Crypto-0.21.1-py2.6-freebsd-9.0-RELEASE-i386.egg-tmp/M2Crypto/__m2crypto.so:
Undefined symbol "PyGILState_Release"

This looks like a BSD issue to me. I hoped someone might have run
across this issue already. I'll keep looking for a solution -- short
of re-installing the server.

It was rolling out so smoothly...
--
=Wayne

Christer Edwards

unread,
Apr 11, 2012, 6:45:27 PM4/11/12
to salt-...@googlegroups.com
On Wed, Apr 11, 2012 at 4:05 PM, Wayne Fiori <dev9...@gmail.com> wrote:
>>> > I've been deploying saltstack (salt-0.9.8) recently. The installation
>>> > has be trouble free on all my Gentoo, Ubuntu, and most FreeBSD
>>> > servers. I have three FreeBSD servers that have the following python
>>> > trace:
...[snip]...

ports or packages? I've never run into this issue on my FreeBSD
servers, but I strictly build from ports..

Wayne Fiori

unread,
Apr 11, 2012, 7:46:25 PM4/11/12
to salt-...@googlegroups.com


I built salt from the ports.

The problem looks like python. The python on the servers that show
this issue does not include the PyGILState symbol. The PyGILState is
related to threading. Just checked and the python installed on these
bad servers is not configured for threading. The python installed on
the good servers was configured with threading. It looks like M2Crypto
is looking for a threaded environment, not finding it, it simply
crashes.

Server with a successfull salt installation:

ns-a-1# cd /usr/local/lib ; readelf -d -a libpython2.6.so | grep PyGILState
00119658 00005a07 R_386_JUMP_SLOT 000d11a0 _PyGILState_Init
001197bc 0000d807 R_386_JUMP_SLOT 000d1950 PyGILState_Release
00119e8c 00033607 R_386_JUMP_SLOT 000d1ce0 PyGILState_Ensure
0011a37c 0004d607 R_386_JUMP_SLOT 000d10f0 _PyGILState_Fini
90: 000d11a0 68 FUNC GLOBAL DEFAULT 10 _PyGILState_Init
216: 000d1950 166 FUNC GLOBAL DEFAULT 10 PyGILState_Release
822: 000d1ce0 128 FUNC GLOBAL DEFAULT 10 PyGILState_Ensure
1123: 000d1060 60 FUNC GLOBAL DEFAULT 10 PyGILState_GetThisThreadS
1238: 000d10f0 58 FUNC GLOBAL DEFAULT 10 _PyGILState_Fini


Server with a broken salt installation:

ns-test-1# cd /usr/local/lib ; readelf -d -a libpython2.6.so | grep PyGILState


I have no clue how/why I configured three out of 15 servers to no use
threading in python, but there you have it. I'm off to rebuild ports
on these three servers and have a good install of salt at the end.
--
=Wayne

Reply all
Reply to author
Forward
0 new messages