commands: fix invalid reload on boot

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2019-04-15 17:01:00 -07:00
parent 0f4de0d7e4
commit f7dac5a178
6 changed files with 44 additions and 29 deletions

View File

@ -29,7 +29,7 @@ func runCreate(dockerCli command.Cli, in createOptions, args []string) error {
ctx := appcontext.Context()
if in.name == "default" {
return errors.Errorf("default is a reserved name and can't be used to identify builder instance")
return errors.Errorf("default is a reserved name and cannot be used to identify builder instance")
}
if in.actionLeave {
@ -91,6 +91,12 @@ func runCreate(dockerCli command.Cli, in createOptions, args []string) error {
}
}
if ng != nil {
if in.nodeName == "" && !in.actionAppend {
return errors.Errorf("existing instance for %s but no append mode, specify --node to make changes for existing instances", name)
}
}
if ng == nil {
ng = &store.NodeGroup{
Name: name,