From 287bad0509bcb85d9241bd825ad6e63d43bc3db4 Mon Sep 17 00:00:00 2001 From: posidron <1614333+posidron@users.noreply.github.com> Date: Mon, 27 Aug 2018 19:35:48 +0200 Subject: [PATCH] [EC2] Failed spot request logs nothing. #33 --- laniakea/__version__.py | 2 +- laniakea/core/providers/ec2/manager.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/laniakea/__version__.py b/laniakea/__version__.py index 5917ca1..6b4885f 100644 --- a/laniakea/__version__.py +++ b/laniakea/__version__.py @@ -1,5 +1,5 @@ __title__ = 'laniakea' -__version__ = '1.15.0' +__version__ = '1.16.0' __license__ = 'MPL 2.0' __description__ = 'A utility which manages cloud instances and aids in setting up a fuzzing cluster.' __keywords__ = 'cluster packet ec2 azure fuzzing' diff --git a/laniakea/core/providers/ec2/manager.py b/laniakea/core/providers/ec2/manager.py index 749a80b..02643a4 100644 --- a/laniakea/core/providers/ec2/manager.py +++ b/laniakea/core/providers/ec2/manager.py @@ -278,6 +278,9 @@ def create_spot(self, fulfilled = [] for idx, instance in enumerate(new_instances): + if instance.status.code == "bad-parameters": + logging.error('Spot request for "%s" failed due to bad parameters.', instance.id) + self.cancel_spot_requests([instance.id]) if instance is not None: fulfilled.append(idx) if isinstance(instance, boto.ec2.instance.Instance):