Closed itsul closed 3 months ago
Good point. Thank you for this PR. Will have a closer look next week.
Hi @itsul,
I merged it into next-release and updated some bits of the code. Would you be able to test the next-release branch again?
Thank you
Hi @bb-Ricardo ,
thanks. I did today some testing. I can't say for certain that the lock file works. Previous I did verify this successful. I have to investigate this deeper. May take a few weeks because I have some open tasks.
Regards Marcel
Hi @bb-Ricardo ,
thank you for your patience, unfortunately I didn't get to it earlier. I deeply tested it today and found the issue. I created a pull request #138 to solve it. With this change all my tests are successful.
Regards Marcel
Overview This update addresses an issue encountered when running the check_redfish.py script in parallel with different modes (e.g., storage, processor, memory). During initialization, multiple instances of the script may attempt to establish connections simultaneously, leading to an excessive number of open sessions. This happens because the session file is only written after a successful connection (which takes a while) and other instances can overwrite it. This result in reaching the session limit of an Integrated Lights-Out (iLO) interface or similar management interfaces.
Problem When the session limit is reached, no more logins into the management interface are possible. Also every subsequent check attempt creates additional session requests, potentially leading to more failures and unexpected behavior.
Solution To mitigate this issue, i added a lock file mechanism. This lock file ensures that multiple instances of the script do not open new sessions concurrently if a session is already in the process of being established. By coordinating access to session creation, this approach prevents exceeding the session limit and maintains system stability. I made this parameter optional so if not needed or wanted no lock file will be used.