Revert "Show hostname instead of IP in errors"

This reverts commit eafeece243607eef8209eaa8c08eecc7d1098eb1.

I was having problems with my newly-created devstack task hanging
inexplicably. It turns out this commit was responsible.
misc.py: helper roles_to_remotes for generic use

roles_to_remotes will take a config key, 'roles' by default,
and search cluster.remotes for those roles, returning a list
of remotes that hold it.  The list is uniquified by default,
but that can be overridden.  So you can have a task that
should run on specific roles, configure it with
"roles: [mon.0 server.0 osd.2]", and call this to get a list
of remotes that contain those roles.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Review: switch to selecting remotes by roles in the 'normal' way

This buys us, also, the ability to select remotes by rule, i.e.
"any osd or mon gets calamari-agent installed"

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Add copy_file() to scp files between remotes

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add skeleton devstack task

Currently only installs devstack on one node, and creates some pools on
the ceph cluster.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Fix linter errors.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add optional 'owner' arg to sudo_write_file()

This gets passed directly to chown as 'sudo chown $owner $file'

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Copy ceph auth keys over to devstack node

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Split out devstack-ceph configuration

This is starting to get long, so create configure_devstack_and_ceph()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add set_libvirt_secret() and split out other steps

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add update_devstack_config_files()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Split out key generation

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Use get_file() and sudo_write_file()

... instead of copy_file()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Don't pass owner to copy_key()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Fix typoed virsh call

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Call seek(0) on StringIO objects before reading

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Work around a bug in ConfigParser

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Use ConfigParser.set() instead of update()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
get_file() returns a str, not a StringIO...

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add Remote.hostname property

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>