Merge ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:less-ubuntu-unsafe into ubuntu-mirror-charm:master

Proposed by Paul Collins
Status: Merged
Approved by: Haw Loeung
Approved revision: c977696eac5898baec112941d0cfdc21aa1a7d0e
Merged at revision: ac5e43d5d984bb95b9d437e7847d9ffd40f9def4
Proposed branch: ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:less-ubuntu-unsafe
Merge into: ubuntu-mirror-charm:master
Diff against target: 37 lines (+8/-2)
1 file modified
hooks/hooks.py (+8/-2)
Reviewer Review Type Date Requested Status
Haw Loeung +1 Approve
Canonical IS Reviewers Pending
Review via email: mp+382260@code.launchpad.net

Commit message

do not deploy an rsync module, ssh trigger, or rsync client config for unsafe roles

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
Haw Loeung (hloeung) wrote :

lgtm

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

Change successfully merged at revision ac5e43d5d984bb95b9d437e7847d9ffd40f9def4

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hooks/hooks.py b/hooks/hooks.py
2index 36beb11..2befc02 100755
3--- a/hooks/hooks.py
4+++ b/hooks/hooks.py
5@@ -209,10 +209,12 @@ def configure_rsync_client():
6
7 cron = juju_header()
8 for role in roles[hostname]:
9- config_file = "%s.conf" % role
10- wanted_configs.append(config_file)
11 try:
12 mirror = conf.mirror_map(role)
13+ if mirror["unsafe"]:
14+ continue
15+ config_file = "%s.conf" % role
16+ wanted_configs.append(config_file)
17 except ValueError:
18 log("CHARM: Missing details - skipping {}".format(role))
19 else:
20@@ -263,6 +265,8 @@ def configure_rsync_server():
21 for role in roles[hostname]:
22 try:
23 mirror = conf.mirror_map(role)
24+ if mirror["unsafe"]:
25+ continue
26 except ValueError:
27 log("CHARM: Missing details - skipping {}".format(role))
28 continue
29@@ -566,6 +570,8 @@ def configure_triggers():
30 for role in roles[hostname]:
31 try:
32 mirror = conf.mirror_map(role)
33+ if mirror["unsafe"]:
34+ continue
35 except ValueError:
36 log("CHARM: Missing details - skipping {}".format(role))
37 continue

Subscribers

People subscribed via source and target branches