~gnuoy/charms/trusty/ceph/stable-charmhelper-sync

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: Liam Young
  • Date: 2014-09-26 08:54:03 UTC
  • Revision ID: liam.young@canonical.com-20140926085403-ifrmo61a0u3neupn
Cherry pick the fix to use pkgrevno comparisons from charmhelpers, from next

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from charmhelpers.core.host import (
30
30
    service_restart,
31
31
    umount,
32
 
    mkdir
 
32
    mkdir,
 
33
    cmp_pkgrevno
33
34
)
34
35
from charmhelpers.fetch import (
35
36
    apt_install,
50
51
 
51
52
def install_upstart_scripts():
52
53
    # Only install upstart configurations for older versions
53
 
    if ceph.get_ceph_version() < "0.55.1":
 
54
    if cmp_pkgrevno('ceph', "0.55.1") < 0:
54
55
        for x in glob.glob('files/upstart/*.conf'):
55
56
            shutil.copy(x, '/etc/init/')
56
57
 
71
72
        'auth_supported': config('auth-supported'),
72
73
        'mon_hosts': ' '.join(get_mon_hosts()),
73
74
        'fsid': config('fsid'),
74
 
        'version': ceph.get_ceph_version(),
 
75
        'old_auth': cmp_pkgrevno('ceph', "0.51") < 0,
75
76
        'osd_journal_size': config('osd-journal-size'),
76
77
        'use_syslog': str(config('use-syslog')).lower()
77
78
    }