免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1561 | 回复: 1
打印 上一主题 下一主题

Func 调用 hardware 模快出错. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-03-23 15:16 |只看该作者 |倒序浏览
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 建了个链接也没起作用

论坛徽章:
0
2 [报告]
发表于 2010-03-26 21:01 |只看该作者
还是没有搞定,请知道的指点一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP