Merge master #2520

Merged
merged 557 commits into from Jun 8, 2015

Conversation

Projects
None yet

Merge master back into the devices-api-maas feature branch.

(Review request: http://reviews.vapour.ws/r/1886/)

jujubot and others added some commits May 21, 2015

Merge pull request #2395 from dimitern/lp-1456989-1.24
Fixed lp:1456989 - cloud-init 0.6.3 (precise) workaround

Reintroducing a change which was dropped with the introduction of CentOS
support (#2066): cloud-init 0.6.3 needs special handling for packages
needing the cloud-tools repo (precise-updates/cloud-tools). Without this
fix, deploying to precise fails at cloud-init time with errors running
apt-get install. For more details see http://pad.lv/1456989.

Live tested on MAAS and EC2.

(Review request: http://reviews.vapour.ws/r/1756/)
Revert "Merge pull request #2389 from ericsnowcurrently/fix-1457011-b…
…ashisms"

This reverts commit 3159890, reversing
changes made to cc30b73.
Merge pull request #2396 from ericsnowcurrently/revert-1.24
Revert "Merge pull request #2389 ..."

(fixes https://bugs.launchpad.net/juju-core/+bug/1457031)

This reverts commit 3159890, reversing
changes made to cc30b73.

(Review request: http://reviews.vapour.ws/r/1757/)
state: exposed txn pruning functionality
github.com/juju/txn.Runner now has a MaybePruneTransactions
method. This change exposes that on multiEnvRunner and as a method on
State.
worker/txnpruner: new simple worker to prune completed txn data
Periodically calls PruneTransactions to keep the txns collection in
check.
provider/ec2: tag instances and volumes
We tag instances started with StartInstances
with the machine tag and the environment UUID.
Similarly, we tag volumes with volume tag and
environment UUID.

State server instances are additionally tagged
with a "JujuStateServer" tag. This is not used
for anything yet, but we can later use it to
improve the way we identify state servers.

In the console, instances and volumes will now
display the tag as the instance's "name" column.
The environment UUID can be used for identifying
instances and volumes within an environment, e.g.
for AllInstances, and also for billing purposes.
Merge pull request #2386 from mjs/1453785-txn-pruning-1.24
Prune completed transactions

This set of changes integrates the new txn pruning functionality in juju/txn into Juju. A new txnpruner worker for the master machine agent is introduced to call MaybePruneTransactions periodically. Transactions will be pruned if the transaction count has doubled since the last prune.

Fixes LP #1453785.

(Review request: http://reviews.vapour.ws/r/1747/)
Merge pull request #2405 from axw/provider-ec2-tag-resources
provider/ec2: tag instances and volumes

We tag instances started with StartInstances
with the machine tag and the environment UUID.
Similarly, we tag volumes with volume tag and
environment UUID.

State server instances are additionally tagged
with a "JujuStateServer" tag. This is not used
for anything yet, but we can later use it to
improve the way we identify state servers.

In the console, instances and volumes will now
display the tag as the instance's "name" column.
The environment UUID can be used for identifying
instances and volumes within an environment, e.g.
for AllInstances, and also for billing purposes.

(Review request: http://reviews.vapour.ws/r/1767/)
Fix bug 1454697
Agents which use a close worker need to close the API they open
if their start functions fail.  This patch fixes the machine
and unit agents and mocks out the api state upgrader to simulate
the failure and test that the close occurs.

Conflicts:
	cmd/jujud/unit.go
Address review comments.
Used a channel instead of a boolean for the patched reportClosedAPI
function.  Also changed the report* functions to take an io.Closer
rather than an interface{}.

Conflicts:
	cmd/jujud/unit_test.go
Address review comments
Added closure of the channel.
Merge pull request #2410 from cherylj/file_handle_124
Forward port of fix for bug 1454697 (1.24)



(Review request: http://reviews.vapour.ws/r/1771/)
Merge pull request #2404 from wallyworld/service-amchine-destroy
Don't complain when destroying a machine that is about to be cleaned up

Fixes: https://bugs.launchpad.net/juju-core/+bug/1455158

Adds extra doc to service and unit destroy commands to explain that when the last unit is destroyed, the machine can also be cleaned up.

Add code to machine destroy to check that if there is a unit still on that machine, the service itself may be dying and thus the cleanup worker will eventually harvest the machine. So the machine destroy becomes a no-op and there's no error returned. Previously an error was returned which complained that the machine had assigned units, which it sort of did, but not alive for much longer and the user would get an error and see the machine destroyed anyway.

(Review request: http://reviews.vapour.ws/r/1766/)
provider/openstack: tag resources
We tag instances and volumes with the environment UUID.

State server instances are additionally tagged with a
"JujuStateServer" tag. This is not used for anything yet,
but we can later use it to improve the way we identify
state servers.
jujuc: send stdin to server
Send stdin to the uniter's RPC server when invoking
jujuc commands. This enables the user to pipe data
to jujuc commands.

Fixes https://bugs.launchpad.net/juju-core/+bug/1454678
Merge pull request #2407 from axw/provider-openstack-tag-resources
provider/openstack: tag resources

We tag instances and volumes with the environment UUID.

State server instances are additionally tagged with a
"JujuStateServer" tag. This is not used for anything yet,
but we can later use it to improve the way we identify
state servers.

Depends on go-goose/goose#9

(Review request: http://reviews.vapour.ws/r/1768/)

jujubot and others added some commits Jun 3, 2015

Merge pull request #2476 from natefinch/upgrade-fix
make the move-syslog-config upgrade more lenient

…about not being able to delete old config files.  We don't actually care overly much if the old ones are left around, so now we just log if we can't delete them, rather than screwing the upgrade because of it.
Fix LP 1460893
Fix various errors spotted with Gordon Klaus' `ineffassign`.

Most are harmless, but some are symptoms of dead code, or unchecked conditions.
Add resource tags to resource provisioning info
We now pass tags to set on resources (initially
instances, volumes and filesystems) through their
provisioning parameters, via the API.

We introduce a new environs/tags package that holds
the names we use for common tags, as well as helpers
for creating tag sets.
Merge pull request #2379 from perrito666/uas_status_set_service
added satus-set and status-get for service.

Still needs more tests (Writing them but I would appreciate reviews in the mean time) and a fake leader check.

(Review request: http://reviews.vapour.ws/r/1739/)
Merge pull request #2479 from axw/resource-tags-units-storagename-etc
Add resource tags to resource provisioning info

We now pass tags to set on resources (initially
instances, volumes and filesystems) through their
provisioning parameters, via the API. Tags make
their way into StartInstanceParams.InstanceConfig,
and into VolumeParams and FilesystemParams.

We introduce a new environs/tags package that holds
the names we use for common tags, as well as helpers
for creating tag sets.

The ec2 and openstack providers are updated to use
the tags when creating instances and volumes. Later
we should introduce a worker to keep tags up-to-date,
but for now we only set tags at instance creation
time.

(Review request: http://reviews.vapour.ws/r/1845/)
Merge pull request #2486 from wwitzel3/juju-1.24
removing manual validation logging from state

Remove some logging that was left behind in state.

FIxes LP: https://bugs.launchpad.net/juju-core/+bug/1453853

(Review request: http://reviews.vapour.ws/r/1852/)
Merge pull request #2488 from wwitzel3/master
removing manual validation logging from state

Patching from juju-1.24 fix.
Previous review: http://reviews.vapour.ws/r/1852/

(Review request: http://reviews.vapour.ws/r/1854/)
Merge pull request #2489 from natefinch/fix-1461354-tryagain
fix bug in namespace usage (lp:1461354)

fixes-1461354

https://bugs.launchpad.net/juju-core/+bug/1461354
debug-log EOF: invalid tag and panic seen in state server logs

This was a result of me changing the namespace stored in the config to no longer store the leading "-". Instead, it just stores the namespace itself, and where we use it, we have to format it correctly. This seems like a much more sane way to do it, so the value you set is the value that exists, and we don't dictate formatting to everyone using the namespace.... however, it meant I forgot to check for an empty namespace in this one case.

(Review request: http://reviews.vapour.ws/r/1855/)
Merge pull request #2484 from perrito666/fix_1.24_1431372
fix 1431372 restore fails

Added better error management.
This makes juju restore plugin give more useful output when non vital tasks fail.

(Review request: http://reviews.vapour.ws/r/1850/)
Merge pull request #2482 from davecheney/100-fix-lp-1460893
Fix LP 1460893

Fixes LP 1460893

Fix various errors spotted with Gordon Klaus' `ineffassign`.

Most are harmless, but some are symptoms of dead code, or unchecked conditions.

(Review request: http://reviews.vapour.ws/r/1848/)
Merge pull request #2478 from anastasiamac/no-pool-size-bug1461342
storage-add is provided only count.

 Units should only be able to request more of storage that has already been assigned, i.e. they should be able to specify count.


(Review request: http://reviews.vapour.ws/r/1844/)
Merge pull request #2467 from cherylj/vivid_containers_124v2
Move cloud-init logic out of service/systemd

This PR addresses additional review comments for the original fix for:
https://bugs.launchpad.net/juju-core/+bug/1442308

The behavior is the same, but moves around some of the logic to match the changes made in master.  The commits for master were cherry picked to 1.24 and manually tested.

Review on master:  http://reviews.vapour.ws/r/1797/

(Review request: http://reviews.vapour.ws/r/1831/)
Merge pull request #2492 from rogpeppe/029-upgradeWorkerContext-watch…
…er-stop

cmd/juju/agent: stop watcher in waitForOtherStateServers

Without this change, UpgradeSuite fails more often than not (it panics). With it,
it passes consistently for me.


(Review request: http://reviews.vapour.ws/r/1859/)
Merge pull request #2494 from bz2/lp_bug_link_fix
Fix two lp bug links from github transition

Rog pointed out the move to github and auto-rename of all
the imports also accidentally broke a couple of bug links
in his comments. Switch them back to pointing at launchpad.

(Review request: http://reviews.vapour.ws/r/1861/)
Replace windows services package
This PR branch replaces the current windows service package, which is highly dependent on executing powershell commandlets with a native implementation.

For the time being, the securestring package will be added to the windows service package. It has to be made more generally useful before we can split it out into its own project. It still lacks entropy, encrypting binary blobs and using encryption stores other then the user one.
Merge pull request #2491 from rogpeppe/028-envworkermanager-kill-worker
worker/envworkermanager: always stop worker on exit

This fixes an intermittent test failure in TestLoopExitKillsRunner
which happened because the underlying worker was not killed
when the loop terminated with an error.

We also change the API into a slightly more general form - there's
no need for the EnvWorkerManager to know that the worker
it's dealing with is actually a worker.Runner, and this makes
the tests slightly simpler to write (and arguably the API easier
to understand)


(Review request: http://reviews.vapour.ws/r/1858/)
Merge pull request #2248 from gabriel-samfira/services
Replace windows services package

This PR branch replaces the current windows service package, which is highly dependent on executing powershell commandlets, with a native implementation.

For the time being, the securestring package will be added to the windows service package. It has to be made more generally useful before we can split it out into its own project. It still lacks entropy, encrypting binary blobs and using encryption stores other then the user one. Fot the purpose of this package, the functionality it offers is enough.

This PR also removes the following dependencies:

bitbucket.org/kardianos/osext
bitbucket.org/kardianos/service

by implementing a small service handler using winsvc package.

Apologies for the long PR.

(Review request: http://reviews.vapour.ws/r/1609/)
Fix: 1441478 availability zone upgrade fails if containers are present
Don't add availability zones to containers, don't error on missing
instances.
FIX 1403165 CMD: destroy server without jenv bootstrap cfg
When destroying the state server from a jenv that does not have
bootstrap info, get that info from the API server instead and use it
to destroy the environment.
Merge pull request #2507 from waigani/fix-1441478-avalzones-125
Fix: 1441478 availability zone upgrade fails if containers are present

Don't add availability zones to containers, don't error on missing
instances.

(Review request: http://reviews.vapour.ws/r/1873/)
Merge pull request #2508 from waigani/fix-1403165-destroy-without-boo…
…tstrap-125

FIX 1403165 CMD: destroy server without jenv bootstrap cfg

When destroying the state server from a jenv that does not have
bootstrap info, get that info from the API server instead and use it
to destroy the environment.

(Review request: http://reviews.vapour.ws/r/1874/)
worker/txnpruner: allow for the worker to run exactly on the interval
This happens on Windows occasionally.

Fixes LP #1459291
Merge pull request #2474 from waigani/deps-whitespace
Check for white space in dependencies.tsv

If a revision id begins or ends with a space,
TestDependenciesTsvFormat will pass, but godeps will fail. Update the
test to check that the prefix and suffix are not spaces.

(Review request: http://reviews.vapour.ws/r/1840/)
Merge pull request #2516 from mjs/1459291-fix-testprunes
worker/txnpruner: allow for the worker to run exactly on the interval

This happens on Windows occasionally.

Fixes LP #1459291

(Review request: http://reviews.vapour.ws/r/1882/)
Merge pull request #2518 from dimitern/lp-1462412-worker-resumer-flak…
…y-test

Fixed lp:1462412: worker/resumer flaky test

Tested with:

`time go test -c && for i in `seq 50`; do ./resumer.test & sleep 0.01;
done`

Before the fix I got 3-4 failures, now none are reproducible.

(Review request: http://reviews.vapour.ws/r/1884/)

$$merge$$

Contributor

jujubot commented Jun 8, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Jun 8, 2015

Merge pull request #2520 from voidspace/devices-master-merge-1
Merge master

Merge master back into the devices-api-maas feature branch.

(Review request: http://reviews.vapour.ws/r/1886/)

@jujubot jujubot merged commit 0608788 into juju:devices-api-maas Jun 8, 2015

@voidspace voidspace deleted the voidspace:devices-master-merge-1 branch Oct 6, 2016

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