Merge lp://qastaging/~tealeg/charms/trusty/percona-cluster/pause-and-resume into lp://qastaging/~openstack-charmers-archive/charms/trusty/percona-cluster/next

Proposed by Geoff Teale
Status: Merged
Merged at revision: 74
Proposed branch: lp://qastaging/~tealeg/charms/trusty/percona-cluster/pause-and-resume
Merge into: lp://qastaging/~openstack-charmers-archive/charms/trusty/percona-cluster/next
Diff against target: 2140 lines (+1754/-89)
15 files modified
actions.yaml (+4/-0)
actions/actions.py (+51/-0)
charm-helpers-tests.yaml (+1/-0)
charmhelpers/contrib/network/ip.py (+5/-1)
charmhelpers/core/hookenv.py (+11/-9)
charmhelpers/core/host.py (+32/-16)
charmhelpers/core/kernel.py (+68/-0)
tests/00-setup (+2/-0)
tests/31-test-pause-and-resume.py (+38/-0)
tests/charmhelpers/contrib/amulet/deployment.py (+4/-2)
tests/charmhelpers/contrib/amulet/utils.py (+243/-52)
tests/charmhelpers/contrib/openstack/amulet/deployment.py (+23/-9)
tests/charmhelpers/contrib/openstack/amulet/utils.py (+359/-0)
tests/charmhelpers/core/__init__.py (+15/-0)
tests/charmhelpers/core/hookenv.py (+898/-0)
To merge this branch: bzr merge lp://qastaging/~tealeg/charms/trusty/percona-cluster/pause-and-resume
Reviewer Review Type Date Requested Status
Chris Glass (community) Approve
Adam Collard (community) Approve
Review via email: mp+268238@code.qastaging.launchpad.net

Description of the change

This branch adds pause and resume actions.

In addition to that central goal it also:
 - includes an updated version of charmhelpers
 - defines tests for the actions.

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #7599 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/7599/

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

charm_lint_check #8197 percona-cluster-next for tealeg mp268238
    LINT OK: passed

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

Revision history for this message
Ryan Beisner (1chb1n) wrote :

re: amulet tests...

Thank you for your work on this. These will be great test additions.

FYI - The percona-cluster charm's amulet tests aren't consistent with the other os-charms, as you may have noticed. I've got its amulet test refactor on my list for this cycle, to make it consistent with other os-charms in how they exercise each of the currently-supported ubuntu:openstack release combos. Be aware that, as written, the existing and proposed amulet tests will only exercise Trusty-Icehouse in automation. When I refactor the others, I'll be sure to preserve your amulet tests and pull those into the run-on-every-combo pivot.

Questions, suggestions re: this proposal:

Can you re-use existing amulet helpers instead of adding new local helpers? I know a few things just landed there with regard to actions and service checking in amulet tests.

For local helpers which are not yet represented in amulet helpers, yet potentially useful in other charm tests...

If there are OpenStack-specific, amulet-specific helpers which are useful in other charm tests, please land those in charmhelpers/contrib/openstack/amulet/utils.py.

If there are non-OpenStack-specific, amulet-specific helpers which are useful in other charm tests, please land those in charmhelpers/contrib/amulet/utils.py.

Feel free to holler with any questions. Thanks again!

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

charm_amulet_test #5843 percona-cluster-next for tealeg mp268238
    AMULET OK: passed

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

Revision history for this message
Geoff Teale (tealeg) wrote :

Hi Ryan,

Thanks for your feedback. Sorry we had some much variation and duplication in our submissions, it wasn't the plan.

Hopefully you should find the latest revision of this MP more in line with Adam and Alberto's work.

--
Geoff

> re: amulet tests...
>
> Thank you for your work on this. These will be great test additions.
>
> FYI - The percona-cluster charm's amulet tests aren't consistent with the
> other os-charms, as you may have noticed. I've got its amulet test refactor
> on my list for this cycle, to make it consistent with other os-charms in how
> they exercise each of the currently-supported ubuntu:openstack release combos.
> Be aware that, as written, the existing and proposed amulet tests will only
> exercise Trusty-Icehouse in automation. When I refactor the others, I'll be
> sure to preserve your amulet tests and pull those into the run-on-every-combo
> pivot.
>
> Questions, suggestions re: this proposal:
>
> Can you re-use existing amulet helpers instead of adding new local helpers? I
> know a few things just landed there with regard to actions and service
> checking in amulet tests.
>
> For local helpers which are not yet represented in amulet helpers, yet
> potentially useful in other charm tests...
>
> If there are OpenStack-specific, amulet-specific helpers which are useful in
> other charm tests, please land those in
> charmhelpers/contrib/openstack/amulet/utils.py.
>
> If there are non-OpenStack-specific, amulet-specific helpers which are useful
> in other charm tests, please land those in
> charmhelpers/contrib/amulet/utils.py.
>
> Feel free to holler with any questions. Thanks again!

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

charm_unit_test #7817 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/7817/

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

charm_lint_check #8423 percona-cluster-next for tealeg mp268238
    LINT OK: passed

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

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

charm_amulet_test #5930 percona-cluster-next for tealeg mp268238
    AMULET FAIL: amulet-test failed

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

Full amulet test output: http://paste.ubuntu.com/12136124/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5930/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

Looks like the 00-setup needs to be updated. We ran into that dep issue elsewhere.

This should be the ticket:
http://paste.ubuntu.com/12136867/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

Otherwise, pending passing tests, looks good to me. Thank you for your work on this!

Revision history for this message
Geoff Teale (tealeg) wrote :

Cheers Ryan, will do!

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

charm_lint_check #8477 percona-cluster-next for tealeg mp268238
    LINT OK: passed

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

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

charm_unit_test #7868 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/7868/

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

charm_unit_test #7869 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/7869/

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

charm_lint_check #8478 percona-cluster-next for tealeg mp268238
    LINT OK: passed

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

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

charm_amulet_test #5936 percona-cluster-next for tealeg mp268238
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
ERROR subprocess encountered error code 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12139634/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5936/

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

charm_amulet_test #5938 percona-cluster-next for tealeg mp268238
    AMULET FAIL: amulet-test failed

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

Full amulet test output: http://paste.ubuntu.com/12139740/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5938/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

I believe if you rebase and resolve any resulting conflicts, the amulet tests in your branch will probably pass. We landed some necessary updates for other efforts, also fixed some amulet test dependency issues along the way.

Revision history for this message
Geoff Teale (tealeg) wrote :

> I believe if you rebase and resolve any resulting conflicts, the amulet tests
> in your branch will probably pass. We landed some necessary updates for other
> efforts, also fixed some amulet test dependency issues along the way.

Hi Ryan, it should be good to go now.

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

charm_lint_check #9091 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12237361/
Build: http://10.245.162.77:8080/job/charm_lint_check/9091/

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

charm_unit_test #8400 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8400/

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

charm_lint_check #9092 percona-cluster-next for tealeg mp268238
    LINT OK: passed

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

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

charm_unit_test #8401 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8401/

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

charm_amulet_test #6147 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12238554/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6147/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

It looks like the tests/00-setup here needs updated. We're working on updating them all, but if you can do that here, that should resolve the import error on the amulet test.

Example in-flight:
http://bazaar.launchpad.net/~1chb1n/charms/trusty/openstack-dashboard/next-amulet-fixup-1507/view/head:/tests/00-setup

Revision history for this message
Geoff Teale (tealeg) wrote :

> It looks like the tests/00-setup here needs updated. We're working on
> updating them all, but if you can do that here, that should resolve the import
> error on the amulet test.
>
> Example in-flight:
> http://bazaar.launchpad.net/~1chb1n/charms/trusty/openstack-dashboard/next-
> amulet-fixup-1507/view/head:/tests/00-setup

Hi Ryan,

It should already have exactly that content as I've merged in the most recent percona-cluster/next which has that. I'll poke around a little and see if I can find out the issue.

Revision history for this message
Geoff Teale (tealeg) wrote :

OK, I managed to reproduce the error by removing the python3-distro-info package from my VM. It seems that we need to explicitly pull in both python-distro-info and python3-distro-info. Let's see if that gets the Amulet tests to pass here too.

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

charm_unit_test #8463 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8463/

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

charm_lint_check #9157 percona-cluster-next for tealeg mp268238
    LINT OK: passed

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

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

charm_amulet_test #6169 percona-cluster-next for tealeg mp268238
    AMULET OK: passed

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

Revision history for this message
Adam Collard (adam-collard) wrote :

N/F for the missing asserts about status, otherwise looks good.

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

charm_unit_test #8529 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8529/

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

charm_lint_check #9228 percona-cluster-next for tealeg mp268238
    LINT OK: passed

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

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

charm_amulet_test #6190 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12252191/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6190/

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

charm_lint_check #9239 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12254011/
Build: http://10.245.162.77:8080/job/charm_lint_check/9239/

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

charm_unit_test #8540 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8540/

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

charm_lint_check #9242 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12254270/
Build: http://10.245.162.77:8080/job/charm_lint_check/9242/

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

charm_unit_test #8543 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8543/

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

charm_amulet_test #6201 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12255036/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6201/

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

charm_lint_check #9321 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12262221/
Build: http://10.245.162.77:8080/job/charm_lint_check/9321/

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

charm_unit_test #8620 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8620/

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

charm_lint_check #9324 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12262815/
Build: http://10.245.162.77:8080/job/charm_lint_check/9324/

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

charm_unit_test #8622 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8622/

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

charm_amulet_test #6234 percona-cluster-next for tealeg mp268238
    AMULET OK: passed

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

Revision history for this message
Geoff Teale (tealeg) wrote :

> N/F for the missing asserts about status, otherwise looks good.

It should now be good, utilising the outstanding code from charmhelpers to do status_get.

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

charm_unit_test #8932 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/8932/

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

charm_lint_check #9714 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12328261/
Build: http://10.245.162.77:8080/job/charm_lint_check/9714/

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

charm_amulet_test #6339 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12329079/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6339/

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

charm_unit_test #9001 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/9001/

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

charm_lint_check #9773 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12337429/
Build: http://10.245.162.77:8080/job/charm_lint_check/9773/

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

charm_amulet_test #6355 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12338262/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6355/

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

charm_unit_test #9213 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/9213/

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

charm_lint_check #10047 percona-cluster-next for tealeg mp268238
    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://paste.ubuntu.com/12417154/
Build: http://10.245.162.77:8080/job/charm_lint_check/10047/

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

charm_unit_test #9214 percona-cluster-next for tealeg mp268238
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/9214/

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

charm_lint_check #10048 percona-cluster-next for tealeg mp268238
    LINT OK: passed

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

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

charm_amulet_test #6433 percona-cluster-next for tealeg mp268238
    AMULET OK: passed

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

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

charm_amulet_test #6434 percona-cluster-next for tealeg mp268238
    AMULET OK: passed

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

Revision history for this message
Adam Collard (adam-collard) wrote :

Looks good, thanks! +1

review: Approve
Revision history for this message
Chris Glass (tribaal) wrote :

Looks good! Thanks for your contribution.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches