Demon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/54681
Change subject: Sort channels and logs before making config lines from them
......................................................................
Sort channels and logs before making config lines from them
Puppet doesn't ensure that array/list orders are preserved
between runs, so each run of puppet has the potential to
generate different output.
This caused ircecho to flap every time puppet was run since
it detected new config.
Change-Id: I288e9b0e6834e77a84517aea521db2ca9c804d12
---
M templates/ircecho/default.erb
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/81/54681/1
diff --git a/templates/ircecho/default.erb b/templates/ircecho/default.erb
index ed7112a..7b58384 100644
--- a/templates/ircecho/default.erb
+++ b/templates/ircecho/default.erb
@@ -10,7 +10,7 @@
channels = channels.map {|channel| channel.sub(/^#?/,'#') }
# join all channels to a single string. separate them w/ commas
- channels = channels.join(",")
+ channels = channels.sort.join(",")
# join the log name and (the already joined) channel list.
separate them w/ a colon
"#{log}:#{channels}"
@@ -18,7 +18,7 @@
# join the whole list of logs to one big string.
# separate each log from the next with a semicolon.
- logs = logs.join(";")
+ logs = logs.sort.join(";")
return logs
end
@@ -34,7 +34,7 @@
channels = channels.uniq
# join all channels to a single string. separate them w/ commas
- channels = channels.join(",")
+ channels = channels.sort.join(",")
return channels
end
--
To view, visit https://gerrit.wikimedia.org/r/54681
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I288e9b0e6834e77a84517aea521db2ca9c804d12
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Demon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits