~openstack-charmers-archive/charms/trusty/ceph-osd/next

« back to all changes in this revision

Viewing changes to hooks/ceph_hooks.py

  • Committer: Corey Bryant
  • Date: 2015-11-02 21:37:33 UTC
  • mfrom: (52.1.4 ceph-osd)
  • Revision ID: corey.bryant@canonical.com-20151102213733-atr28zn03inrutp8
[james-pages,r=corey.bryant] Add tox support for lint and unit tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        umount(e_mountpoint)
124
124
 
125
125
    osd_journal = config('osd-journal')
126
 
    if (osd_journal and not os.path.exists(JOURNAL_ZAPPED)
127
 
            and os.path.exists(osd_journal)):
 
126
    if (osd_journal and not os.path.exists(JOURNAL_ZAPPED) and
 
127
            os.path.exists(osd_journal)):
128
128
        ceph.zap_disk(osd_journal)
129
129
        with open(JOURNAL_ZAPPED, 'w') as zapped:
130
130
            zapped.write('DONE')
224
224
        description='process check {%s}' % current_unit,
225
225
        check_cmd=('/bin/cat /var/lib/ceph/osd/ceph-*/whoami |'
226
226
                   'xargs -I@ status ceph-osd id=@ && exit 0 || exit 2')
227
 
        )
 
227
    )
228
228
    nrpe_setup.write()
229
229
 
230
230