Merge "Fix exception not raised while install script failed" into stable/wallaby
This commit is contained in:
commit
cf30ad51d0
|
@ -765,7 +765,7 @@ fi
|
|||
if [[ "$INSTALL_MODE" =~ "master" ]]; then
|
||||
result=$(kubectl get nodes -o wide | grep $CURRENT_HOST_IP)
|
||||
if [[ -z "$result" ]];then
|
||||
echo "Install Failed! The node does not in Kubernetes cluster."
|
||||
echo "Install Failed! The node does not exist in Kubernetes cluster."
|
||||
exit 255
|
||||
else
|
||||
echo "Install Success!"
|
||||
|
@ -775,7 +775,7 @@ else
|
|||
"This node has joined the cluster" ]]; then
|
||||
echo "Install Success!"
|
||||
else
|
||||
echo "Install Failed! The node does not in Kubernetes cluster."
|
||||
echo "Install Failed! The node does not exist in Kubernetes cluster."
|
||||
exit 255
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -97,17 +97,11 @@ class KubernetesMgmtDriver(vnflcm_abstract_driver.VnflcmMgmtAbstractDriver):
|
|||
stdout = result.get_stdout()
|
||||
LOG.debug(stdout)
|
||||
LOG.debug(err)
|
||||
elif type == 'certificate_key':
|
||||
if '[upload-certs] Using certificate key:\n' not \
|
||||
in result.get_stdout():
|
||||
elif type == 'certificate_key' or type == 'install':
|
||||
if result.get_return_code() != 0:
|
||||
err = result.get_stderr()
|
||||
LOG.error(err)
|
||||
raise exceptions.MgmtDriverRemoteCommandError(err_info=err)
|
||||
elif type == 'install':
|
||||
err = result.get_stderr()
|
||||
if 'Install Failed!\n' in result.get_stdout():
|
||||
LOG.error(err)
|
||||
raise exceptions.MgmtDriverRemoteCommandError(err_info=err)
|
||||
return result.get_stdout()
|
||||
|
||||
def _create_vim(self, context, vnf_instance, server, bearer_token,
|
||||
|
|
|
@ -9,9 +9,9 @@ Content-Type: application/x-iso9066-image
|
|||
Name: Scripts/install_k8s_cluster.sh
|
||||
Content-Type: application/sh
|
||||
Algorithm: SHA-256
|
||||
Hash: 2489f6162817cce794a6f19a88c3c76ce83fa19cfcb75ad1204d76aaba4a9d1c
|
||||
Hash: bc859fb8ffb9f92a19139553bdd077428a2c9572196e5844f1c912a7a822c249
|
||||
|
||||
Name: Scripts/kubernetes_mgmt.py
|
||||
Content-Type: text/x-python
|
||||
Algorithm: SHA-256
|
||||
Hash: b292bc47d4c28a62b1261e6481498118e5dd93aa988c498568560f67c510003b
|
||||
Hash: b8c558cad30f219634a668f84d6e04998949e941f3909b5c60374b84dff58545
|
||||
|
|
Loading…
Reference in New Issue