-
Notifications
You must be signed in to change notification settings - Fork 616
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
Check that Placement is not null before trying to access it #2948
Conversation
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.
thanks! I left a comment inline
Oh! I probably shouldn't have used the "suggest" option on Github as that creates an extra commit (without a proper DCO signed-off-by); would you be able to squash both commits, and make sure that the squashed commit has your |
d410c1b
to
635e1ac
Compare
Ok, I think I straightened things out |
Hmm.. looks like there's three commits now 😂. One of those is a merge commit, and that likely doesn't have a sign-off 😅 Let me try walk you through it; first of all; if you run into trouble with any of these steps, as long as you don't Assuming the remotes for your local fork are configured to have the First, make sure that your remotes are up to date with the latest changes; git fetch upstream -v;
git fetch origin -v; Make sure you're on the git checkout 2947-check-placement-not-null Then, start an interactive rebase, based on the "master" branch in this repository; git rebase -i -s upstream/master This should open your default editor, showing a list of the commits that are being rebased; something like
Now, to "squash" the commits, change
Safe the file, and exit your editor. Git will open your editor again, but this time with the commit messages of both commits to allow you to set the correct commit message; # This is a combination of 2 commits.
# This is the 1st commit message:
Squashed commit
Signed-off-by: Simone Giacomel <sgiacomel@medstack.co>
# This is the commit message #2:
Fixed the logic. My bad.
Signed-off-by: Simone Giacomel <sgiacomel@medstack.co> Edit the commit message to describe the change (and make sure that the last line has the sign-off), e.g. Check that Placement is not null before trying to access it
If Placement is missing after updating a service with previous placement
constraints in a swarm with multiple nodes, it sends the swarm in an
unrecoverable state.
Signed-off-by: Simone Giacomel <sgiacomel@medstack.co> Save the file and exit your editor;
Now you need to force push to update the PR git push --force origin After that, the PR here should automatically update, and there should be a single commit in the PR 👍 Hope this helps! |
463aea8
to
ebe39a3
Compare
Thanks for your help, I clearly need to learn git more!
So after I pushed, this PR was closed automatically since there were no differences! So I just thought to open a new one, but I will definitely keep playing locally to get this right the next time. |
If Placement is missing after updating a service with previous placement constraints in a swarm with multiple nodes, it sends the swarm in an unrecoverable state.
closes #2947
closes moby/moby#37883
- What I did
I created a swarm with 2 nodes. I created a service using the docker api with a placement constraint. I then updated the service passing a json load with no
Placement
field.moby/moby#37883 (comment)
- How I did it
I mainly used curl to issue docker api calls
- How to test it
I can provide more details
- Description for the changelog
Prevents nil pointer reference in nodeMatches when Placement is null
Signed-off-by: Simone Giacomel sgiacomel@medstack.co