Rebased LXD provider off a good commit from master. #3694

Merged
merged 607 commits into from Nov 9, 2015

Conversation

Projects
None yet
Contributor

kat-co commented Nov 9, 2015

jujubot and others added some commits Oct 27, 2015

Merge pull request #3603 from cmars/gccgo-nested-type-fix
Stop using nested types.

They break the gccgo 4.9 compiler.

(Review request: http://reviews.vapour.ws/r/3008/)
Merge pull request #3602 from voidspace/ignore-addresses-master
1509292: ignore machine addresses

Ignore machine addresses should be ignored for containers, which only have machine addresses.
Merge pull request #3605 from howbazaar/server-tag-to-controller-tag
Renaming ServerTag to be ControllerTag.

This branch renames the ServerTag functions to be ControllerTag.

The main interesting bit is the params structure returned from LoginResposneV1. This still serializes the ControllerTag as 'server-tag' as this shouldn't change.  When we make the next version of the login response, we can change the serialization format.

A follow-up branch will handle the serverUUID values.

(Review request: http://reviews.vapour.ws/r/3011/)
Merge pull request #3597 from howbazaar/add-juju-retry
Add two uses for juju/retry

Add the dependency for the new retry package.

(Review request: http://reviews.vapour.ws/r/3001/)
Merge pull request #3614 from howbazaar/is-controller-administrator
Rename IsSystemAdministrator to IsControllerAdministrator

Very boring rename.

(Review request: http://reviews.vapour.ws/r/3018/)
Merge pull request #3619 from rogpeppe/065-fix-tools-client-api
api: fix UploadTools to use correct HTTP client logic

Fixes bugs #1499277 and #1261780

This allows tools upload to use the new macaroon authorization.


(Review request: http://reviews.vapour.ws/r/3023/)
update to latest version of dependencies.
Note that this includes the update to persistent-cookiejar that fixes if for concurrent access
Merge pull request #3622 from rogpeppe/066-update-deps
update to latest version of dependencies.

Note that this includes the update to persistent-cookiejar that fixes if for concurrent access
and simplifies its API.


(Review request: http://reviews.vapour.ws/r/3026/)
Merge pull request #3472 from bz2/cloudconfig_ubuntu_user
Always create the ubuntu user from cloud-config

Juju expects any ubuntu image to have either an ubuntu user already
created or ubuntu as the default in /etc/cloud/cloud.cfg for
cloud-init to pick up and use.

This change adds cloud-config rules to always create an ubuntu user
with sensible defaults instead of the default user configured in the
image. This enables bootstrap on Dreamhost, and as a side effect
cleans up the centos user creation to share the same configuration.

(Review request: http://reviews.vapour.ws/r/2860/)
provider/maas: change ifdown/up sequence when rendering /e/n/i
On aarch64 and kernels >= 3.18, rendering a new /etc/network/interfaces
then running ifdown, ifup causes the existing primary interface to still
have its existing IP address and an associated routing table entry. This
also happens on on amd64/wily/4.2 but on arm64 it is more fatal as
networking is non-functional and juju bootstrap fails.

For example:

$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 52:54:00:c3:72:59
          inet addr:10.17.17.103 Bcast:10.17.17.255 Mask:255.255.255.0

juju-br0 Link encap:Ethernet HWaddr 52:54:00:c3:72:59
          inet addr:10.17.17.103 Bcast:10.17.17.255 Mask:255.255.255.0

Quoting from LP#1496972 (comment #33):

  So the question is, why didn't ifdown kill dhclient? Well, I looked at
  the juju code and I see that it generates a new /e/n/interfaces file
  before running ifdown. I've experienced issues with this before. I
  don't believe that ifdown keeps track of how interfaces were brought
  up itself, it instead consults /e/n/interfaces again. Since /e/n/i was
  already updated, ifdown doesn't know how the primary interface was
  brought up, so fails to bring it down cleanly.

This patch also dispenses with flushing the existing route on the old
primary interface as the new ordering of ifdown, re-render /e/n/i, ifup
will ensure that any existing dhclient processes are terminated and
there will be no extant route to flush.

Thanks to Dann Frazier for the initial patch (see bug/comment #33).

Fixes [LP:#1496972](https://bugs.launchpad.net/juju-core/+bug/1496972)
Merge pull request #3628 from frobware/master-lp1496972
provider/maas: change ifdown/up sequence when rendering /e/n/i

On aarch64 and kernels >= 3.18, rendering a new /etc/network/interfaces
then running ifdown, ifup causes the existing primary interface to still
have its existing IP address and an associated routing table entry. This
also happens on on amd64/wily/4.2 but on arm64 it is more fatal as
networking is non-functional and juju bootstrap fails.

For example:

$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 52:54:00:c3:72:59
          inet addr:10.17.17.103 Bcast:10.17.17.255 Mask:255.255.255.0

juju-br0 Link encap:Ethernet HWaddr 52:54:00:c3:72:59
          inet addr:10.17.17.103 Bcast:10.17.17.255 Mask:255.255.255.0

Quoting from LP#1496972 (comment #33):

  So the question is, why didn't ifdown kill dhclient? Well, I looked at
  the juju code and I see that it generates a new /e/n/interfaces file
  before running ifdown. I've experienced issues with this before. I
  don't believe that ifdown keeps track of how interfaces were brought
  up itself, it instead consults /e/n/interfaces again. Since /e/n/i was
  already updated, ifdown doesn't know how the primary interface was
  brought up, so fails to bring it down cleanly.

This patch also dispenses with flushing the existing route on the old
primary interface as the new ordering of ifdown, re-render /e/n/i, ifup
will ensure that any existing dhclient processes are terminated and
there will be no extant route to flush.

Thanks to Dann Frazier for the initial patch (see bug/comment #33).

Fixes [LP:#1496972](https://bugs.launchpad.net/juju-core/+bug/1496972)

(Review request: http://reviews.vapour.ws/r/3031/)
Updated cookiejar with backwards-compatibility fix.
This revision of persistent-cookiejar will safely handle a cookie file
created by a pre-1.26 Juju release.
Merge pull request #3637 from cmars/fixes-lp1511717
Updated cookiejar with backwards-compatibility fix.

This revision of persistent-cookiejar will safely handle a cookie file
created by a pre-1.26 Juju release.

(Review request: http://reviews.vapour.ws/r/3040/)
state: prohibit storing a charm with a nil charm.URL.
Passing a nil charm.URL was not supported, as this would have caused a
panic creating a value for DocID.

This PR adds an assertion ensure that curl is always non nil, and returns
an error when this is not true.
Merge pull request #3641 from davecheney/state-add-charm-url-check
state: prohibit storing a charm with a nil charm.URL.

Passing a nil charm.URL was not supported, as this would have caused a
panic creating a value for DocID.

This PR adds an assertion ensure that curl is always non nil, and returns
an error when this is not true.

(Review request: http://reviews.vapour.ws/r/3044/)
Merge pull request #3579 from cmars/charmdir-fortress
Replace worker/charmdir with worker/fortress.



(Review request: http://reviews.vapour.ws/r/2979/)
Merge pull request #3616 from howbazaar/update-deps
Update cmd and retry packages.

Bring in the latest juju/cmd and juju/retry packages.

(Review request: http://reviews.vapour.ws/r/3020/)
Merge pull request #3598 from axw/uniter-reboot-priority-before-kill
worker/uniter: record reboot before killing hook

When running the "juju-reboot" hook tool with --now, we
kill the hook process and then record the reboot priority.
This is racey: completion of the hook process is the
trigger for the completion of the run-hook operation.

Instead, set the reboot priority first, kill the hook
process, and the revert the reboot priority if killing
the hook process failed.

(Review request: http://reviews.vapour.ws/r/3002/)
state: added NoTail to LogTailerParams
Setting NoTail make the tailer stop as soon as the logs collection has
been read, without consulting the oplog. This is required for adding a
"no tail" feature to the /logs API and for an in-development utility
for dumping logs directly out of the database.
Merge pull request #3651 from mjs/db-logs-notail
state: added NoTail to LogTailerParams

Setting NoTail makes the tailer stop as soon as the logs collection has been read, without consulting the oplog. This is required for adding a "no tail" feature to the /logs API and for an in-development utility for dumping logs directly out of the database.

(Review request: http://reviews.vapour.ws/r/3054/)
Inactive meter status worker and tests.
Rework ConnectedStatusWorker into a NotifyWatchHandler.
Merge pull request #3540 from tasdomas/006-meter-status-inactive-worker
meter status inactive worker

The inactive (for lack of a better name) meter status worker is instantiated when the API connection is unavailable. It's purpose is to escalate the meter status to amber and then to red if the connection does not come back. Although its main goal is simple, most of the complexity in this pull request is dealing with the fact that the worker can be killed and restarted by the dependency engine at any point in time.

(Review request: http://reviews.vapour.ws/r/2938/)
Merge pull request #3644 from rogpeppe/067-config-ErrNoAuthorizedKeys
environs/config: add specific error for no authorized keys

This allows us to tell when there's been some error
other than just no keys being found.


(Review request: http://reviews.vapour.ws/r/3047/)
Merge pull request #3648 from perrito666/fix_master_1452082
Forwardport old restore deprecation

Forwardport 446b48f from 1.25

(Review request: http://reviews.vapour.ws/r/3051/)
Merge pull request #3260 from natefinch/fix-1486553-1.24
store the charm settings in the same transaction that adds the service

This fixes part of https://bugs.launchpad.net/juju-core/+bug/1486553 **i/o timeout errors can cause non-atomic service deploys** - the part about settings not getting set atomically when the service is added, so you can have a service added without the settings set correctly.

Now the setting and service add are done in the same transaction, so if there's a service, it has the right settings, period.

This does not fix the second part of the problem, where the units may not get assigned, that can still happen (so if you deploy a service with non-zero units, you might get a service with zero units).

(Review request: http://reviews.vapour.ws/r/2639/)
Conflicts:
	state/state_test.go
fix up the unit add ops so that it doesn't assert the service is aliv…
…e during AddService (since it's not yet). Also change AssignUnits to return a list of the results of the assignation.
couple refactors to get the unitassignment worker working.
refactor the idprefixwatcher to a generic collection watcher and refactor the watcher to be a strings watcher.
fix a test by making sure we run precheckinstance.. also factored out…
… the logic for converting an instance.Placement into the magic string that provicers want
all tests passing
Moved the code to run the unitassigner worker into a couple base suites, which fixed a ton of tests.

ericsnowcurrently and others added some commits Oct 27, 2015

kat-co added a commit that referenced this pull request Nov 9, 2015

Merge pull request #3694 from kat-co/lxd-provider
Rebased LXD provider off a good commit from master.

@kat-co kat-co merged commit e1f226d into juju:lxd-provider Nov 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment