Chinaunix

标题: Func 调用 hardware 模快出错. [打印本页]

作者: myblessu    时间: 2010-03-23 15:16
标题: Func 调用 hardware 模快出错.
Func 上调用 service 和 command 等模快正常,但调用 hardware 模快出错,不知道是不是python的版本的问题, 如:

这个正常运行:

[root@master ~]# func host148 call service start httpd
{'host148': 0}

这个也正常运行:

[root@master ~]# func host148 call command run "cat /etc/redhat-release"
('host148',
[0, 'Red Hat Enterprise Linux Server release 5.2 (Tikanga)\n', ''])


这个出错了:

[root@master ~]# func host148 call hardware info
{'host148': ['REMOTE_ERROR',
                       'exceptions.ImportError',
                       'No module named smolt',
                       '  File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 160,

in __call__\n    rc = self.__method(*args)\n   File "/usr/lib/python2.4/site-

packages/func/minion/modules/hardware.py", line 73, in info\n    return hw_info(with_devices)\n   

File "/usr/lib/python2.4/site-packages/func/minion/modules/hardware.py", line 110, in hw_info\n   

import smolt\n']}


我机器上的python为

[root@master ~]# python
Python 2.6.5 (r265:79063, Mar 22 2010, 21:50:49)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

有 /usr/local/lib/python2.6/site-packages 目录

[root@master ~]# ls /usr/local/lib/python2.6/site-packages
certmaster                      func-0.25-py2.6.egg-info      README
certmaster-0.25-py2.6.egg-info  OpenSSL                       site-packages
func                            pyOpenSSL-0.9-py2.6.egg-info

有 /usr/lib/python2.4/site-packages 目录

[root@master ~]# ls /usr/lib/python2.4/site-packages
Alacarte    cracklibmodule.so  gmenu.so     invest            rpmUtils         snack.pyo
audit.py    dogtail            iniparse     libsvn            setroubleshoot   sos
audit.pyc   elementtree        instnum.py   libusermodule.so  _snackmodule.so  svn
audit.pyo   func               instnum.pyc  pirut             snack.py         urlgrabber
certmaster  GMenuSimpleEditor  instnum.pyo  rhn               snack.pyc        yum


我用 ln -s /usr/local/lib/python2.6/site-packages /usr/lib/python2.4/site-packages 建了个链接也没起作用
作者: myblessu    时间: 2010-03-26 21:01
还是没有搞定,请知道的指点一下




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2