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
diff --git a/hooks/hooks.py b/hooks/hooks.py
index 36beb11..2befc02 100755
--- a/hooks/hooks.py
+++ b/hooks/hooks.py
@@ -209,10 +209,12 @@ def configure_rsync_client():
209209
210 cron = juju_header()210 cron = juju_header()
211 for role in roles[hostname]:211 for role in roles[hostname]:
212 config_file = "%s.conf" % role
213 wanted_configs.append(config_file)
214 try:212 try:
215 mirror = conf.mirror_map(role)213 mirror = conf.mirror_map(role)
214 if mirror["unsafe"]:
215 continue
216 config_file = "%s.conf" % role
217 wanted_configs.append(config_file)
216 except ValueError:218 except ValueError:
217 log("CHARM: Missing details - skipping {}".format(role))219 log("CHARM: Missing details - skipping {}".format(role))
218 else:220 else:
@@ -263,6 +265,8 @@ def configure_rsync_server():
263 for role in roles[hostname]:265 for role in roles[hostname]:
264 try:266 try:
265 mirror = conf.mirror_map(role)267 mirror = conf.mirror_map(role)
268 if mirror["unsafe"]:
269 continue
266 except ValueError:270 except ValueError:
267 log("CHARM: Missing details - skipping {}".format(role))271 log("CHARM: Missing details - skipping {}".format(role))
268 continue272 continue
@@ -566,6 +570,8 @@ def configure_triggers():
566 for role in roles[hostname]:570 for role in roles[hostname]:
567 try:571 try:
568 mirror = conf.mirror_map(role)572 mirror = conf.mirror_map(role)
573 if mirror["unsafe"]:
574 continue
569 except ValueError:575 except ValueError:
570 log("CHARM: Missing details - skipping {}".format(role))576 log("CHARM: Missing details - skipping {}".format(role))
571 continue577 continue

Subscribers

People subscribed via source and target branches