Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/203062
Change subject: labs: enhance output of a couple notifications
......................................................................
labs: enhance output of a couple notifications
The puppet notify{} causes the client to emit a log entry at Notice
level. When the 'message' attribute is not set, it emits a notice
stating it has set the message to the resource title. Hence:
notify { 'something': }
Cause two notifications:
Notice: something
Notice: Notify[something]/message : defined 'message' as 'something'
The later is over long and annoying when running puppet manually.
The labs role has a couple notify stanzas to output the labs project
name and instance hostname, the log is process by a reporting utility
which uses regex to grab the values.
Script is modules/puppetmaster/lib/puppet/reports/labsstatus.rb
/'instanceproject: (.*)'/
/'hostname: (.*)'/
Explictly define the message attribute in both notify to get rid of the
redundant and annoying notices.
Change-Id: I0034171943bab2f7920a4985ea879275de6d6c62
---
M manifests/role/labs.pp
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/62/203062/1
diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 5db3bed..b883a99 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -162,6 +162,10 @@
# The next two notifications are read in by the labsstatus.rb puppet
report handler.
# It needs to know project/hostname for nova access.
- notify{"instanceproject: ${::instanceproject}":}
- notify{"hostname: ${::instancename}":}
+ notify{ 'instanceproject'
+ message => "instanceproject: ${::instanceproject}",
+ }
+ notify{ 'instancehostname'
+ message => "hostname: ${::instancename}",
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/203062
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0034171943bab2f7920a4985ea879275de6d6c62
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits