run and run_on_all_machines error with command timed out
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-jujuclient |
New
|
Undecided
|
Unassigned |
Bug Description
As shown below I am running jujuclient version 0.50.3 against juju-core version 1.25.0. I am unable to use both Environment.run and run_on_
$ dpkg -l python-juju\* juju\*
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
un juju <none> <none> (no description available)
ii juju-core 1.25.0-0ubun amd64 Juju is devops distilled - client
ii juju-deployer 0.6.1-1~ubun all Deploy complex stacks of services
ii juju-quickstar 2.2.4+bzr147 all Easy configuration of Juju enviro
un jujubundlelib <none> <none> (no description available)
ii python-jujubun 0.4.1-1~ubun all A Python2 library for working wit
ii python-jujucli 0.50.3-1~ubu amd64 Python API client for juju-core
python
Python 2.7.9 (default, Apr 2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jujuclient
>>> env = jujuclient.
print env.status(
{u'0': {u'Hardware': u'arch=amd64 cpu-cores=1 mem=2048M tags=Intel_
>>> env.run_
{u'Results': [{u'Code': 0, u'Stdout': u'', u'MachineId': u'0', u'Error': u'command timed out', u'Stderr': u'', u'UnitId': u''}, {u'Code': 0, u'Stdout': u'', u'MachineId': u'2', u'Error': u'command timed out', u'Stderr': u'', u'UnitId': u''}]}
>>> env.run_
{u'Results': [{u'Code': 0, u'Stdout': u'', u'MachineId': u'0', u'Error': u'command timed out', u'Stderr': u'', u'UnitId': u''}, {u'Code': 0, u'Stdout': u'', u'MachineId': u'2', u'Error': u'command timed out', u'Stderr': u'', u'UnitId': u''}]}
>>> env.run(
{u'Results': [{u'Code': 0, u'Stdout': u'', u'MachineId': u'0', u'Error': u'command timed out', u'Stderr': u'', u'UnitId': u''}]}
>>> env.run("/bin/ls", machines=["0"])
{u'Results': [{u'Code': 0, u'Stdout': u'', u'MachineId': u'0', u'Error': u'command timed out', u'Stderr': u'', u'UnitId': u''}]}
try specifying a timeout= IN NANOSECONDS.
for instance:
env.run("/bin/ls", machines=["0"], timeout= 30000000000)