Skip to content

Commit

Permalink
Change log level to warning when temporarily partial EC2 info
Browse files Browse the repository at this point in the history
Change log level to warning when temporarily unable to retrieve EC2 instance info from DescribeInstances call.

The from_describe_instance_data log a warning and throw an exception.
The from_describe_instance_data is called by
1. fleet_manager.launch_ec2_instances, but here the instance info are already populated in the _launch_instances, which calls the _get_instances_info that does have the retries, by calling _retrieve_instances_info_from_ec2
2. fleet_manager._retrieve_instances_info_from_ec2 that catch the exception

If at the end of the retires there are still instances info with partial data, in the _launch_instances these instances are finally logged as error

Signed-off-by: Luca Carrogu <[email protected]>
  • Loading branch information
lukeseawalker committed Jan 2, 2024
1 parent 4b72bb7 commit d8e8b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/slurm_plugin/fleet_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def from_describe_instance_data(instance_info):
instance_info["LaunchTime"],
)
except KeyError as e:
logger.error("Unable to retrieve EC2 instance info: %s", e)
logger.warning("Unable to retrieve EC2 instance info: %s", e)
raise e


Expand Down

0 comments on commit d8e8b25

Please sign in to comment.