Merge develop into 2.0 #6504

Merged
merged 28 commits into from Oct 26, 2016

Conversation

Projects
None yet
8 participants
Contributor

kat-co commented Oct 26, 2016

No description provided.

cmars and others added some commits Oct 13, 2016

Use the mock clock in TestMeterStatusSuccesfulSend.
This fixes an "intermittent" test failure which could have been caused
by the real-world clock time from setup to the affected test being > 1s.
Merge pull request #6446 from cmars/fix-lp1626187
Use the mock clock in TestMeterStatusSuccesfulSend.

This fixes an "intermittent" test failure which could have been caused
by the real-world clock time from setup to the affected test being > 1s.
featuretests: API error handling in upgrade logins
The call to FullStatus was always expected to work but would
occasionally fail if the apiserver worker was in the middle of being
restarted. Instead of failing immediately allow retries to continue.

Fixes https://bugs.launchpad.net/juju/+bug/1619744
Merge pull request #6450 from mjs/1619744-TestLoginsDuringUpgrade
featuretests: API error handling in upgrade logins

The call to FullStatus was always expected to work but would
occasionally fail if the apiserver worker was in the middle of being
restarted. Instead of failing immediately allow retries to continue.

Fixes https://bugs.launchpad.net/juju/+bug/1619744
api: add SNIHostName to Info
This means that we can have an arbitrary API addresses
in api.Info, including resolved IP addresses, but still connect
using the officially signed certificate to check. If there's
a private Juju CA cert available, we use that by preference
to make it possible to connect even if the server cannot
obtain an officially signed certificate.

We also add a DialWebsocket field to api.DialOpts
so that we can use a fake dialer function in tests.
Merge pull request #6407 from rogpeppe/109-apiclient-snihostname
api: add SNIHostName to Info

This means that we can have an arbitrary API addresses
in api.Info, including resolved IP addresses, but still connect
using the officially signed certificate to check. If there's
a private Juju CA cert available, we use that by preference
to make it possible to connect even if the server cannot
obtain an officially signed certificate.
Corrects panics on MacOS Sierra
Addresses lp:1633495.

The code was already in place, we just weren't utilizing the correct commits.
Merge pull request #6455 from kat-co/fixes-1633495-sierra-panic
Corrects panics on MacOS Sierra

Addresses lp:1633495.

The code was already in place, we just weren't utilizing the correct commits.
worker/logforwarder: Make tests reliable
The tests were using a convoluted mess of channels in an attempt to
synchronise the multiple goroutines being tested with the test
code. This was hard to understand and work with and is likely to be
caused the observed intermittent test failures.

Changes:
- use independent stubs for the stream and sender to make it easier to
  assert calls and to have faked errors always be returned by the
  correct instance.
- use a single simpler "activity" channel in the stub sender to
  synchronise test and code-under-test progress
- make checks more reliable by only checking stubs once worker has shut
  down.
- removed unnecessary record sending goroutine in stub stream (just
  stack a buffered channel instead.

Likely fix for https://bugs.launchpad.net/juju/+bug/1606568
Merge pull request #6456 from mjs/1606568-TestStreamError
worker/logforwarder: Make tests reliable

The tests were using a convoluted mess of channels in an attempt to synchronise the multiple goroutines being tested with the test code. This was hard to understand and work with and is likely to be
caused the observed intermittent test failures.

Changes:
- use independent stubs for the stream and sender to make it easier to assert calls and to have faked errors always be returned by the correct instance.
- use a single simpler "activity" channel in the stub sender to synchronise test and code-under-test progress
- make checks more reliable by only checking stubs once worker has shut down.
- removed unnecessary record sending goroutine in stub stream (just stack a buffered channel instead.

Likely fix for https://bugs.launchpad.net/juju/+bug/1606568

### QA

Many runs of the test suite with the race stress tester. This is a unit test only change so there's other QA to do.
Merge pull request #6457 from anastasiamac/controllers-refresh-clarif…
…ication

Controllers cmd help change.

There is potential for user confusion about how to update controllers information when listing controllers.
We do guide users to "Use --refresh to see the latest information." 
However, sometimes users can interprete it as a direction to run "juju --refresh" (see https://bugs.launchpad.net/bugs/1632699)

This PR attempts to make obvious that --refresh is a flag on "juju controllers" command not "juju" itself.
Merge pull request #6458 from anastasiamac/service-rename-oversight-l…
…p1633604

Fixes lp#1633604: Renamed "service" to "application".

An oversight during renaming -  resources command outputs "Service" instead of "Application".
Merge pull request #6459 from anastasiamac/grant-help-lp1633607
Fixes lp#1633607: move content of "grant" command help.

Move valid arguments before examples.
Merge pull request #6461 from rogpeppe/119-fix-snihostname-test-inter…
…mittent-failure

api: fix intermittent test failures

The test code assumed that we'd get dial requests in the
order they are specified, but in a heavily loaded test server
this is not necessarily the case, leading to failures like this one:

​http://reports.vapour.ws/releases/4490/job/run-unit-tests-xenial-amd64/attempt/1427#highlight​

This fixes the test so that we don't rely on the sequential try ordering - the
concurrent retry mechanism isn't something we need to test in this test,
so just connect to a single address in each test.
OpenStack firewaller now takes a clock.Clock
This change is just to speed up testing. By taking a clock.Clock deleteSecurityGroup can be tested near-instantly rather than taking 30 seconds. The provider itself now has a clock, which is initialized by default to clock.WallClock to match the existing behavior during normal operation.

QA Steps:
This is a non-change in terms of Juju's normal usage, so just running the unit tests is sufficient.
Bootstrap config: inherited overwrites defaults.
Fixes an error in the bootstrap logic where a default from a cloud would overwrite values read from the users cloud config.

The bootstrap run logic has been split into several functions to aid readability and testing. The logical changes are actually very small and are contained within getBootstrapConfigs, which now builds up configuration by first combining all sources in order of lowest to highest precedence and then splitting the configuration out into bootstrap config, controller config and bootstrap model config. The old logic sort of did this, but it was muddled and had some precedence problems that were causing the fixed bugs.

Fixes http://pad.lv/1614239 and http://pad.lv/1619808
Contributor

kat-co commented Oct 26, 2016

!!build!!

@kat-co kat-co merged commit b3d1593 into juju:2.0 Oct 26, 2016

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