livepatch-charmers team mailing list archive
-
livepatch-charmers team
-
Mailing list archive
-
Message #00011
Re: [Merge] ~barryprice/canonical-livepatch-charm/+git/canonical-livepatch-charm:master into canonical-livepatch-charm:master
Diff comments:
> diff --git a/reactive/canonical_livepatch.py b/reactive/canonical_livepatch.py
> index 8333c6d..f95b9bc 100644
> --- a/reactive/canonical_livepatch.py
> +++ b/reactive/canonical_livepatch.py
> @@ -169,10 +186,16 @@ def restart_livepatch():
> @when_not('canonical-livepatch.connected')
> def canonical_livepatch_connect():
>
> - # Make sure the service is ready for us
> - wait_for_livepatch()
> + # So if we've just installed snapd on a trusty system, we will not be on
> + # the HWE kernel yet and unfortunately need to reboot first!
> + if get_series() == 'trusty' and is_xenial_kernel() is False:
> + unit_update('maintenance', 'Rebooting into Xenial kernel')
> + check_call(['juju-reboot'], universal_newlines=True)
Quite scary and could be cases where this would create a reboot loop. Perhaps best to just update the status with something like "reboot required"?
> + else:
> + # Make sure the service is ready for us
> + wait_for_livepatch()
>
> - set_state('canonical-livepatch.connected')
> + set_state('canonical-livepatch.connected')
>
>
> @when('canonical-livepatch.connected')
--
https://code.launchpad.net/~barryprice/canonical-livepatch-charm/+git/canonical-livepatch-charm/+merge/324996
Your team Livepatch charm developers is subscribed to branch canonical-livepatch-charm:master.
References