Merge lp://qastaging/~xfactor973/charms/trusty/ceph/erasure_actions into lp://qastaging/~openstack-charmers-archive/charms/trusty/ceph/next
- Trusty Tahr (14.04)
- erasure_actions
- Merge into next
Status: | Merged |
---|---|
Merged at revision: | 138 |
Proposed branch: | lp://qastaging/~xfactor973/charms/trusty/ceph/erasure_actions |
Merge into: | lp://qastaging/~openstack-charmers-archive/charms/trusty/ceph/next |
Diff against target: |
1893 lines (+1247/-134) 29 files modified
.bzrignore (+1/-0) Makefile (+1/-1) actions.yaml (+175/-0) actions/__init__.py (+3/-0) actions/ceph_ops.py (+103/-0) actions/create-erasure-profile (+89/-0) actions/create-pool (+38/-0) actions/delete-erasure-profile (+24/-0) actions/delete-pool (+28/-0) actions/get-erasure-profile (+18/-0) actions/list-erasure-profiles (+22/-0) actions/list-pools (+17/-0) actions/pool-get (+19/-0) actions/pool-set (+23/-0) actions/pool-statistics (+15/-0) actions/remove-pool-snapshot (+19/-0) actions/rename-pool (+16/-0) actions/set-pool-max-bytes (+16/-0) actions/snapshot-pool (+18/-0) hooks/ceph_broker.py (+238/-42) hooks/charmhelpers/contrib/network/ip.py (+15/-0) hooks/charmhelpers/contrib/storage/linux/ceph.py (+38/-12) hooks/charmhelpers/core/host.py (+41/-26) hooks/charmhelpers/fetch/giturl.py (+3/-1) tests/charmhelpers/contrib/openstack/amulet/deployment.py (+3/-2) tox.ini (+1/-1) unit_tests/test_ceph_broker.py (+46/-48) unit_tests/test_ceph_ops.py (+217/-0) unit_tests/test_status.py (+0/-1) |
To merge this branch: | bzr merge lp://qastaging/~xfactor973/charms/trusty/ceph/erasure_actions |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Page | Needs Fixing | ||
Review via email: mp+280579@code.qastaging.launchpad.net |
Commit message
Description of the change
This will add erasure pool actions to the ceph charm. So far manual tests have been run. They turned up a few bugs in my charmhelpers code so I'll submit a separate merge proposal for that.
- 126. By Chris Holcombe
-
lint errors
- 127. By Chris Holcombe
-
Missed a few typos
uosci-testing-bot (uosci-testing-bot) wrote : | # |
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #15436 ceph-next for xfactor973 mp280579
LINT OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #14404 ceph-next for xfactor973 mp280579
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://
Build: http://
James Page (james-page) wrote : | # |
Hi Chris
Working through this update now; however unit test failure:
=======
FAIL: test_process_
-------
Traceback (most recent call last):
File "/home/
return func(*args, **keywargs)
File "/home/
'stderr': 'Missing or invalid api version (2)'})
AssertionError: {u'exit-code': 0} != {'exit-code': 1, 'stderr': 'Missing or invalid api version (2)'}
- {u'exit-code': 0}
+ {'exit-code': 1, 'stderr': 'Missing or invalid api version (2)'}
James Page (james-page) wrote : | # |
I think we also need some new unit tests to cover the v2 api for ceph_broker please.
James Page (james-page) wrote : | # |
actions.yaml:
Quite a bit of trailing whitespace - please tidy.
set-pool-max-bytes:
description: Set pool quotas for the maximum number of bytes.
params:
max:
type: integer
description: The name of the pool
^^ needs correctiing
James Page (james-page) wrote : | # |
actions.yaml:
I'd suggest that you provide enums for strings where only a defined set of values is supported - see:
https:/
This is a feature missing from config options, but we should use them for actions.
James Page (james-page) wrote : | # |
providing functional tests for the actions is going to be hard due to the requirements for underlying storage devices, so that's not required for this merge.
However, it would be nice to have some unit tests for actions please!
James Page (james-page) wrote : | # |
You also need to add 'actions' to the list of lint targets in the Makefile:
actions/
actions/
actions/
actions/
actions/
actions/
actions/
James Page (james-page) wrote : | # |
(and to tox.ini as well)
James Page (james-page) wrote : | # |
Style comment on action parameters - I'd stick with either - or _ for keys - preferably '-' as I think this looks nicer.
James Page (james-page) wrote : | # |
sys.exit(1) is probably working, but please use action_fail to indicate some sort of action failure - this is propagated back in full via juju
- 128. By Chris Holcombe
-
Add actions to lint. Change actions.yaml to use enum and also change underscores to dashes. Log action_fail in addition to exiting -1. Merge v2 requests with v1 requests since this does not break backwards compatibility. Add unit tests. Modify tox.ini to include actions. .
- 129. By Chris Holcombe
-
Adding a unit test file for ceph_ops
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #17860 ceph-next for xfactor973 mp280579
LINT FAIL: lint-test failed
LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.
Full lint test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #16691 ceph-next for xfactor973 mp280579
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://
Build: http://
- 130. By Chris Holcombe
-
Clean up lint warnings. Also added a few more mock unit tests
Chris Holcombe (xfactor973) wrote : | # |
@jamespage this is ready for another look. I've cleaned up the lint warnings and added a bunch more unit tests.
Chris Holcombe (xfactor973) wrote : | # |
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #17871 ceph-next for xfactor973 mp280579
LINT FAIL: lint-test failed
LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.
Full lint test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #16702 ceph-next for xfactor973 mp280579
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://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #8949 ceph-next for xfactor973 mp280579
AMULET OK: passed
Build: http://
James Page (james-page) wrote : | # |
Hi Chris
Working through the review; however I have a number of merge conflicts - can you rebase/repush this branch pls.
James Page (james-page) wrote : | # |
These tests are not executed under tox:
=======
ERROR: unit_tests.
-------
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
arg = patching.
File "/usr/lib/
original, local = self.get_original()
File "/usr/lib/
"%s does not have the attribute %r" % (target, name)
AttributeError: <module 'ceph_broker' from 'hooks/
=======
ERROR: unit_tests.
-------
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
arg = patching.
File "/usr/lib/
original, local = self.get_original()
File "/usr/lib/
"%s does not have the attribute %r" % (target, name)
AttributeError: <module 'ceph_broker' from 'hooks/
=======
ERROR: unit_tests.
-------
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
return func(*args, **keywargs)
TypeError: test_process_
-------
- 131. By Chris Holcombe
-
Merge upstream and resolve conflicts
- 132. By Chris Holcombe
-
Patching up the other unit tests to passing status
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #17961 ceph-next for xfactor973 mp280579
LINT FAIL: lint-test failed
LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.
Full lint test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #16783 ceph-next for xfactor973 mp280579
UNIT OK: passed
- 133. By Chris Holcombe
-
Clean up another lint error
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #8984 ceph-next for xfactor973 mp280579
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #16784 ceph-next for xfactor973 mp280579
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #17962 ceph-next for xfactor973 mp280579
LINT OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #8985 ceph-next for xfactor973 mp280579
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
Chris Holcombe (xfactor973) wrote : | # |
@jamespage I think this is ready for another look.
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #211 ceph-next for xfactor973 mp280579
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #196 ceph-next for xfactor973 mp280579
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #97 ceph-next for xfactor973 mp280579
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
- 134. By Chris Holcombe
-
Used a list as an integer. I meant to use the size of the list
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #394 ceph-next for xfactor973 mp280579
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #314 ceph-next for xfactor973 mp280579
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #165 ceph-next for xfactor973 mp280579
AMULET OK: passed
James Page (james-page) wrote : | # |
Only minor niggles now; sooo close....
James Page (james-page) wrote : | # |
One thing for follow-up after this lands - I think this would be good to cover with actions testing in the amulet tests - ChrisM added some for pause/resume so there is a fairly easy example to follow.
James Page (james-page) wrote : | # |
I then took a look at past /me's comments -
I don't think this has been addressed; we should be using action_* to handle failures so that the action fetch command actually gets useful output.
James Page (james-page) : | # |
- 135. By Chris Holcombe
-
Fix up the niggles and provide feedback to the action user as to why something failed
- 136. By Chris Holcombe
-
Merge upstream and resolve conflicts with actions and actions.yaml
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #810 ceph-next for xfactor973 mp280579
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #910 ceph-next for xfactor973 mp280579
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #355 ceph-next for xfactor973 mp280579
AMULET OK: passed
James Page (james-page) wrote : | # |
OK - action fails look ok
Two more things:
1) Please use /usr/bin/python for the action #!
2) there is a charmhelpers change in this branch that's not in charm-helpers - can you sort that out please :-)
- 137. By Chris Holcombe
-
Change /usr/bin/python2.7 to /usr/bin/python
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #821 ceph-next for xfactor973 mp280579
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #921 ceph-next for xfactor973 mp280579
LINT OK: passed
Chris Holcombe (xfactor973) wrote : | # |
I've added the charmhelpers change into this MP: https:/
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #365 ceph-next for xfactor973 mp280579
AMULET OK: passed
James Page (james-page) wrote : | # |
charm helpers change landed - please resync!
- 138. By Chris Holcombe
-
charmhelpers sync
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #1168 ceph-next for xfactor973 mp280579
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #1004 ceph-next for xfactor973 mp280579
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #448 ceph-next for xfactor973 mp280579
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #463 ceph-next for xfactor973 mp280579
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : | # |
Please rebase your branch and push it back to get updated tests. Thank you.
Chris Holcombe (xfactor973) wrote : | # |
Done! Thanks :)
On 02/23/2016 07:31 AM, Ryan Beisner wrote:
> Please rebase your branch and push it back to get updated tests. Thank you.
>
- 139. By Chris Holcombe
-
Merge upstream
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #1297 ceph-next for xfactor973 mp280579
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #1074 ceph-next for xfactor973 mp280579
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #476 ceph-next for xfactor973 mp280579
AMULET OK: passed
charm_unit_test #14400 ceph-next for xfactor973 mp280579
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/14026795/ 10.245. 162.77: 8080/job/ charm_unit_ test/14400/
Build: http://