-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolved Issue 1661 - AIX Runtime Panic in Host #1663
Conversation
…nst all test cases
…nst all test cases
The PR seem good to me. However, given the variety of output results, could you separate the parse part into a different function and make it testable? Something like |
I've done that + added tests.. it returns zero on error at the moment as before, let me know if you want any changes |
Hey mate might need to check this, bit of a noob at Go to be honest, the numbers in those tests were incorrect but seemed like they were passing, updated to be correct - also the test suite here in github doesn't seem to check AIX, might need updating |
Found another case of failure - added to code / tests:
This command line tool is pretty inconsistent huh |
Does the
|
It's very rudimentary and does not I'm afraid, not the best platform, I've gone through the options and this is all it gives - I will be able to test this thoroughly though and update with any further issues if any however, I've got a script running every minute at the moment |
Hey mate let me know what you want me to do with this one, worth noting it doesn't just effect the uptime call, it effects the whole host library on AIX as other calls also request uptime 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any more changes? If not, I would like to merge it. Thank you for your contribution!
Nothing more I can see, if I find anything I'll be back 🤣 |
This will need cherry picked to the 3.x maintenance bugfix releases too, if you can please. Thank you @aidangill-projects for the additions on this. I thought I caught all of the variations on the formats when I wrote this, but obviously not. |
Fixes #1661 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing. It seems fine, so I would like to merge it. If any issues arise, please create a new PR.
However, we are not considering backporting this change to v3. This is because we do not have the manpower to maintain multiple versions. Unless there is a security issue, we do not plan to update v3.
Resolved an issue on AIX where a software panic was caused at 0 minutes on the hour when uptime was called.
When uptime is called at 00 minutes it shows as this:
08:47PM up 2 days, 20 hrs, 1 user, load average: 2.47, 2.17, 2.17
At 20:21 it shows as this:
08:47PM up 2 days, 20:21, 1 user, load average: 2.47, 2.17, 2.17
I've added logic to parse this new case, code now passes all given examples (tried to add some tests, not sure how you want to mock the command line use, would be happy to add with an example).