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

Issue 29980043: Ensure juju and lxc are installed

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by matthew.scott
Modified:
10 years, 5 months ago
Reviewers:
bac, frankban, mp+196011, gary.poster
Visibility:
Public.

Description

Ensure juju and lxc are installed To test: make check To QA: - Create an lxc or vm without juju installed - Clone this branch - Run `make sysdeps` - Run `make run` It should install juju, lxc, and dependencies, then prompt you to run again after initializing your juju environments. https://code.launchpad.net/~makyo/juju-quickstart/ensure-juju-lxc/+merge/196011 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Ensure juju and lxc are installed #

Total comments: 2

Patch Set 3 : Ensure juju and lxc are installed #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -0 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M quickstart/app.py View 1 1 chunk +30 lines, -0 lines 6 comments Download
M quickstart/manage.py View 1 chunk +2 lines, -0 lines 2 comments Download
M quickstart/tests/test_app.py View 1 1 chunk +62 lines, -0 lines 0 comments Download

Messages

Total messages: 8
matthew.scott
Please take a look.
10 years, 5 months ago (2013-11-20 20:40:26 UTC) #1
matthew.scott
Please take a look.
10 years, 5 months ago (2013-11-20 20:42:37 UTC) #2
gary.poster
LGTM. I'm afraid I won't have time for a QA today, but will do it ...
10 years, 5 months ago (2013-11-20 21:41:19 UTC) #3
matthew.scott
Please take a look. https://codereview.appspot.com/29980043/diff/20001/quickstart/tests/helpers.py File quickstart/tests/helpers.py (right): https://codereview.appspot.com/29980043/diff/20001/quickstart/tests/helpers.py#newcode88 quickstart/tests/helpers.py:88: """Easily use the quickstart.utils.call and ...
10 years, 5 months ago (2013-11-20 21:43:54 UTC) #4
matthew.scott
10 years, 5 months ago (2013-11-20 21:46:39 UTC) #5
matthew.scott
On 2013/11/20 21:46:39, matthew.scott wrote: Thanks, RV. That was supposed to be a reply to ...
10 years, 5 months ago (2013-11-20 21:47:24 UTC) #6
frankban
Nice branch Matthew, thank you! LGTM with changes (see below). Will QA later. https://codereview.appspot.com/29980043/diff/40001/quickstart/app.py File ...
10 years, 5 months ago (2013-11-21 12:02:03 UTC) #7
bac
10 years, 5 months ago (2013-11-21 18:43:36 UTC) #8
Changes made.  Having to re-propose to a new merge proposal before landing.

https://codereview.appspot.com/29980043/diff/40001/quickstart/app.py
File quickstart/app.py (right):

https://codereview.appspot.com/29980043/diff/40001/quickstart/app.py#newcode60
quickstart/app.py:60: cmds = [
On 2013/11/21 12:02:03, frankban wrote:
> ISTM that this is a good place to inform the user about what's happening,
e.g.:
> 'juju is not installed', 'sudo privileges required to install juju'. It could
be
> nice to give an idea about why we need sudo.

Done.

https://codereview.appspot.com/29980043/diff/40001/quickstart/app.py#newcode66
quickstart/app.py:66: cmd.insert(0, 'sudo')
On 2013/11/21 12:02:03, frankban wrote:
> You can either add sudo in the cmds above (and make cmds a list of tuples) or
> just "retcode, _, error = utils.call('sudo', *cmd)" below (and make cmds a
list
> of tuples :-). <shrug>
> 

Done.

https://codereview.appspot.com/29980043/diff/40001/quickstart/app.py#newcode73
quickstart/app.py:73: raise ProgramExit('Juju is now installed; please run `juju
init` and '
On 2013/11/21 12:02:03, frankban wrote:
> I am not sure about exiting with an error here.
> What if the user has a juju home properly set up but juju is not installed?
This
> is not uncommon, e.g. he removed the package, or he is working in a lxc
sharing
> his home directory. Moreover this code is never reached if the envs.yaml is
not
> properly set up, so we are just preventing users with a configured juju home
to
> proceed. I think we should just continue with the normal execution here: in
the
> future we will guide the user setting up the environment.

Done.

https://codereview.appspot.com/29980043/diff/40001/quickstart/manage.py
File quickstart/manage.py (right):

https://codereview.appspot.com/29980043/diff/40001/quickstart/manage.py#newco...
quickstart/manage.py:221: print('ensuring juju and lxc are installed')
On 2013/11/21 12:02:03, frankban wrote:
> What do you think about making this a logging.debug call? I am not sure about
> how much this is informative after the first run.

Done.
Sign in to reply to this message.

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