Merge ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:master into ~livepatch-charmers/charm-canonical-livepatch:master

Proposed by Barry Price
Status: Merged
Merged at revision: ccc3a14bcd079ae53f06962bafe5ec6ddaf0e293
Proposed branch: ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:master
Merge into: ~livepatch-charmers/charm-canonical-livepatch:master
Diff against target: 19 lines (+6/-2)
1 file modified
reactive/canonical_livepatch.py (+6/-2)
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+325816@code.launchpad.net

Commit message

If ksplice is installed, let's cowardly refuse to install livepatch

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/canonical_livepatch.py b/reactive/canonical_livepatch.py
2index 8bdb830..c2fb420 100644
3--- a/reactive/canonical_livepatch.py
4+++ b/reactive/canonical_livepatch.py
5@@ -218,8 +218,12 @@ def canonical_livepatch_connect():
6 universal_newlines=True).strip()
7 current = LooseVersion(uname)
8 required = LooseVersion('4.4')
9- if current < required:
10- hookenv.log('We need to reboot, kernel {} is too old'.format(current))
11+ uptrack_path = '/usr/sbin/uptrack-upgrade'
12+ if path.exists(uptrack_path):
13+ hookenv.log('Ksplice/Uptrack detected, please remove it and reboot')
14+ unit_update('blocked', 'Remove ksplice and then reboot')
15+ elif current < required:
16+ hookenv.log('Reboot required, kernel {} is too old'.format(current))
17 unit_update('blocked', 'A reboot is required')
18 else:
19 unit_update('maintenance', 'Connecting to the livepatch service')

Subscribers

People subscribed via source and target branches