incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiong <casic_2...@126.com>
Subject Execut PuppetExecutor.py error
Date Thu, 29 Aug 2013 03:23:12 GMT
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!
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message