Andrew Bogott has submitted this change and it was merged.

Change subject: Band-aid patch to get puppet running again on labs.
......................................................................


Band-aid patch to get puppet running again on labs.

Currently the ganglia config depends on a fact (projectgid.rb)
which itself depends on the resolution of the ganglia manifest.

That was causing a failure due to an undefined variable.  Now
I just define that var to 'TBD' in order to allow the first pass
to complete.  Subsequent passes insert proper values.

Clearly this needs a better fix, but this patch should get labs
working again in the meantime.

Change-Id: Ic0edf12d6ce63ce13669beb72da867a70781ccc2
---
M modules/ganglia_new/manifests/monitor.pp
1 file changed, 10 insertions(+), 5 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ganglia_new/manifests/monitor.pp 
b/modules/ganglia_new/manifests/monitor.pp
index ce0c041..0497153 100644
--- a/modules/ganglia_new/manifests/monitor.pp
+++ b/modules/ganglia_new/manifests/monitor.pp
@@ -6,11 +6,16 @@
                $id = $ganglia_new::configuration::clusters[$cluster]['id'] + 
$ganglia_new::configuration::id_prefix[$::site]
                $desc = $ganglia_new::configuration::clusters[$cluster]['name']
                $portnr = $ganglia_new::configuration::base_port + $id
+               $gmond_port = $portnr
+       } else {
+               if $::project_gid {
+                       $gmond_port = $::project_gid
+               } else {
+                       #  This is dumb, but will get resolved on the next pass.
+                       $gmond_port = "TBD"
+               }
        }
-       $gmond_port = $::realm ? {
-               production => $portnr,
-               labs => $::project_gid
-       }
+
        $cname = $::realm ? {
                production => "${desc} ${::site}",
                labs => $::instanceproject
@@ -27,4 +32,4 @@
                aggregator_hosts => $aggregator_hosts,
                override_hostname => $override_hostname
        }
-}
\ No newline at end of file
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/61381
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0edf12d6ce63ce13669beb72da867a70781ccc2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <abog...@wikimedia.org>
Gerrit-Reviewer: Andrew Bogott <abog...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to