Merge lp:~mbruzek/charms/trusty/mongodb/limited-network into lp:charms/trusty/mongodb

Proposed by Matt Bruzek
Status: Rejected
Rejected by: Marco Ceppi
Proposed branch: lp:~mbruzek/charms/trusty/mongodb/limited-network
Merge into: lp:charms/trusty/mongodb
Diff against target: 37 lines (+12/-2)
2 files modified
actions/perf (+6/-1)
hooks/hooks.py (+6/-1)
To merge this branch: bzr merge lp:~mbruzek/charms/trusty/mongodb/limited-network
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Disapprove
Kevin W Monroe Approve
Review via email: mp+280784@code.launchpad.net

Description of the change

An environment that has limited network capability found mongodb charm to be broken because it attempts to install charms.benchmark from pip.

The solution here is to continue to try to install from the Internet, when that fails pip install from a tar file in the charm directory.

To post a comment you must log in.
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM pending a one line fix

review: Approve
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #15550 mongodb for mbruzek mp280784
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/15550/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #14510 mongodb for mbruzek mp280784
    UNIT FAIL: unit-test failed

UNIT Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full unit test output: http://paste.ubuntu.com/14060740/
Build: http://10.245.162.77:8080/job/charm_unit_test/14510/

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

filename needs a fixin, otherwise, +1.

83. By Matt Bruzek

Moving apt-get install pip outside of try catch!

84. By Matt Bruzek

Spelling the resource file name correctly would be helpful.

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

LGTM!

review: Approve
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #15551 mongodb for mbruzek mp280784
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/15551/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #14511 mongodb for mbruzek mp280784
    UNIT FAIL: unit-test failed

UNIT Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full unit test output: http://paste.ubuntu.com/14064877/
Build: http://10.245.162.77:8080/job/charm_unit_test/14511/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #8320 mongodb for mbruzek mp280784
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/8320/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #8321 mongodb for mbruzek mp280784
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/8321/

Revision history for this message
Marco Ceppi (marcoceppi) wrote :
review: Disapprove

Unmerged revisions

84. By Matt Bruzek

Spelling the resource file name correctly would be helpful.

83. By Matt Bruzek

Moving apt-get install pip outside of try catch!

82. By Matt Bruzek

Adding the charms.benchmark file for times when network is limited.

81. By Matt Bruzek

In network constrained environments you can not install from the Internet, use a file if all else fails.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'actions/perf'
--- actions/perf 2015-12-02 22:44:28 +0000
+++ actions/perf 2015-12-17 00:49:48 +0000
@@ -11,7 +11,12 @@
11 from charms.benchmark import Benchmark11 from charms.benchmark import Benchmark
12except ImportError:12except ImportError:
13 subprocess.check_call(['apt-get', 'install', '-y', 'python-pip'])13 subprocess.check_call(['apt-get', 'install', '-y', 'python-pip'])
14 subprocess.check_call(['pip', 'install', '-U', 'charms.benchmark'])14 try:
15 subprocess.check_call(['pip', 'install', '-U', 'charms.benchmark'])
16 except:
17 # Using the Internet failed, install charms.benchmark from a file.
18 benchmark_file = 'files/charms.benchmark-1.0.5.tar.gz'
19 subprocess.check_call(['pip', 'install', '-U', benchmark_file])
15 from charms.benchmark import Benchmark20 from charms.benchmark import Benchmark
1621
1722
1823
=== added file 'files/charms.benchmark-1.0.5.tar.gz'
19Binary files files/charms.benchmark-1.0.5.tar.gz 1970-01-01 00:00:00 +0000 and files/charms.benchmark-1.0.5.tar.gz 2015-12-17 00:49:48 +0000 differ24Binary files files/charms.benchmark-1.0.5.tar.gz 1970-01-01 00:00:00 +0000 and files/charms.benchmark-1.0.5.tar.gz 2015-12-17 00:49:48 +0000 differ
=== modified file 'hooks/hooks.py'
--- hooks/hooks.py 2015-12-16 20:22:02 +0000
+++ hooks/hooks.py 2015-12-17 00:49:48 +0000
@@ -93,7 +93,12 @@
93except ImportError:93except ImportError:
94 apt_install('python-pip', fatal=True)94 apt_install('python-pip', fatal=True)
95 import subprocess95 import subprocess
96 subprocess.check_call(['pip', 'install', '-U', 'charms.benchmark'])96 try:
97 subprocess.check_call(['pip', 'install', '-U', 'charms.benchmark'])
98 except:
99 # Using the Internet failed, install charms.benchmark from a file.
100 benchmark_file = 'files/charms.benchmark-1.0.5.tar.gz'
101 subprocess.check_call(['pip', 'install', '-U', benchmark_file])
97 from charms.benchmark import Benchmark102 from charms.benchmark import Benchmark
98103
99from charmhelpers.contrib.charmsupport.nrpe import NRPE104from charmhelpers.contrib.charmsupport.nrpe import NRPE

Subscribers

People subscribed via source and target branches