You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by xiong <ca...@126.com> on 2013/08/29 05:23:12 UTC
Execut PuppetExecutor.py error
when I run command "python2.6 PuppetExecutor.py", there are some errors as fellow:
Traceback (most recent call last):
File "PuppetExecutor.py", line 263, in <module>
main()
File "PuppetExecutor.py", line 255, in main
"/tmp")
TypeError: __init__() takes exactly 6 arguments (5 given)
The problem may be caused by the initial step.
in main function, the PuppetExecutor is initialized as fellow:
puppetInstance = PuppetExecutor("/home/centos/ambari_repo_info/ambari-agent/src/main/puppet/",
"/usr/",
"/root/workspace/puppet-install/facter-1.6.10/",
"/tmp")
jsonFile = open('test.json', 'r')
jsonStr = jsonFile.read()
parsedJson = json.loads(jsonStr)
result = puppetInstance.runCommand(parsedJson, '/tmp/out.txt', '/tmp/err.txt')
but the __init_ def and runCommand are defined by __init__(self, puppetModule, puppetInstall, facterInstall, tmpDir, config): and def runCommand(self, command, tmpoutfile, tmperrfile).
If I want to run the command "python2.6 PuppetExecutor.py", how can I do ?
whether need I change the paramters and install puppet firstly?
Thank you!