Merge lp://qastaging/~jason-hobbs/charms/trusty/cinder/remove-volume-group into lp://qastaging/~openstack-charmers-archive/charms/trusty/cinder/next

Proposed by Jason Hobbs
Status: Merged
Merged at revision: 109
Proposed branch: lp://qastaging/~jason-hobbs/charms/trusty/cinder/remove-volume-group
Merge into: lp://qastaging/~openstack-charmers-archive/charms/trusty/cinder/next
Prerequisite: lp://qastaging/~jason-hobbs/charms/trusty/cinder/log-lvm-info
Diff against target: 160 lines (+88/-3)
2 files modified
hooks/cinder_utils.py (+36/-1)
unit_tests/test_cinder_utils.py (+52/-2)
To merge this branch: bzr merge lp://qastaging/~jason-hobbs/charms/trusty/cinder/remove-volume-group
Reviewer Review Type Date Requested Status
Corey Bryant (community) Approve
Review via email: mp+265461@code.qastaging.launchpad.net

Commit message

When 'overwrite' is set and volume group exists on other devices, remove it.

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

charm_lint_check #6567 cinder-next for jason-hobbs mp265461
    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/11916989/
Build: http://10.245.162.77:8080/job/charm_lint_check/6567/

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

charm_unit_test #6199 cinder-next for jason-hobbs mp265461
    UNIT OK: passed

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

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

charm_amulet_test #5244 cinder-next for jason-hobbs mp265461
    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/11917122/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5244/

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hey Jason, thanks for the patch! I have a couple minor comments below. Also can you run 'make lint' and fix the results? The amulet failure above might have just been an osci hiccup.

110. By Jason Hobbs

Corrections from code review.

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

charm_lint_check #6625 cinder-next for jason-hobbs mp265461
    LINT OK: passed

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

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

charm_unit_test #6252 cinder-next for jason-hobbs mp265461
    UNIT OK: passed

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

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

On 07/22/2015 08:19 AM, Corey Bryant wrote:
> Hey Jason, thanks for the patch! I have a couple minor comments below. Also can you run 'make lint' and fix the results? The amulet failure above might have just been an osci hiccup.

Thanks for the review - I fixed the lint and docstring copy/paste errors
you pointed out.

>> if vg_found is False and len(new_devices) > 0:
>> + if overwrite:
>> + ensure_lvm_volume_group_non_existent(volume_group)
>
> I wouldn't block merging on this but it seems like you could get rid of ensure_lvm_volume_group_non_existent and just add it's logic to remove_lvm_volume_group.

I'd prefer to leave it how it is - I like that 'remove_lvm_volume_group'
does just one thing - it issues the vgremove command. I also think it'd
be less clear to always call "remove_lvm_volume_group" even if it's not
there to begin with.

Jason

Revision history for this message
Corey Bryant (corey.bryant) wrote :

> On 07/22/2015 08:19 AM, Corey Bryant wrote:
> > Hey Jason, thanks for the patch! I have a couple minor comments below.
> Also can you run 'make lint' and fix the results? The amulet failure above
> might have just been an osci hiccup.
>
> Thanks for the review - I fixed the lint and docstring copy/paste errors
> you pointed out.
>
> >> if vg_found is False and len(new_devices) > 0:
> >> + if overwrite:
> >> + ensure_lvm_volume_group_non_existent(volume_group)
> >
> > I wouldn't block merging on this but it seems like you could get rid of
> ensure_lvm_volume_group_non_existent and just add it's logic to
> remove_lvm_volume_group.
>
> I'd prefer to leave it how it is - I like that 'remove_lvm_volume_group'
> does just one thing - it issues the vgremove command. I also think it'd
> be less clear to always call "remove_lvm_volume_group" even if it's not
> there to begin with.

Fair enough, I'm convinced.
>
> Jason

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Just waiting on the amulet results to post before landing this.

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

charm_amulet_test #5254 cinder-next for jason-hobbs mp265461
    AMULET OK: passed

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

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Can this be landed now?

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