Skip to content

Conversation

@mkundu1
Copy link
Contributor

@mkundu1 mkundu1 commented Nov 11, 2025

Context

When the initial health checks fails while launching Fluent, that usually means Fluent has encountered an error during the startup. The Fluent error is recorded in the Fluent transcript which cannot be accessed easily if we are running on a remote machine (like github runner).

Change Summary

If we are launching a Fluent container, the Fluent transcript is also copied to the container log. In this PR, the container error log is also logged in PyFluent when the initial health checks fails. Following is an example of pyfluent session when a wrong license server is set:

(.venv) mkundu@AAPAomeLhXO1rdt:~/devel/pyfluent$ export ANSYSLMD_LICENSE_FILE=1055@XYZ
(.venv) mkundu@AAPAomeLhXO1rdt:~/devel/pyfluent$ python
Python 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ansys.fluent.core as pyfluent
>>> solver = pyfluent.launch_fluent(start_container=True)
pyfluent.launcher WARNING: Configuring Fluent container to mount to /home/mkundu/devel/pyfluent, with this path available as /home/container/workdir for the Fluent session running inside the container.
pyfluent.general ERROR: Error reported from Fluent:
pyfluent.general ERROR: 
Unexpected license problem; exiting.

==============================================================================
Stack backtrace generated for process id 163 on signal 11 :
1000000: fluent() [0x924a30]
1000000: /lib64/libc.so.6(+0x4e5b0) [0x7f4b464915b0]

<... more Fluent error lines ...>

==============================================================================
Stack backtrace generated for process id 163 on signal 6 :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mkundu/devel/pyfluent/src/ansys/fluent/core/utils/deprecate.py", line 136, in wrapper
    return deprecated_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           
<... more PyFluent error lines ...>

  File "/home/mkundu/devel/pyfluent/src/ansys/fluent/core/services/interceptors.py", line 164, in _intercept_call
    raise new_ex from None
RuntimeError: Deadline Exceeded
>>> 

Rationale

For Fluent containers, we know the container id, so we can get the log. However, there is no good solution for standalone Fluent case as the transcript file name cannot be deterministically inferred from PyFluent.

Impact

This came up while triaging a container launch failure in a remote machine and will help such triaging in future.

Copilot AI review requested due to automatic review settings November 11, 2025 20:23
@mkundu1 mkundu1 linked an issue Nov 11, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances error diagnostics by logging Fluent container logs when initial health checks fail during container-based launches. This helps troubleshoot startup failures on remote machines where Fluent transcripts are not easily accessible.

Key Changes:

  • Added exception handling around health check to capture and log container output when health checks fail
  • Container stderr logs are now displayed in PyFluent output to expose Fluent startup errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 11, 2025 20:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkundu1 mkundu1 changed the title feta: Log from container when health-check fails feat: Log from container when health-check fails Nov 11, 2025
@github-actions github-actions bot added the new feature Request or proposal for a new feature label Nov 11, 2025
Copilot AI review requested due to automatic review settings November 11, 2025 20:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Request or proposal for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print the container log when Fluent launch fails

3 participants