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

Proposed by Barry Price
Status: Merged
Approved by: Haw Loeung
Approved revision: a448a77cb5ccb222de1458eb59d0c469d8917696
Merged at revision: 0da2937fa16abad4ba11eb9df75ef29a09e62a84
Proposed branch: ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:master
Merge into: ~livepatch-charmers/charm-canonical-livepatch:master
Diff against target: 16 lines (+5/-0)
1 file modified
reactive/canonical_livepatch.py (+5/-0)
Reviewer Review Type Date Requested Status
Haw Loeung Approve
Stuart Bishop (community) Approve
Review via email: mp+343496@code.launchpad.net

Commit message

Configure proxies early to avoid race LP#1761661

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Stuart Bishop (stub) wrote :

Yup.

Are we at the point we want to deprecate this option in favour of the snap proxy? I guess we should want until dogfooding and beta is over.

review: Approve
Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM as well.

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 0da2937fa16abad4ba11eb9df75ef29a09e62a84

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 e176c45..f71923d 100644
3--- a/reactive/canonical_livepatch.py
4+++ b/reactive/canonical_livepatch.py
5@@ -207,6 +207,11 @@ def canonical_livepatch_connect():
6 unit_update('blocked', 'A reboot is required')
7 else:
8 unit_update('maintenance', 'Connecting to the livepatch service')
9+ # Configure proxies early, if required - LP#1761661
10+ config = hookenv.config()
11+ proxy_url = config.get('livepatch_proxy')
12+ if proxy_url:
13+ configure_proxies(http_proxy=proxy_url, https_proxy=proxy_url)
14 # Make sure the service is ready for us
15 wait_for_livepatch()
16 set_state('canonical-livepatch.connected')

Subscribers

People subscribed via source and target branches