Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(134)

Issue 72860045: various: production code and logging improvements (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by dimitern
Modified:
11 years, 2 months ago
Reviewers:
mp+210108, axw, jameinel, rog
Visibility:
Public.

Description

various: production code and logging improvements Fixed 4 slightly annoying, unrelated minor issues: 1. Refactored production code not to depend on gocheck (manual provider and apiserver/charms). As a drive-by fix, I refactored environs/manual tests to be proper black-box unit tests, rather than white-box tests in the manual package. 2. Fixed and improved tools download output via curl and better handling of errors. 3. Added debug logging to environs sshstorage and httpstorage, and the manual provider. 4. Reformatted and unified generated boilerplate config across all providers, fixing bug #1221134 in the process (-e env not properly explained). Changes tested live with a manual and local environs with added manually provisioned machines. While testing I found out and filed this bug #1291292 (basically manual bootstrap is broken with ssl-hostname- verification set to false, but this is due to a deeper issue). I tried to unify and fix when all commands report "environment not bootstrapped", consistently across providers, but it turned out like more work than I originally thought, so I'll do a follow-up on that (which will entail dropping support for 1.14 environments without a .jenv file). https://code.launchpad.net/~dimitern/juju-core/330-general-improvements/+merge/210108 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : various: production code and logging improvements #

Total comments: 43

Patch Set 3 : various: production code and logging improvements #

Patch Set 4 : various: production code and logging improvements #

Unified diffs Side-by-side diffs Delta from patch set Stats (+553 lines, -446 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/destroyenvironment.go View 1 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/destroyenvironment_test.go View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/juju/help_topics.go View 1 2 12 chunks +31 lines, -25 lines 0 comments Download
M environs/boilerplate_config.go View 1 2 1 chunk +20 lines, -8 lines 0 comments Download
M environs/bootstrap/bootstrap.go View 1 1 chunk +3 lines, -2 lines 0 comments Download
M environs/bootstrap/state.go View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit.go View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M environs/httpstorage/storage.go View 4 chunks +7 lines, -0 lines 0 comments Download
M environs/jujutest/livetests.go View 1 3 chunks +2 lines, -3 lines 0 comments Download
M environs/jujutest/tests.go View 1 4 chunks +5 lines, -6 lines 0 comments Download
M environs/manual/bootstrap_test.go View 1 2 9 chunks +17 lines, -16 lines 0 comments Download
M environs/manual/export_test.go View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
D environs/manual/fakessh.go View 1 chunk +0 lines, -87 lines 0 comments Download
A environs/manual/fakessh_test.go View 1 2 1 chunk +156 lines, -0 lines 0 comments Download
M environs/manual/init.go View 1 2 3 2 chunks +9 lines, -7 lines 0 comments Download
M environs/manual/init_test.go View 1 2 4 chunks +26 lines, -26 lines 0 comments Download
M environs/manual/provisioner_test.go View 1 2 8 chunks +10 lines, -9 lines 0 comments Download
M environs/open.go View 1 2 3 chunks +22 lines, -14 lines 0 comments Download
M environs/sshstorage/storage.go View 3 chunks +6 lines, -0 lines 0 comments Download
M environs/testing/storage.go View 2 chunks +0 lines, -17 lines 0 comments Download
A environs/utils.go View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M juju/conn_test.go View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M provider/azure/config.go View 1 1 chunk +19 lines, -11 lines 0 comments Download
M provider/common/bootstrap.go View 1 1 chunk +0 lines, -15 lines 0 comments Download
M provider/ec2/ec2.go View 1 2 1 chunk +16 lines, -9 lines 0 comments Download
M provider/joyent/config.go View 1 2 1 chunk +40 lines, -19 lines 0 comments Download
M provider/local/environprovider.go View 1 2 1 chunk +15 lines, -9 lines 0 comments Download
M provider/maas/environprovider.go View 1 1 chunk +4 lines, -2 lines 0 comments Download
M provider/manual/environ.go View 1 chunk +1 line, -0 lines 0 comments Download
M provider/openstack/provider.go View 1 2 2 chunks +89 lines, -59 lines 0 comments Download
M state/apiserver/charms.go View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M state/apiserver/charms_test.go View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M state/apiserver/client/client_test.go View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M utils/ssh/testing/fakessh.go View 1 1 chunk +0 lines, -80 lines 0 comments Download

Messages

Total messages: 11
dimitern
Please take a look.
11 years, 2 months ago (2014-03-09 23:55:09 UTC) #1
axw
https://codereview.appspot.com/72860045/diff/1/environs/manual/init.go File environs/manual/init.go (right): https://codereview.appspot.com/72860045/diff/1/environs/manual/init.go#newcode27 environs/manual/init.go:27: cmd.Stdin = strings.NewReader(ssh.CheckProvisionedScript) utils/ssh is for *general ssh* things. ...
11 years, 2 months ago (2014-03-10 01:08:52 UTC) #2
dimitern
Please take a look. https://codereview.appspot.com/72860045/diff/1/environs/manual/init.go File environs/manual/init.go (right): https://codereview.appspot.com/72860045/diff/1/environs/manual/init.go#newcode27 environs/manual/init.go:27: cmd.Stdin = strings.NewReader(ssh.CheckProvisionedScript) On 2014/03/10 ...
11 years, 2 months ago (2014-03-10 20:32:46 UTC) #3
axw
Thanks for the changes, and cleaning the code up. Looks much better now :) Just ...
11 years, 2 months ago (2014-03-11 04:43:21 UTC) #4
jameinel
overall LGTM, though I did have some comments. https://codereview.appspot.com/72860045/diff/2/environs/open.go File environs/open.go (right): https://codereview.appspot.com/72860045/diff/2/environs/open.go#newcode93 environs/open.go:93: if ...
11 years, 2 months ago (2014-03-11 10:06:32 UTC) #5
rog
review so far. https://codereview.appspot.com/72860045/diff/2/environs/bootstrap/state.go File environs/bootstrap/state.go (right): https://codereview.appspot.com/72860045/diff/2/environs/bootstrap/state.go#newcode43 environs/bootstrap/state.go:43: logger.Debugf("putting %q to boostrap storage %#v", ...
11 years, 2 months ago (2014-03-11 11:57:45 UTC) #6
rog
A few more suggestions. It's great that we've lost the testing dependencies from the code, ...
11 years, 2 months ago (2014-03-11 12:59:33 UTC) #7
dimitern
Please take a look. https://codereview.appspot.com/72860045/diff/2/environs/bootstrap/state.go File environs/bootstrap/state.go (right): https://codereview.appspot.com/72860045/diff/2/environs/bootstrap/state.go#newcode43 environs/bootstrap/state.go:43: logger.Debugf("putting %q to boostrap storage ...
11 years, 2 months ago (2014-03-12 11:18:52 UTC) #8
jameinel
LGTM, though you should probably wait for Roger since he had the most comments on ...
11 years, 2 months ago (2014-03-12 12:13:00 UTC) #9
rog
On 2014/03/12 12:13:00, jameinel wrote: > LGTM, though you should probably wait for Roger since ...
11 years, 2 months ago (2014-03-12 12:25:58 UTC) #10
dimitern
11 years, 2 months ago (2014-03-12 12:34:30 UTC) #11
Please take a look.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b