[ARVADOS] updated: 1.3.0-2210-gaa36352fb

Git user git at public.arvados.org
Tue Feb 18 20:29:44 UTC 2020


Summary of changes:
 sdk/go/httpserver/logger.go                        | 10 ++-
 .../keep-web}/fpm-info.sh                          |  5 +-
 services/keep-web/handler_test.go                  | 95 ++++++++++++++++++----
 services/keep-web/main.go                          |  5 ++
 tools/arvbox/lib/arvbox/docker/Dockerfile.base     |  2 +-
 .../arvbox/docker/service/workbench2/run-service   |  1 +
 6 files changed, 96 insertions(+), 22 deletions(-)
 copy {tools/crunchstat-summary => services/keep-web}/fpm-info.sh (62%)

  discards  e99c1a4727f3042905fa9f44a5be98ce2fb0fae3 (commit)
       via  aa36352fb78a364b932dba1167bd5cb23dd26699 (commit)
       via  eaa047413a6a9194485efe94b7f1b92994b0c803 (commit)
       via  0a415b6c80c3bf39bb753274aae857eadde2f590 (commit)
       via  3836d53ef13841dad652e3faeb20660576279afd (commit)
       via  46d2ed57248419200d5716cfef8de9a1bb911240 (commit)
       via  2126b36e873d5412f9c38e3d109748af8df29612 (commit)
       via  72e59ac7d694d654fc669b94d4f33151d77bc694 (commit)
       via  530db6b1a9e164213422da56a38f2551a559747d (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (e99c1a4727f3042905fa9f44a5be98ce2fb0fae3)
            \
             N -- N -- N (aa36352fb78a364b932dba1167bd5cb23dd26699)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit aa36352fb78a364b932dba1167bd5cb23dd26699
Author: Ward Vandewege <ward at jhvc.com>
Date:   Fri Feb 14 14:54:23 2020 -0500

    arvados-dispatch-cloud: metrics improvement
    
    Expose instance_type in the instances_total Prometheus metric.
    
    refs #16157
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at jhvc.com>

diff --git a/lib/dispatchcloud/worker/pool.go b/lib/dispatchcloud/worker/pool.go
index c52422c41..0636fcee8 100644
--- a/lib/dispatchcloud/worker/pool.go
+++ b/lib/dispatchcloud/worker/pool.go
@@ -570,7 +570,7 @@ func (wp *Pool) registerMetrics(reg *prometheus.Registry) {
 		Subsystem: "dispatchcloud",
 		Name:      "instances_total",
 		Help:      "Number of cloud VMs.",
-	}, []string{"category"})
+	}, []string{"category", "instance_type"})
 	reg.MustRegister(wp.mInstances)
 	wp.mInstancesPrice = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: "arvados",
@@ -618,7 +618,11 @@ func (wp *Pool) updateMetrics() {
 	wp.mtx.RLock()
 	defer wp.mtx.RUnlock()
 
-	instances := map[string]int64{}
+	type entKey struct {
+		cat      string
+		instType string
+	}
+	instances := map[entKey]int64{}
 	price := map[string]float64{}
 	cpu := map[string]int64{}
 	mem := map[string]int64{}
@@ -637,17 +641,25 @@ func (wp *Pool) updateMetrics() {
 		default:
 			cat = "idle"
 		}
-		instances[cat]++
+		instances[entKey{cat, wkr.instType.Name}]++
 		price[cat] += wkr.instType.Price
 		cpu[cat] += int64(wkr.instType.VCPUs)
 		mem[cat] += int64(wkr.instType.RAM)
 		running += int64(len(wkr.running) + len(wkr.starting))
 	}
 	for _, cat := range []string{"inuse", "hold", "booting", "unknown", "idle"} {
-		wp.mInstances.WithLabelValues(cat).Set(float64(instances[cat]))
 		wp.mInstancesPrice.WithLabelValues(cat).Set(price[cat])
 		wp.mVCPUs.WithLabelValues(cat).Set(float64(cpu[cat]))
 		wp.mMemory.WithLabelValues(cat).Set(float64(mem[cat]))
+		// make sure to reset gauges for non-existing category/nodetype combinations
+		for _, it := range wp.instanceTypes {
+			if _, ok := instances[entKey{cat, it.Name}]; !ok {
+				wp.mInstances.WithLabelValues(cat, it.Name).Set(float64(0))
+			}
+		}
+	}
+	for k, v := range instances {
+		wp.mInstances.WithLabelValues(k.cat, k.instType).Set(float64(v))
 	}
 	wp.mContainersRunning.Set(float64(running))
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list