diff --git a/doc/changelog.d/4599.added.md b/doc/changelog.d/4599.added.md new file mode 100644 index 000000000000..a2a60acc41c2 --- /dev/null +++ b/doc/changelog.d/4599.added.md @@ -0,0 +1 @@ +Log from container when health-check fails diff --git a/src/ansys/fluent/core/fluent_connection.py b/src/ansys/fluent/core/fluent_connection.py index 24fbb2b51375..bdbc8d948642 100644 --- a/src/ansys/fluent/core/fluent_connection.py +++ b/src/ansys/fluent/core/fluent_connection.py @@ -451,7 +451,15 @@ def __init__( # throws, we should not proceed. # TODO: Show user-friendly error message. if pyfluent.config.check_health: - self._health_check.check_health() + try: + self._health_check.check_health() + except RuntimeError: + if inside_container: + logger.error("Error reported from Fluent:") + logger.error( + container.logs(stdout=False).decode("utf-8", errors="replace") + ) + raise self._slurm_job_id = slurm_job_id