mjm-migrate-host Add better handling for checkout interruptions

If you lose your connection to vCenter while putting a host into
maintenance mode, that task will eventually complete, but then the host
won't be moved into the right cluster. Even worse, re-running the
command will just error.

This change fixes it so that re-running the checkout command will
properly detect when the chosen host is already in maintenance mode, and
skip ahead to moving the host and bringing it up again.

Matt Moriarity avatar Matt Moriarity

Push event #24.1 passed

  • Ran for
AMD64
Go: 1.8
Git
language: go
go: 1.8
install:
- make prereqs
- make deps
script:
- make build
- make test
Build Config
{
  "go": [
    "1.8"
  ],
  "os": [
    "linux"
  ],
  "dist": "trusty",
  "sudo": false,
  "script": [
    "make build",
    "make test"
  ],
  "install": [
    "make prereqs",
    "make deps"
  ],
  "language": "go"
}