Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theNetworkGetDhcpLeases
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 tomath.MaxInt
. Maybe however this is meant to be just a flag modeled as anint32
. In this PR I set it to1
to see if this helps. At the same time I opened a question to the author of the libvirt library: digitalocean/go-libvirt#197In any case this PR should show what's happening:
NeedResults
setting was wrong in the first place and then we have at least detailed logs