Skip to content

Validate cluster name on update#35464

Draft
thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah:fix-swarm-update-validation
Draft

Validate cluster name on update#35464
thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah:fix-swarm-update-validation

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

Swarm clusters are only allowed to be named "default". If no name is given during update, use the "default" name, otherwise check the name and produce an error if the name is not "default".

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker-py test seems failing

@AkihiroSuda AkihiroSuda added the status/failing-ci Indicates that the PR in its current state fails the test suite label Nov 10, 2017
@thaJeztah
Copy link
Copy Markdown
Member Author

Need to update a test as well; looks like it's using the same port

@thaJeztah thaJeztah force-pushed the fix-swarm-update-validation branch 3 times, most recently from 5b3d32a to 49f1ae6 Compare November 11, 2017 00:31
@thaJeztah
Copy link
Copy Markdown
Member Author

opened docker/docker-py#1805 for docker-py

@thaJeztah
Copy link
Copy Markdown
Member Author

Hm, interesting;

01:06:11 ----------------------------------------------------------------------
01:06:11 FAIL: docker_cli_netmode_test.go:33: DockerSuite.TestNetHostname
01:06:11 
01:06:11 docker_cli_netmode_test.go:52:
01:06:11     c.Assert(strings.ToLower(out), checker.Contains, "no such network")
01:06:11 ... obtained string = "" +
01:06:11 ...     "/usr/local/bin/docker: error response from daemon: could not attach to network weird: rpc error: code = notfound desc = network weird not found.\n" +
01:06:11 ...     "time=\"2017-11-11t01:06:11z\" level=error msg=\"error waiting for container: context canceled\" \n"
01:06:11 ... substring string = "no such network"
01:06:11 
01:06:11 
01:06:11 ----------------------------------------------------------------------

@coolljt0725
Copy link
Copy Markdown
Contributor

ping @thaJeztah what's the status on this pr? changes look good to me, but CI is not happy

@thaJeztah
Copy link
Copy Markdown
Member Author

I think my test needs some changes, don't think I setup the swarm test correctly, but haven't had time to dive into that 😊

There's now also a check in SwarmKit itself to prevent updating the name, so perhaps we should remove these checks here

@vdemeester
Copy link
Copy Markdown
Member

Let's close that for now 😇

@vdemeester vdemeester closed this Jan 19, 2018
@thaJeztah thaJeztah reopened this Apr 28, 2025
@thaJeztah thaJeztah force-pushed the fix-swarm-update-validation branch from 49f1ae6 to 63001e8 Compare April 28, 2025 15:48
@thaJeztah thaJeztah closed this Apr 28, 2025
Swarm clusters are only allowed to be named "default".
If no name is given during update, use the "default" name,
otherwise check the name and produce an error if the name
is not "default".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah reopened this Apr 28, 2025
@thaJeztah thaJeztah force-pushed the fix-swarm-update-validation branch from 63001e8 to f43737d Compare April 28, 2025 15:55
@thaJeztah thaJeztah marked this pull request as draft April 28, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/failing-ci Indicates that the PR in its current state fails the test suite status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants