mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
Properly handle ECS creation errors
This commit is contained in:
parent
ef9fd95e61
commit
9132cb963c
1 changed files with 21 additions and 3 deletions
|
@ -109,8 +109,26 @@ if [ $? -eq 0 ]; then
|
|||
|
||||
else
|
||||
|
||||
echo "ECS creation unsuccessful. Aborting..."
|
||||
echo "Hint: Check your EIP or ECS quotas as these limits are a common error."
|
||||
echo "For further output, comment out '2> /dev/null' in the ECS creation command."
|
||||
if grep 'Flavor' otc_tools.log > /dev/null; then
|
||||
echo "### Specified ECS Flavor not found"
|
||||
elif grep 'No image found by name' otc_tools.log > /dev/null; then
|
||||
echo "### Specified Image not found"
|
||||
elif grep 'No subnet found by name' otc_tools.log > /dev/null; then
|
||||
echo "### Specified Subnet not found"
|
||||
elif grep 'No VPC found by name' otc_tools.log > /dev/null; then
|
||||
echo "### Specified VPC not found"
|
||||
elif grep 'No security-group found by name' otc_tools.log > /dev/null; then
|
||||
echo "### Specified Security Group not found"
|
||||
elif grep 'Invalid key_name provided' otc_tools.log > /dev/null; then
|
||||
echo "### Specified Key Pair not found"
|
||||
elif grep 'availability_zone' otc_tools.log > /dev/null; then
|
||||
echo "### Specified Availability Zone not found"
|
||||
elif grep 'quota' otc_tools.log > /dev/null; then
|
||||
echo "### Quota exceeded. Please check your available quotas online"
|
||||
echo "### You can either delete unused resources or apply for a higher quota"
|
||||
fi
|
||||
|
||||
|
||||
echo "### ECS creation unsuccessful. Aborting..."
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue