Commit 39387c2a authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

deploy: Pep8 fixes

parent 48a60965
# Too many lines in module pylint: disable-msg=C0302
# Too many arguments (7/5) pylint: disable-msg=R0913
"""
Fabric file for snf-deploy
"""
from __future__ import with_statement from __future__ import with_statement
from fabric.api import * from fabric.api import hide, env, settings, local, roles
from fabric.contrib.console import confirm from fabric.operations import run, put, get
from random import choice
from fabric.operations import run, put
import re import re
import shutil, os import os
from functools import wraps import shutil
import imp
import ConfigParser
import sys
import tempfile import tempfile
import ast import ast
from snfdeploy.lib import * from snfdeploy.lib import debug, Conf, Env, disable_color
from snfdeploy import massedit from snfdeploy import massedit
def setup_env(confdir="conf", packages="packages", def setup_env(confdir="conf", packages="packages", templates="files",
templates="files", cluster_name="ganeti1", autoconf=False, disable_colors=False, key_inject=False): cluster_name="ganeti1", autoconf=False, disable_colors=False,
key_inject=False):
"""Setup environment"""
print("Loading configuration for synnefo...") print("Loading configuration for synnefo...")
print(" * Using config files under %s..." % confdir) print(" * Using config files under %s..." % confdir)
print(" * Using %s and %s for packages and templates accordingly..." % (packages, templates)) print(" * Using %s and %s for packages and templates accordingly..."
% (packages, templates))
autoconf = ast.literal_eval(autoconf) autoconf = ast.literal_eval(autoconf)
disable_colors = ast.literal_eval(disable_colors) disable_colors = ast.literal_eval(disable_colors)
env.key_inject = ast.literal_eval(key_inject) env.key_inject = ast.literal_eval(key_inject)
conf = Conf.configure(confdir=confdir, cluster_name=cluster_name, autoconf=autoconf) conf = Conf.configure(confdir=confdir, cluster_name=cluster_name,
autoconf=autoconf)
env.env = Env(conf) env.env = Env(conf)
env.local = autoconf env.local = autoconf
...@@ -35,17 +41,19 @@ def setup_env(confdir="conf", packages="packages", ...@@ -35,17 +41,19 @@ def setup_env(confdir="conf", packages="packages",
if disable_colors: if disable_colors:
disable_color() disable_color()
if env.env.cms.hostname in [env.env.accounts.hostname, env.env.cyclades.hostname, env.env.pithos.hostname]: if env.env.cms.hostname in \
[env.env.accounts.hostname, env.env.cyclades.hostname,
env.env.pithos.hostname]:
env.cms_pass = True env.cms_pass = True
else: else:
env.cms_pass = False env.cms_pass = False
if env.env.accounts.hostname in [env.env.cyclades.hostname, env.env.pithos.hostname]: if env.env.accounts.hostname in \
[env.env.cyclades.hostname, env.env.pithos.hostname]:
env.csrf_disable = True env.csrf_disable = True
else: else:
env.csrf_disable = False env.csrf_disable = False
env.roledefs = { env.roledefs = {
"nodes": env.env.ips, "nodes": env.env.ips,
"ips": env.env.ips, "ips": env.env.ips,
...@@ -55,6 +63,8 @@ def setup_env(confdir="conf", packages="packages", ...@@ -55,6 +63,8 @@ def setup_env(confdir="conf", packages="packages",
"cms": [env.env.cms.ip], "cms": [env.env.cms.ip],
"mq": [env.env.mq.ip], "mq": [env.env.mq.ip],
"db": [env.env.db.ip], "db": [env.env.db.ip],
"mq": [env.env.mq.ip],
"db": [env.env.db.ip],
"ns": [env.env.ns.ip], "ns": [env.env.ns.ip],
"client": [env.env.client.ip], "client": [env.env.client.ip],
"router": [env.env.router.ip], "router": [env.env.router.ip],
...@@ -74,37 +84,46 @@ def setup_env(confdir="conf", packages="packages", ...@@ -74,37 +84,46 @@ def setup_env(confdir="conf", packages="packages",
def install_package(package): def install_package(package):
debug(env.host, " * Installing package %s..." % package) debug(env.host, " * Installing package %s..." % package)
APT_GET = "export DEBIAN_FRONTEND=noninteractive ;apt-get install -y --force-yes " apt_get = "export DEBIAN_FRONTEND=noninteractive ;" + \
"apt-get install -y --force-yes "
host_info = env.env.ips_info[env.host] host_info = env.env.ips_info[env.host]
env.env.update_packages(host_info.os) env.env.update_packages(host_info.os)
if ast.literal_eval(env.env.use_local_packages): if ast.literal_eval(env.env.use_local_packages):
with settings(warn_only=True): with settings(warn_only=True):
deb = local("ls %s/%s*%s_all.deb" % (env.env.packages, package, host_info.os), deb = local("ls %s/%s*%s_all.deb"
% (env.env.packages, package, host_info.os),
capture=True) capture=True)
if deb: if deb:
debug(env.host, " * Package %s found in %s..." % (package, env.env.packages)) debug(env.host,
" * Package %s found in %s..."
% (package, env.env.packages))
put(deb, "/tmp/") put(deb, "/tmp/")
try_run("dpkg -i /tmp/%s || " % os.path.basename(deb) + APT_GET + "-f") try_run("dpkg -i /tmp/%s || "
% os.path.basename(deb) + apt_get + "-f")
try_run("rm /tmp/%s" % os.path.basename(deb)) try_run("rm /tmp/%s" % os.path.basename(deb))
return return
info = getattr(env.env, package) info = getattr(env.env, package)
if info in ["squeeze-backports", "squeeze", "stable", "testing", "unstable", "wheezy"]: if info in \
APT_GET += " -t %s %s " % (info, package) ["squeeze-backports", "squeeze", "stable",
"testing", "unstable", "wheezy"]:
apt_get += " -t %s %s " % (info, package)
elif info: elif info:
APT_GET += " %s=%s " % (package, info) apt_get += " %s=%s " % (package, info)
else: else:
APT_GET += package apt_get += package
try_run(APT_GET) try_run(apt_get)
return return
@roles("ns") @roles("ns")
def update_ns_for_ganeti(): def update_ns_for_ganeti():
debug(env.host, "Updating name server entries for backend %s..." % env.env.cluster.fqdn) debug(env.host,
"Updating name server entries for backend %s..."
% env.env.cluster.fqdn)
update_arecord(env.env.cluster) update_arecord(env.env.cluster)
update_ptrrecord(env.env.cluster) update_ptrrecord(env.env.cluster)
try_run("/etc/init.d/bind9 restart") try_run("/etc/init.d/bind9 restart")
...@@ -144,11 +163,13 @@ def update_ptrrecord(host): ...@@ -144,11 +163,13 @@ def update_ptrrecord(host):
""".format(host.ptrrecord, filename) """.format(host.ptrrecord, filename)
try_run(cmd) try_run(cmd)
@roles("nodes") @roles("nodes")
def apt_get_update(): def apt_get_update():
debug(env.host, "apt-get update....") debug(env.host, "apt-get update....")
try_run("apt-get update") try_run("apt-get update")
@roles("ns") @roles("ns")
def setup_ns(): def setup_ns():
debug(env.host, "Setting up name server..") debug(env.host, "Setting up name server..")
...@@ -206,6 +227,7 @@ def check_dhcp(): ...@@ -206,6 +227,7 @@ def check_dhcp():
for n, info in env.env.nodes_info.iteritems(): for n, info in env.env.nodes_info.iteritems():
try_run("ping -c 1 " + info.ip, True) try_run("ping -c 1 " + info.ip, True)
@roles("nodes") @roles("nodes")
def check_dns(): def check_dns():
debug(env.host, "Checking fqdns for synnefo..") debug(env.host, "Checking fqdns for synnefo..")
...@@ -215,6 +237,7 @@ def check_dns(): ...@@ -215,6 +237,7 @@ def check_dns():
for n, info in env.env.roles.iteritems(): for n, info in env.env.roles.iteritems():
try_run("ping -c 1 " + info.fqdn, True) try_run("ping -c 1 " + info.fqdn, True)
@roles("nodes") @roles("nodes")
def check_connectivity(): def check_connectivity():
debug(env.host, "Checking internet connectivity..") debug(env.host, "Checking internet connectivity..")
...@@ -258,6 +281,7 @@ fi ...@@ -258,6 +281,7 @@ fi
debug(env.host, "Updating exising authorized keys..") debug(env.host, "Updating exising authorized keys..")
try_run(cmd) try_run(cmd)
@roles("ips") @roles("ips")
def setup_resolv_conf(): def setup_resolv_conf():
debug(env.host, "Tweak /etc/resolv.conf...") debug(env.host, "Tweak /etc/resolv.conf...")
...@@ -304,6 +328,7 @@ def try_run(cmd, abort=False): ...@@ -304,6 +328,7 @@ def try_run(cmd, abort=False):
if abort: if abort:
raise raise
def create_bridges(): def create_bridges():
debug(env.host, " * Creating bridges...") debug(env.host, " * Creating bridges...")
install_package("bridge-utils") install_package("bridge-utils")
...@@ -315,9 +340,9 @@ def create_bridges(): ...@@ -315,9 +340,9 @@ def create_bridges():
def connect_bridges(): def connect_bridges():
debug(env.host, " * Connecting bridges...") debug(env.host, " * Connecting bridges...")
cmd = """ #cmd = """
brctl addif {0} {1} #brctl addif {0} {1}
""".format(env.env.common_bridge, env.env.public_iface) #""".format(env.env.common_bridge, env.env.public_iface)
#try_run(cmd) #try_run(cmd)
...@@ -444,6 +469,7 @@ def allow_access_in_db(ip, user="all", method="md5"): ...@@ -444,6 +469,7 @@ def allow_access_in_db(ip, user="all", method="md5"):
try_run(cmd) try_run(cmd)
try_run("/etc/init.d/postgresql restart") try_run("/etc/init.d/postgresql restart")
@roles("db") @roles("db")
def setup_db(): def setup_db():
debug(env.host, "Setting up DataBase server...") debug(env.host, "Setting up DataBase server...")
...@@ -522,9 +548,11 @@ def setup_common(): ...@@ -522,9 +548,11 @@ def setup_common():
} }
custom = customize_settings_from_tmpl(tmpl, replace) custom = customize_settings_from_tmpl(tmpl, replace)
put(custom, tmpl, mode=0644) put(custom, tmpl, mode=0644)
try_run("mkdir -p {0}; chown root:www-data {0}; chmod 775 {0}".format(env.env.mail_dir)) try_run("mkdir -p {0}; chown root:www-data {0}; chmod 775 {0}".format(
env.env.mail_dir))
try_run("/etc/init.d/gunicorn restart") try_run("/etc/init.d/gunicorn restart")
@roles("accounts") @roles("accounts")
def astakos_loaddata(): def astakos_loaddata():
debug(env.host, " * Loading initial data to astakos...") debug(env.host, " * Loading initial data to astakos...")
...@@ -555,10 +583,10 @@ def astakos_register_components(): ...@@ -555,10 +583,10 @@ def astakos_register_components():
@roles("accounts") @roles("accounts")
def add_user(): def add_user():
debug(env.host, " * adding user %s to astakos..." % env.env.user_email) debug(env.host, " * adding user %s to astakos..." % env.env.user_email)
email=env.env.user_email email = env.env.user_email
name=env.env.user_name name = env.env.user_name
lastname=env.env.user_lastname lastname = env.env.user_lastname
passwd=env.env.user_passwd passwd = env.env.user_passwd
cmd = """ cmd = """
snf-manage user-add {0} {1} {2} snf-manage user-add {0} {1} {2}
""".format(email, name, lastname) """.format(email, name, lastname)
...@@ -585,6 +613,7 @@ def activate_user(user_email=None): ...@@ -585,6 +613,7 @@ def activate_user(user_email=None):
""".format(uid) """.format(uid)
try_run(cmd) try_run(cmd)
@roles("accounts") @roles("accounts")
def setup_astakos(): def setup_astakos():
debug(env.host, "Setting up snf-astakos-app...") debug(env.host, "Setting up snf-astakos-app...")
...@@ -627,7 +656,8 @@ EOF ...@@ -627,7 +656,8 @@ EOF
@roles("accounts") @roles("accounts")
def get_service_details(service="pithos"): def get_service_details(service="pithos"):
debug(env.host, " * Getting registered details for %s service..." % service) debug(env.host,
" * Getting registered details for %s service..." % service)
result = try_run("snf-manage component-list") result = try_run("snf-manage component-list")
r = re.compile(r".*%s.*" % service, re.M) r = re.compile(r".*%s.*" % service, re.M)
service_id, _, _, service_token = r.search(result).group().split() service_id, _, _, service_token = r.search(result).group().split()
...@@ -638,12 +668,16 @@ def get_service_details(service="pithos"): ...@@ -638,12 +668,16 @@ def get_service_details(service="pithos"):
@roles("db") @roles("db")
def get_auth_token_from_db(user_email=None): def get_auth_token_from_db(user_email=None):
if not user_email: if not user_email:
user_email=env.env.user_email user_email = env.env.user_email
debug(env.host, " * Getting authentication token and uuid for user %s..." % user_email) debug(env.host,
" * Getting authentication token and uuid for user %s..."
% user_email)
cmd = """ cmd = """
echo "select id, auth_token, uuid, email from auth_user, im_astakosuser where auth_user.id = im_astakosuser.user_ptr_id and auth_user.email = '{0}';" > /tmp/psqlcmd echo "select id, auth_token, uuid, email from auth_user, im_astakosuser \
su - postgres -c "psql -w -d snf_apps -f /tmp/psqlcmd" where auth_user.id = im_astakosuser.user_ptr_id and auth_user.email = '{0}';" \
""".format(user_email) > /tmp/psqlcmd
su - postgres -c "psql -w -d snf_apps -f /tmp/psqlcmd"
""".format(user_email)
result = try_run(cmd) result = try_run(cmd)
r = re.compile(r"(\d+)[ |]*(\S+)[ |]*(\S+)[ |]*" + user_email, re.M) r = re.compile(r"(\d+)[ |]*(\S+)[ |]*(\S+)[ |]*" + user_email, re.M)
...@@ -699,7 +733,6 @@ def setup_cms(): ...@@ -699,7 +733,6 @@ def setup_cms():
put(custom, tmpl, mode=0644) put(custom, tmpl, mode=0644)
try_run("/etc/init.d/gunicorn restart") try_run("/etc/init.d/gunicorn restart")
cmd = """ cmd = """
snf-manage syncdb snf-manage syncdb
snf-manage migrate --delete-ghost-migrations snf-manage migrate --delete-ghost-migrations
...@@ -736,11 +769,13 @@ def setup_nfs_clients(): ...@@ -736,11 +769,13 @@ def setup_nfs_clients():
for d in [env.env.pithos_dir, env.env.image_dir]: for d in [env.env.pithos_dir, env.env.image_dir]:
try_run("mkdir -p " + d) try_run("mkdir -p " + d)
cmd = """ cmd = """
echo "{0}:{1} {1} nfs defaults,rw,noatime,rsize=131072,wsize=131072,timeo=14,intr,noacl" >> /etc/fstab echo "{0}:{1} {1} nfs defaults,rw,noatime,rsize=131072,\
""".format(env.env.pithos.ip, d) wsize=131072,timeo=14,intr,noacl" >> /etc/fstab
""".format(env.env.pithos.ip, d)
try_run(cmd) try_run(cmd)
try_run("mount " + d) try_run("mount " + d)
@roles("pithos") @roles("pithos")
def update_nfs_exports(ip): def update_nfs_exports(ip):
tmpl = "/tmp/exports" tmpl = "/tmp/exports"
...@@ -754,6 +789,7 @@ def update_nfs_exports(ip): ...@@ -754,6 +789,7 @@ def update_nfs_exports(ip):
try_run("cat %s >> /etc/exports" % tmpl) try_run("cat %s >> /etc/exports" % tmpl)
try_run("/etc/init.d/nfs-kernel-server restart") try_run("/etc/init.d/nfs-kernel-server restart")
@roles("pithos") @roles("pithos")
def setup_nfs_server(): def setup_nfs_server():
debug(env.host, " * Setting up NFS server for pithos...") debug(env.host, " * Setting up NFS server for pithos...")
...@@ -847,10 +883,11 @@ def add_rapi_user(): ...@@ -847,10 +883,11 @@ def add_rapi_user():
result = result.split("(stdin)= ")[1] result = result.split("(stdin)= ")[1]
cmd = """ cmd = """
echo "{0} {1}{2} write" >> /var/lib/ganeti/rapi/users echo "{0} {1}{2} write" >> /var/lib/ganeti/rapi/users
""".format(env.env.synnefo_user, '{ha1}',result) """.format(env.env.synnefo_user, '{ha1}', result)
try_run(cmd) try_run(cmd)
try_run("/etc/init.d/ganeti restart") try_run("/etc/init.d/ganeti restart")
@roles("master") @roles("master")
def add_nodes(): def add_nodes():
nodes = env.env.cluster_nodes.split(",") nodes = env.env.cluster_nodes.split(",")
...@@ -859,30 +896,37 @@ def add_nodes(): ...@@ -859,30 +896,37 @@ def add_nodes():
for n in nodes: for n in nodes:
add_node(n) add_node(n)
@roles("master") @roles("master")
def add_node(node): def add_node(node):
node_info = env.env.nodes_info[node] node_info = env.env.nodes_info[node]
debug(env.host, " * Adding node %s to Ganeti backend..." % node_info.fqdn) debug(env.host, " * Adding node %s to Ganeti backend..." % node_info.fqdn)
cmd = "gnt-node add --no-ssh-key-check --master-capable=yes --vm-capable=yes " + node_info.fqdn cmd = "gnt-node add --no-ssh-key-check --master-capable=yes " + \
"--vm-capable=yes " + node_info.fqdn
try_run(cmd) try_run(cmd)
@roles("ganeti") @roles("ganeti")
def enable_drbd(): def enable_drbd():
if env.enable_drbd: if env.enable_drbd:
debug(env.host, " * Enabling DRBD...") debug(env.host, " * Enabling DRBD...")
try_run("modprobe drbd minor_count=255 usermode_helper=/bin/true") try_run("modprobe drbd minor_count=255 usermode_helper=/bin/true")
try_run("echo drbd minor_count=255 usermode_helper=/bin/true >> /etc/modules") try_run("echo drbd minor_count=255 usermode_helper=/bin/true " +
">> /etc/modules")
@roles("master") @roles("master")
def setup_drbd_dparams(): def setup_drbd_dparams():
if env.enable_drbd: if env.enable_drbd:
debug(env.host, " * Twicking drbd related disk parameters in Ganeti...") debug(env.host,
" * Twicking drbd related disk parameters in Ganeti...")
cmd = """ cmd = """
gnt-cluster modify --disk-parameters=drbd:metavg={0} gnt-cluster modify --disk-parameters=drbd:metavg={0}
gnt-group modify --disk-parameters=drbd:metavg={0} default gnt-group modify --disk-parameters=drbd:metavg={0} default
""".format(env.env.vg) """.format(env.env.vg)
try_run(cmd) try_run(cmd)
@roles("master") @roles("master")
def enable_lvm(): def enable_lvm():
if env.enable_lvm: if env.enable_lvm:
...@@ -895,6 +939,7 @@ def enable_lvm(): ...@@ -895,6 +939,7 @@ def enable_lvm():
debug(env.host, " * Disabling LVM...") debug(env.host, " * Disabling LVM...")
try_run("gnt-cluster modify --no-lvm-storage") try_run("gnt-cluster modify --no-lvm-storage")
@roles("master") @roles("master")
def destroy_cluster(): def destroy_cluster():
debug(env.host, " * Destroying Ganeti cluster...") debug(env.host, " * Destroying Ganeti cluster...")
...@@ -902,7 +947,7 @@ def destroy_cluster(): ...@@ -902,7 +947,7 @@ def destroy_cluster():
allnodes = env.env.cluster_hostnames[:] allnodes = env.env.cluster_hostnames[:]
allnodes.remove(env.host) allnodes.remove(env.host)
for n in allnodes: for n in allnodes:
host_info = env.env.ips_info[host] host_info = env.env.ips_info[env.host]
debug(env.host, " * Removing node %s..." % n) debug(env.host, " * Removing node %s..." % n)
cmd = "gnt-node remove " + host_info.fqdn cmd = "gnt-node remove " + host_info.fqdn
try_run(cmd) try_run(cmd)
...@@ -929,7 +974,6 @@ def init_cluster(): ...@@ -929,7 +974,6 @@ def init_cluster():
--hypervisor-parameters kvm:kernel_path=,vnc_bind_address=0.0.0.0 \ --hypervisor-parameters kvm:kernel_path=,vnc_bind_address=0.0.0.0 \
--no-ssh-init --no-etc-hosts \ --no-ssh-init --no-etc-hosts \
{3} {3}
""".format(extra, env.env.common_bridge, """.format(extra, env.env.common_bridge,
env.env.cluster_netdev, env.env.cluster.fqdn) env.env.cluster_netdev, env.env.cluster.fqdn)
try_run(cmd) try_run(cmd)
...@@ -993,18 +1037,25 @@ def setup_gtools(): ...@@ -993,18 +1037,25 @@ def setup_gtools():
def setup_iptables(): def setup_iptables():
debug(env.host, " * Setting up iptables to mangle DHCP requests...") debug(env.host, " * Setting up iptables to mangle DHCP requests...")
cmd = """ cmd = """
iptables -t mangle -A PREROUTING -i br+ -p udp -m udp --dport 67 -j NFQUEUE --queue-num 42 iptables -t mangle -A PREROUTING -i br+ -p udp -m udp --dport 67 \
iptables -t mangle -A PREROUTING -i tap+ -p udp -m udp --dport 67 -j NFQUEUE --queue-num 42 -j NFQUEUE --queue-num 42
iptables -t mangle -A PREROUTING -i prv+ -p udp -m udp --dport 67 -j NFQUEUE --queue-num 42 iptables -t mangle -A PREROUTING -i tap+ -p udp -m udp --dport 67 \
-j NFQUEUE --queue-num 42
ip6tables -t mangle -A PREROUTING -i br+ -p ipv6-icmp -m icmp6 --icmpv6-type 133 -j NFQUEUE --queue-num 43 iptables -t mangle -A PREROUTING -i prv+ -p udp -m udp --dport 67 \
ip6tables -t mangle -A PREROUTING -i br+ -p ipv6-icmp -m icmp6 --icmpv6-type 135 -j NFQUEUE --queue-num 44 -j NFQUEUE --queue-num 42
ip6tables -t mangle -A PREROUTING -i br+ -p ipv6-icmp -m icmp6 \
--icmpv6-type 133 -j NFQUEUE --queue-num 43
ip6tables -t mangle -A PREROUTING -i br+ -p ipv6-icmp -m icmp6 \
--icmpv6-type 135 -j NFQUEUE --queue-num 44
""" """
try_run(cmd) try_run(cmd)
@roles("ganeti") @roles("ganeti")
def setup_network(): def setup_network():
debug(env.host, "Setting up networking for Ganeti instances (nfdhcpd, etc.)...") debug(env.host,
"Setting up networking for Ganeti instances (nfdhcpd, etc.)...")
install_package("nfqueue-bindings-python") install_package("nfqueue-bindings-python")
install_package("nfdhcpd") install_package("nfdhcpd")
tmpl = "/etc/nfdhcpd/nfdhcpd.conf" tmpl = "/etc/nfdhcpd/nfdhcpd.conf"
...@@ -1017,7 +1068,7 @@ def setup_network(): ...@@ -1017,7 +1068,7 @@ def setup_network():
install_package("snf-network") install_package("snf-network")
cmd = """ cmd = """
sed -i 's/MAC_MASK.*/MAC_MASK = ff:ff:f0:00:00:00/' /etc/default/snf-network sed -i 's/MAC_MASK.*/MAC_MASK = ff:ff:f0:00:00:00/' /etc/default/snf-network
""" """
try_run(cmd) try_run(cmd)
...@@ -1098,13 +1149,15 @@ def setup_cyclades(): ...@@ -1098,13 +1149,15 @@ def setup_cyclades():
@roles("cyclades") @roles("cyclades")
def get_backend_id(cluster_name="ganeti1.synnefo.deploy.local"): def get_backend_id(cluster_name="ganeti1.synnefo.deploy.local"):
backend_id = try_run("snf-manage backend-list 2>/dev/null | grep %s | awk '{print $1}'" % cluster_name) backend_id = try_run("snf-manage backend-list 2>/dev/null " +
"| grep %s | awk '{print $1}'" % cluster_name)
return backend_id return backend_id
@roles("cyclades") @roles("cyclades")
def add_backend(): def add_backend():
debug(env.host, "adding %s ganeti backend to cyclades..." % env.env.cluster.fqdn) debug(env.host,
"adding %s ganeti backend to cyclades..." % env.env.cluster.fqdn)
with settings(hide("everything")): with settings(hide("everything")):
try_run("ping -c1 " + env.env.cluster.fqdn) try_run("ping -c1 " + env.env.cluster.fqdn)