Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Provisioner upgrade #920

Merged
merged 2 commits into from
Mar 31, 2015
Merged

Conversation

nathanleclaire
Copy link
Contributor

cc @ehazlett @sthulb

This PR implements upgrade feature for the Ubuntu and boot2docker provisioners. In Ubuntu we run sudo apt-get upgrade lxc-docker and for boot2docker we download the latest ISO, then replace the one the machine is currently using with that ISO.

Noteworthy changes:

  • WaitForState has been pulled into drivers instead of libmachine in order to make it easier to use cross-package
  • The majority of code related to handling moving ISOs around has been moved out of the virtualbox driver and into utils so it can be used in multiple places. Come to think of it, maybe I should go update the other local drivers to use this common code as well?
  • Adds new docs and integration tests

PTAL

@ehazlett
Copy link
Contributor

Thanks! Taking a look.

@@ -167,7 +155,7 @@ func (h *Host) Start() error {
return err
}

return utils.WaitFor(h.MachineInState(state.Running))
return utils.WaitFor(drivers.MachineInState(h.Driver, state.Running))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is starting to get clunky. I'm not saying it's bad - it just seems getting a bit much with the nesting. Not sure what to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree it's hairy. Maybe we could have an additional short-hand method available in utils, like utils.WaitForDriverState(h.Driver, state.Running). I just don't want to re-implement "run an action, then wait for the state that action is trying to reach to be fulfilled" in different places.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree -- I think it's ok for now.

@ehazlett ehazlett added this to the 0.2.0 milestone Mar 31, 2015
@ehazlett
Copy link
Contributor

LGTM

ehazlett added a commit that referenced this pull request Mar 31, 2015
@ehazlett ehazlett merged commit 45c8673 into docker:master Mar 31, 2015
legal90 added a commit to legal90/machine that referenced this pull request Mar 31, 2015
legal90 added a commit to legal90/machine that referenced this pull request Apr 1, 2015
legal90 added a commit to legal90/machine that referenced this pull request Jun 8, 2015
legal90 added a commit to legal90/machine that referenced this pull request Jun 22, 2015
legal90 added a commit to legal90/machine that referenced this pull request Jul 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants