Commit Graph

22 Commits

Author SHA1 Message Date
Zack Cerza
c886a93688 Make teuthology.config *far* more robust
In addition to parsing its configuration from a yaml file, it can now be
created from a dict. It can also be dumped as a dict, or as a yaml
stream. It is also now split into multiple classes so that the same
implementation can be used for job configs, and not just as a proxy for
~/.teuthology.yaml.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-07-10 16:35:36 -06:00
Zack Cerza
b386f5e5df Refactor teuthology.orchestra.run
RemoteProcess behaves more like subprocess.Popen, with some important
differences.

A summary of the API changes:
* RemoteProcess.exitstatus is either an int or None; it is never a callable
  nor a gevent.AsyncResult.
* New method: RemoteProcess.execute()
* New method: RemoteProcess.poll()
* New method: RemoteProcess.wait()
* New attribute: RemoteProcess.returncode - alias to exitstatus
* New property: RemoteProcess.finished - added because returncode can be None
  if the connection was interrupted
* run.execute() is removed.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-05-30 16:05:23 -05:00
Zack Cerza
d945e56405 Add retries to orchestra.connection.connect()
This is an attempt to fix: http://tracker.ceph.com/issues/8314

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-05-12 16:09:30 -05:00
Zack Cerza
22b51be46c Use 'stderr' and 'stdout' as logger names
We were using just 'err' and 'out', which isn't very intuitive.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-05-10 09:10:23 -05:00
Zack Cerza
60bba80e41 Express hostnames as child logger names
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-05-10 09:10:22 -05:00
Zack Cerza
3352b58d30 Use Remote.shortname in logs
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-05-10 09:10:22 -05:00
Zack Cerza
30d1d518d5 Make Remote.shortname actually short
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-05-10 09:10:22 -05:00
Zack Cerza
3adb7d4629 Use Remote.hostname in logs
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-05-10 09:10:22 -05:00
Zack Cerza
085c508fd4 Revert "Revert "Show hostname instead of IP in errors""
This reverts commit 10fee0e368.

Conflicts:
	teuthology/orchestra/run.py
2014-05-10 09:10:21 -05:00
Zack Cerza
5de353e73f Update unit test for Cluster.__repr__()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-04-25 15:01:41 -05:00
Zack Cerza
10fee0e368 Revert "Show hostname instead of IP in errors"
This reverts commit eafeece243.

I was having problems with my newly-created devstack task hanging
inexplicably. It turns out this commit was responsible.
2014-02-19 13:20:52 -06:00
Alfredo Deza
4c930a0ac7 Revert "Capture stderr and include in CommandFailedError"
This reverts commit d0a4349231.
2014-02-18 09:47:09 -05:00
John Spray
d0a4349231 Capture stderr and include in CommandFailedError
Signed-off-by: John Spray <john.spray@inktank.com>
2014-02-12 17:29:09 +00:00
John Spray
eafeece243 Show hostname instead of IP in errors
Signed-off-by: John Spray <john.spray@inktank.com>
2014-02-12 16:42:52 +00:00
Zack Cerza
4135960eb6 Fix test
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-01 09:07:50 -05:00
Zack Cerza
69ea83904f Add test for skipping host key verification
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-01 09:07:48 -05:00
Zack Cerza
589560e6c9 Port from nosetests to py.test
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2013-10-01 09:07:45 -05:00
Zack Cerza
eeb78b6b04 Update test_connect() to reflect API changes
Looks like paramiko changed a bit internally. All unit tests pass now!
2013-09-20 08:39:36 -05:00
Zack Cerza
b993ecac9b Update many unit tests to reflect 2yrs of changes
These tests hadn't been updated in over two years. Only one is left
failing.
2013-09-19 19:29:06 -05:00
Tommi Virtanen
0dd4d69ffe Fix unit tests for SSH keep-alive setting.
Commit 6e3e0d7cdc failed to pass
unit tests.
2011-12-05 10:02:30 -08:00
Josh Durgin
006a0dd423 Remove unused imports and variable. 2011-11-08 16:09:21 -08:00
Tommi Virtanen
a2372fce12 Move orchestra to teuthology.orchestra so there's just one top-level package. 2011-09-13 14:53:02 -07:00