in cookbooks/aws-parallelcluster-scheduler-plugin/files/default/clusterstatusmgtd/clusterstatusmgtd.py [0:0]
def _call_update_event(self):
compute_fleet_data = ComputeFleetStatus._transform_compute_fleet_data(self._compute_fleet_data)
_write_json_to_file(self._config.computefleet_status_path, compute_fleet_data)
cinc_log_file = "/var/log/chef-client.log"
log.info("Calling update event handler, log can be found at %s", cinc_log_file)
cmd = (
"sudo cinc-client "
"--local-mode "
"--config /etc/chef/client.rb "
"--log_level auto "
f"--logfile {cinc_log_file} "
"--force-formatter "
"--no-color "
"--chef-zero-port 8889 "
"--json-attributes /etc/chef/dna.json "
"--override-runlist aws-parallelcluster::update_computefleet_status"
)
try:
_run_command(cmd, self._config.update_event_timeout_minutes)
except Exception:
log.error("Update event handler failed. Check log file %s", cinc_log_file)
raise