in cookbooks/aws-parallelcluster-computefleet/files/clusterstatusmgtd/clusterstatusmgtd.py [0:0]
def _run_clusterstatusmgtd(config_file):
config = ClusterstatusmgtdConfig(config_file)
cluster_status_manager = ClusterStatusManager(config=config)
while True:
# Get loop start time
start_time = datetime.now(tz=timezone.utc)
# Get program config
try:
config = ClusterstatusmgtdConfig(config_file)
cluster_status_manager.set_config(config)
except Exception as e:
log.warning("Unable to reload daemon config from %s, using previous one.\nException: %s", config_file, e)
# Configure root logger
try:
fileConfig(config.logging_config, disable_existing_loggers=False)
except Exception as e:
log.warning(
"Unable to configure logging from %s, using default logging settings.\nException: %s",
config.logging_config,
e,
)
# Manage cluster
cluster_status_manager.manage_cluster_status()
_sleep_remaining_loop_time(config.loop_time, start_time)