Skip to content

Commit 60a4309

Browse files
committed
Make check_xapi warn-only
1 parent e2aacbf commit 60a4309

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

cloudstackops/xenserver.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ def check_connect(self, host):
8585
# Check if we can use xapi
8686
def check_xapi(self, host):
8787
try:
88-
with settings(host_string=self.ssh_user + "@" + host.ipaddress):
89-
with warn_only():
90-
result = fab.run("xe host-enable host=" + host.name)
88+
with settings(warn_only=True, host_string=self.ssh_user + "@" + host.ipaddress):
89+
result = fab.run("xe host-enable host=" + host.name)
9190
if result.return_code == 0:
9291
return True
9392
else:

xenserver_post_empty_script.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,23 @@ done
5353

5454
echo "Upgrading drivers"
5555
yum -y install bnx2x-* fnic* qla2* glnic* qlge* tg3* openvswitch-modules-xen*
56+
if [ $? -eq 0 ]; then
57+
echo "Yum commnand returned non-zero"
58+
exit 1
59+
fi
5660

5761
SYSTEM_HARDWARE=$(dmidecode -s system-product-name | grep -v "#")
5862
if [[ "${SYSTEM_HARDWARE}" == "ProLiant DL380 G7" ]]; then
5963
echo "Skip HPSA on HP ProLiant DL380 G7 or else the box won't boot"
6064
else
6165
yum -y install hpsa*
66+
if [ $? -eq 0 ]; then
67+
echo "Yum commnand returned non-zero"
68+
exit 1
69+
fi
6270
fi
6371
yum -y upgrade nicira-ovs-hypervisor-node
72+
if [ $? -eq 0 ]; then
73+
echo "Yum commnand returned non-zero"
74+
exit 1
75+
fi

0 commit comments

Comments
 (0)