ceph/ceph-deploy — pull request #24 by alfredodeza (2013-07-29 21:05:17+00:00)
Title: Better logging and specificity for `ceph-deploy install`

This is a tremendous amount of commits but they introduce a big change in how ceph-deploy reports back to the user.

Logging will affect everything in the command line, setting the verbosity to debug.

Aside from logging, the one aspect of `ceph-deploy` that changes is `install` where all calls are now logged with stdout/stderr being captured on the remote end.

A few helpers are added to aid in the mangling of exception that we have to do in order to avoid being eaten by `pushy`.

This is an example output of installation failing on CentOS because it lacked the EPEM repository (this is on purpose and not caused by this changes):

# ceph-deploy -n -v install node2
[ceph_deploy.install][DEBUG ] Installing stable version cuttlefish on cluster ceph hosts node2
[ceph_deploy.install][DEBUG ] Detecting platform for host node2 ...
[ceph_deploy.install][INFO ] Distro info: CentOS 6.4 Final
[node2][INFO ] installing ceph on node2
[node2][INFO ] Running command: su -c 'rpm --import "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc"'
[node2][INFO ] Running command: rpm -Uvh --replacepkgs --force --quiet http://ceph.com/rpm-cuttlefish/el6/noarch/ceph-release-1-0.el6.noarch.rpm
[node2][INFO ] ##################################################
[node2][INFO ] ##################################################
[node2][INFO ] Running command: yum -y -q install ceph
[node2][ERROR ] Traceback (most recent call last):
[node2][ERROR ] File "/Users/alfredo/python/ceph-deploy/ceph_deploy/hosts/centos/install.py", line 53, in install
[node2][ERROR ] File "/Users/alfredo/python/ceph-deploy/ceph_deploy/util/decorators.py", line 10, in inner
[node2][ERROR ] File "/Users/alfredo/python/ceph-deploy/ceph_deploy/util/wrappers.py", line 6, in remote_call
[node2][ERROR ] File "/usr/lib64/python2.6/subprocess.py", line 505, in check_call
[node2][ERROR ] raise CalledProcessError(retcode, cmd)
[node2][ERROR ] CalledProcessError: Command '['yum', '-y', '-q', 'install', 'ceph']' returned non-zero exit status 1
[node2][INFO ] You could try using --skip-broken to work around the problem
[node2][INFO ] You could try running: rpm -Va --nofiles --nodigest
[node2][ERROR ] Error: Package: ceph-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libtcmalloc.so.4()(64bit)
[node2][ERROR ] Error: Package: ceph-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: python-lockfile
[node2][ERROR ] Error: Package: ceph-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: python-argparse
[node2][ERROR ] Error: Package: ceph-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libleveldb.so.1()(64bit)
[node2][ERROR ] Error: Package: libcephfs1-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libsnappy.so.1()(64bit)
[node2][ERROR ] Error: Package: librados2-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libleveldb.so.1()(64bit)
[node2][ERROR ] Error: Package: ceph-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: gdisk
[node2][ERROR ] Error: Package: libcephfs1-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libleveldb.so.1()(64bit)
[node2][ERROR ] Error: Package: librados2-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libsnappy.so.1()(64bit)
[node2][ERROR ] Error: Package: librbd1-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libleveldb.so.1()(64bit)
[node2][ERROR ] Error: Package: librbd1-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libsnappy.so.1()(64bit)
[node2][ERROR ] Error: Package: ceph-0.61.7-0.el6.x86_64 (ceph)
[node2][ERROR ] Requires: libsnappy.so.1()(64bit)