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

Aquire lock before calling getTunnelDetails #11788

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

emagiz
Copy link

@emagiz emagiz commented May 7, 2024

Note: Logically it si reasoned to fix the linked issue, but feedback on this PR is much appreciated.

Tries to closes #11787

Changes:

As per note above getTunnelDetails, a lock must be aquired before calling the method. In SetTunnelStatusToRequired this does not happen, and can potentially cause #11787. This PR reorders the the calls to precent the method being called without the lock

@andres-portainer
Copy link
Contributor

This fix was already introduced in the PR #11378, but it has not been merged yet: https://github.com/portainer/portainer/pull/11378/files#diff-fb151cd39e19bd6f87d9c886ac723e3d1921d1ce3d6c8c8346984416fb1488c3R149.

@emagiz
Copy link
Author

emagiz commented May 10, 2024

@andres-portainer Do you think this could potentially be the cause of the linked issue? We're trying to reproduce the issue, but that seems very though. If you say this could be the cause of the issue we can atleast proceed with it.

@andres-portainer
Copy link
Contributor

We will be looking into this issue but I don't currently think that the misplaced lock could be the problem.

@emagiz
Copy link
Author

emagiz commented May 13, 2024

We've done some more testing, and the issue can be a combination of it, and the use of the endpointId parameter in the PUT /stack/{id} call. We've seen that exactly shows what we've seen in portainer during the problems

EDIT: It seems that permissions block from deploying the stack wrongly using endpointId

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.

Stack deployed on wrong endpoint
3 participants