Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/Azure/acs-engine: (74 commits)
  Fix the network blip caused during network creation/deletion (Azure#3438)
  Adding e2e sample for kubenet+wincni and adding DNS back to e2e tests (Azure#3429)
  openshift: quote all values going into yaml files and shell scripts (Azure#3443)
  Update clusterKeyVaultName for kv and sa (Azure#3440)
  Kubernetes: Azure CNI v1.0.7 (Azure#3433)
  account for nil (Azure#3442)
  higher timeout, more retries for dpkg -i (Azure#3441)
  Reenable azurefile test (Azure#3402)
  triage non-working KMS test implementation (Azure#3437)
  Kubernetes: install blobfuse during CSE (Azure#3401)
  Fix KMS in multi api-server (Azure#3430)
  update azure-npm to v0.0.4 (Azure#3426)
  Kubernetes E2E: optimized HPA test (Azure#3428)
  Starting Windows troubleshooting steps (Azure#3431)
  pin device plugin ds to only labelled nodes. Update device plugin version for 1.11 (Azure#3422)
  E2E cleanup: "acse-test-infrastructure" is too long (Azure#3425)
  Remove DenyEscalatingExec admission controller from default list (Azure#3423)
  long-term DNS livenessProbe tests for soak cluster (Azure#3424)
  Unit tests (Azure#3344)
  remove version check from k8s e2e (Azure#3419)
  ...
  • Loading branch information
PaulCharlton committed Jul 7, 2018
2 parents 5579523 + 904db6a commit 43c47d5
Show file tree
Hide file tree
Showing 158 changed files with 7,668 additions and 1,434 deletions.
78 changes: 3 additions & 75 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,30 +153,6 @@ jobs:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-windows-1.7-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=30m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.7' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/windows/definition.json' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s windows e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-1.9-release-e2e:
<<: *defaults
steps:
Expand Down Expand Up @@ -284,30 +260,6 @@ jobs:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-windows-1.8-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=30m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.8' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/windows/definition.json' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s windows e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-windows-1.9-release-e2e:
<<: *defaults
steps:
Expand Down Expand Up @@ -383,7 +335,7 @@ jobs:
openshift-3.9-rhel-e2e:
working_directory: /go/src/github.com/Azure/acs-engine
docker:
- image: registry.svc.ci.openshift.org/ci/acs-engine-tests:v3.9
- image: registry.svc.ci.openshift.org/azure/acs-engine-tests:v3.9
environment:
GOPATH: /go
steps:
Expand Down Expand Up @@ -415,7 +367,7 @@ jobs:
openshift-3.9-rhel-e2e-vnet:
working_directory: /go/src/github.com/Azure/acs-engine
docker:
- image: registry.svc.ci.openshift.org/ci/acs-engine-tests:v3.9
- image: registry.svc.ci.openshift.org/azure/acs-engine-tests:v3.9
environment:
GOPATH: /go
steps:
Expand Down Expand Up @@ -447,7 +399,7 @@ jobs:
openshift-3.9-centos-e2e:
working_directory: /go/src/github.com/Azure/acs-engine
docker:
- image: registry.svc.ci.openshift.org/ci/acs-engine-tests:v3.9
- image: registry.svc.ci.openshift.org/azure/acs-engine-tests:v3.9
environment:
GOPATH: /go
steps:
Expand Down Expand Up @@ -503,24 +455,12 @@ workflows:
filters:
branches:
ignore: master
- k8s-windows-1.7-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-1.8-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.8-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.9-release-e2e:
requires:
- pr-e2e-hold
Expand Down Expand Up @@ -605,24 +545,12 @@ workflows:
filters:
branches:
only: master
- k8s-windows-1.7-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-1.8-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-windows-1.8-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-windows-1.9-release-e2e:
requires:
- test
Expand Down
2 changes: 1 addition & 1 deletion .codecov/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
codecov:
notify:
require_ci_to_pass: yes
require_ci_to_pass: no

coverage:
precision: 2
Expand Down
32 changes: 16 additions & 16 deletions cmd/dcos-upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmd

import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
Expand All @@ -15,6 +14,7 @@ import (
"github.com/Azure/acs-engine/pkg/i18n"
"github.com/Azure/acs-engine/pkg/operations/dcosupgrade"
"github.com/leonelquinteros/gotext"
"github.com/pkg/errors"

log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -76,40 +76,40 @@ func (uc *dcosUpgradeCmd) validate(cmd *cobra.Command) error {

uc.locale, err = i18n.LoadTranslations()
if err != nil {
return fmt.Errorf("error loading translation files: %s", err.Error())
return errors.Wrap(err, "error loading translation files")
}

if len(uc.resourceGroupName) == 0 {
cmd.Usage()
return fmt.Errorf("--resource-group must be specified")
return errors.New("--resource-group must be specified")
}

if len(uc.location) == 0 {
cmd.Usage()
return fmt.Errorf("--location must be specified")
return errors.New("--location must be specified")
}
uc.location = helpers.NormalizeAzureRegion(uc.location)

if len(uc.upgradeVersion) == 0 {
cmd.Usage()
return fmt.Errorf("--upgrade-version must be specified")
return errors.New("--upgrade-version must be specified")
}

if len(uc.deploymentDirectory) == 0 {
cmd.Usage()
return fmt.Errorf("--deployment-dir must be specified")
return errors.New("--deployment-dir must be specified")
}

if len(uc.sshPrivateKeyPath) == 0 {
uc.sshPrivateKeyPath = filepath.Join(uc.deploymentDirectory, "id_rsa")
}
if uc.sshPrivateKey, err = ioutil.ReadFile(uc.sshPrivateKeyPath); err != nil {
cmd.Usage()
return fmt.Errorf("ssh-private-key-path must be specified: %s", err)
return errors.Wrap(err, "ssh-private-key-path must be specified")
}

if err = uc.authArgs.validateAuthArgs(); err != nil {
return fmt.Errorf("%s", err)
return err
}
return nil
}
Expand All @@ -118,19 +118,19 @@ func (uc *dcosUpgradeCmd) loadCluster(cmd *cobra.Command) error {
var err error

if uc.client, err = uc.authArgs.getClient(); err != nil {
return fmt.Errorf("Failed to get client: %s", err)
return errors.Wrap(err, "Failed to get client")
}

_, err = uc.client.EnsureResourceGroup(uc.resourceGroupName, uc.location, nil)
if err != nil {
return fmt.Errorf("Error ensuring resource group: %s", err)
return errors.Wrap(err, "Error ensuring resource group")
}

// load apimodel from the deployment directory
apiModelPath := path.Join(uc.deploymentDirectory, "apimodel.json")

if _, err = os.Stat(apiModelPath); os.IsNotExist(err) {
return fmt.Errorf("specified api model does not exist (%s)", apiModelPath)
return errors.Errorf("specified api model does not exist (%s)", apiModelPath)
}

apiloader := &api.Apiloader{
Expand All @@ -140,24 +140,24 @@ func (uc *dcosUpgradeCmd) loadCluster(cmd *cobra.Command) error {
}
uc.containerService, uc.apiVersion, err = apiloader.LoadContainerServiceFromFile(apiModelPath, true, true, nil)
if err != nil {
return fmt.Errorf("error parsing the api model: %s", err.Error())
return errors.Wrap(err, "error parsing the api model")
}
uc.currentDcosVersion = uc.containerService.Properties.OrchestratorProfile.OrchestratorVersion

if uc.currentDcosVersion == uc.upgradeVersion {
return fmt.Errorf("already running DCOS %s", uc.upgradeVersion)
return errors.Errorf("already running DCOS %s", uc.upgradeVersion)
}

if len(uc.containerService.Location) == 0 {
uc.containerService.Location = uc.location
} else if uc.containerService.Location != uc.location {
return fmt.Errorf("--location does not match api model location")
return errors.New("--location does not match api model location")
}

// get available upgrades for container service
orchestratorInfo, err := api.GetOrchestratorVersionProfile(uc.containerService.Properties.OrchestratorProfile)
if err != nil {
return fmt.Errorf("error getting list of available upgrades: %s", err.Error())
return errors.Wrap(err, "error getting list of available upgrades")
}
// add the current version if upgrade has failed
orchestratorInfo.Upgrades = append(orchestratorInfo.Upgrades, &api.OrchestratorProfile{
Expand All @@ -174,7 +174,7 @@ func (uc *dcosUpgradeCmd) loadCluster(cmd *cobra.Command) error {
}
}
if !found {
return fmt.Errorf("upgrade to DCOS %s is not supported", uc.upgradeVersion)
return errors.Errorf("upgrade to DCOS %s is not supported", uc.upgradeVersion)
}

// Read name suffix to identify nodes in the resource group that belong
Expand Down
Loading

0 comments on commit 43c47d5

Please sign in to comment.