Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Issue #2445: Print a more descriptive error message when using acs-en…
Browse files Browse the repository at this point in the history
…gine to create K8s cluster with a minor release (#2522)

#2445

Fix: Enhance error message to convey the user about incompatible orchestrator profile parameters supplied to acs engine.
  • Loading branch information
vpatelsj authored and jackfrancis committed Mar 26, 2018
1 parent 08ac0e2 commit cb5f7ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/api/vlabs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (o *OrchestratorProfile) Validate(isUpdate bool) error {
o.OrchestratorVersion,
false)
if version == "" {
return fmt.Errorf("OrchestratorProfile is not able to be rationalized, check supported Release or Version")
return fmt.Errorf("the following user supplied OrchestratorProfile configuration is not supported: OrchestratorType: %s, OrchestratorRelease: %s, OrchestratorVersion: %s. Please check supported Release or Version for this build of acs-engine", o.OrchestratorType, o.OrchestratorRelease, o.OrchestratorVersion)
}
case Swarm:
case SwarmMode:
Expand All @@ -80,7 +80,7 @@ func (o *OrchestratorProfile) Validate(isUpdate bool) error {
o.OrchestratorVersion,
false)
if version == "" {
return fmt.Errorf("OrchestratorProfile is not able to be rationalized, check supported Release or Version")
return fmt.Errorf("the following user supplied OrchestratorProfile configuration is not supported: OrchestratorType: %s, OrchestratorRelease: %s, OrchestratorVersion: %s. Please check supported Release or Version for this build of acs-engine", o.OrchestratorType, o.OrchestratorRelease, o.OrchestratorVersion)
}

if o.KubernetesConfig != nil {
Expand Down Expand Up @@ -140,7 +140,7 @@ func (o *OrchestratorProfile) Validate(isUpdate bool) error {
patchVersion := common.GetValidPatchVersion(o.OrchestratorType, o.OrchestratorVersion)
// if there isn't a supported patch version for this version fail
if patchVersion == "" {
return fmt.Errorf("OrchestratorProfile is not able to be rationalized, check supported Release or Version")
return fmt.Errorf("the following user supplied OrchestratorProfile configuration is not supported: OrchestratorType: %s, OrchestratorRelease: %s, OrchestratorVersion: %s. Please check supported Release or Version for this build of acs-engine", o.OrchestratorType, o.OrchestratorRelease, o.OrchestratorVersion)
}
}

Expand Down Expand Up @@ -422,7 +422,7 @@ func (a *Properties) Validate(isUpdate bool) error {
false)
}
if version == "" {
return fmt.Errorf("OrchestratorProfile is not able to be rationalized, check supported Release or Version")
return fmt.Errorf("the following user supplied OrchestratorProfile configuration is not supported: OrchestratorType: %s, OrchestratorRelease: %s, OrchestratorVersion: %s. Please check supported Release or Version for this build of acs-engine", a.OrchestratorProfile.OrchestratorType, a.OrchestratorProfile.OrchestratorRelease, a.OrchestratorProfile.OrchestratorVersion)
}
if supported, ok := common.AllKubernetesWindowsSupportedVersions[version]; !ok || !supported {
return fmt.Errorf("Orchestrator %s version %s does not support Windows", a.OrchestratorProfile.OrchestratorType, version)
Expand Down

0 comments on commit cb5f7ae

Please sign in to comment.