Merge pull request #9178 from Asarew/docker-start-kic-existing-mount-exit
exit on existing cluster start with KiC driver mount configuration changepull/9170/head^2
commit
9ffb84ed71
|
@ -210,8 +210,11 @@ func runStart(cmd *cobra.Command, args []string) {
|
|||
if viper.GetBool(createMount) {
|
||||
mount := viper.GetString(mountString)
|
||||
if len(existing.ContainerVolumeMounts) != 1 || existing.ContainerVolumeMounts[0] != mount {
|
||||
out.WarningT("Due to the limitations of {{.driver}}, it's not possible to the change mount configuration of an existing cluster.", out.V{"driver": existing.Driver})
|
||||
out.WarningT("If necessary delete and recreate the cluster, proceeding with old mount configuration")
|
||||
exit.Message(reason.GuestMountConflict, "Sorry, {{.driver}} does not allow mounts to be changed after container creation (previous mount: '{{.old}}', new mount: '{{.new}})'", out.V{
|
||||
"driver": existing.Driver,
|
||||
"new": mount,
|
||||
"old": existing.ContainerVolumeMounts[0],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -214,6 +214,7 @@ var (
|
|||
GuestDeletion = Kind{ID: "GUEST_DELETION", ExitCode: ExGuestError}
|
||||
GuestLoadHost = Kind{ID: "GUEST_LOAD_HOST", ExitCode: ExGuestError}
|
||||
GuestMount = Kind{ID: "GUEST_MOUNT", ExitCode: ExGuestError}
|
||||
GuestMountConflict = Kind{ID: "GUEST_MOUNT_CONFLICT", ExitCode: ExGuestConflict}
|
||||
GuestNodeAdd = Kind{ID: "GUEST_NODE_ADD", ExitCode: ExGuestError}
|
||||
GuestNodeDelete = Kind{ID: "GUEST_NODE_DELETE", ExitCode: ExGuestError}
|
||||
GuestNodeProvision = Kind{ID: "GUEST_NODE_PROVISION", ExitCode: ExGuestError}
|
||||
|
|
Loading…
Reference in New Issue