Skip to content
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

fix: add more logging #101

Merged
merged 1 commit into from
Jun 27, 2023
Merged

fix: add more logging #101

merged 1 commit into from
Jun 27, 2023

Conversation

CarstenLeue
Copy link
Contributor

In a customer scenario the operator can hang. Debugging shows that the createInstanceRunningAction method sometimes never returns. This in turn causes a central lock never to be released, so all subsequent operations hang. The operator has to be restarted.
Why does the createInstanceRunningAction method never return?

This PR add entry/exit logs to the involved functions to be able to tell the reason.
I am suspecting that the operation that is trying to query the leases for the VSI (and the associated IP address) never returns. Maybe this is caused by an incorrect use of the NeedResults parameter in the NetworkGetDhcpLeases call. I was not able to find any documentation of this parameter and I suspected it would set the maximum number of expected results, so I set it to math.MaxInt. Maybe however this is meant to be just a flag modeled as an int32. In this PR I set it to 1 to see if this helps. At the same time I opened a question to the author of the libvirt library: digitalocean/go-libvirt#197

In any case this PR should show what's happening:

  • if the code still hangs, we will see what method hangs and then try to figure out why
  • if the code does not hang, the NeedResults setting was wrong in the first place and then we have at least detailed logs

Signed-off-by: Dr. Carsten Leue <[email protected]>
@CarstenLeue CarstenLeue self-assigned this Jun 27, 2023
@HenryWelborn HenryWelborn merged commit 9c2a16b into main Jun 27, 2023
@HenryWelborn HenryWelborn deleted the cleue-more-logging branch June 27, 2023 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants