From 9d49c8c1d29ce3e4015bd73f8690d29ad8605ded Mon Sep 17 00:00:00 2001 From: Brian McMahon Date: Wed, 10 Jun 2020 13:36:09 -0700 Subject: [PATCH] Update pins / fix prometheus client This commit does the following: - updates and tidys the pins - uses the NewSummary method in the new libcalico-go version to create prometheus summaries, as the defaults were removed in the new version of the prometheus client --- calc/async_calc_graph.go | 3 ++- dataplane/linux/int_dataplane.go | 9 ++++--- go.mod | 5 ++-- go.sum | 45 ++++++-------------------------- ipsets/ipset_defs.go | 4 ++- iptables/lock.go | 6 +++-- routetable/route_table.go | 8 +++--- 7 files changed, 29 insertions(+), 51 deletions(-) diff --git a/calc/async_calc_graph.go b/calc/async_calc_graph.go index 315f0c9f25..437391bafb 100644 --- a/calc/async_calc_graph.go +++ b/calc/async_calc_graph.go @@ -23,6 +23,7 @@ import ( "github.com/projectcalico/libcalico-go/lib/backend/api" "github.com/projectcalico/libcalico-go/lib/health" + cprometheus "github.com/projectcalico/libcalico-go/lib/prometheus" "github.com/projectcalico/felix/config" "github.com/projectcalico/felix/proto" @@ -55,7 +56,7 @@ var ( Name: "felix_calc_graph_output_events", Help: "Number of events emitted by the calculation graph.", }) - summaryUpdateTime = prometheus.NewSummary(prometheus.SummaryOpts{ + summaryUpdateTime = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_calc_graph_update_time_seconds", Help: "Seconds to update calculation graph for each datastore OnUpdate call.", }) diff --git a/dataplane/linux/int_dataplane.go b/dataplane/linux/int_dataplane.go index 4a0275060f..df7ae6be15 100644 --- a/dataplane/linux/int_dataplane.go +++ b/dataplane/linux/int_dataplane.go @@ -36,6 +36,7 @@ import ( "github.com/vishvananda/netlink" "github.com/projectcalico/libcalico-go/lib/health" + cprometheus "github.com/projectcalico/libcalico-go/lib/prometheus" "github.com/projectcalico/libcalico-go/lib/set" "github.com/projectcalico/felix/bpf" @@ -75,21 +76,21 @@ var ( Name: "felix_int_dataplane_messages", Help: "Number dataplane messages by type.", }, []string{"type"}) - summaryApplyTime = prometheus.NewSummary(prometheus.SummaryOpts{ + summaryApplyTime = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_int_dataplane_apply_time_seconds", Help: "Time in seconds that it took to apply a dataplane update.", }) - summaryBatchSize = prometheus.NewSummary(prometheus.SummaryOpts{ + summaryBatchSize = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_int_dataplane_msg_batch_size", Help: "Number of messages processed in each batch. Higher values indicate we're " + "doing more batching to try to keep up.", }) - summaryIfaceBatchSize = prometheus.NewSummary(prometheus.SummaryOpts{ + summaryIfaceBatchSize = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_int_dataplane_iface_msg_batch_size", Help: "Number of interface state messages processed in each batch. Higher " + "values indicate we're doing more batching to try to keep up.", }) - summaryAddrBatchSize = prometheus.NewSummary(prometheus.SummaryOpts{ + summaryAddrBatchSize = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_int_dataplane_addr_msg_batch_size", Help: "Number of interface address messages processed in each batch. Higher " + "values indicate we're doing more batching to try to keep up.", diff --git a/go.mod b/go.mod index 7b00f65782..8c4e249172 100644 --- a/go.mod +++ b/go.mod @@ -22,10 +22,9 @@ require ( github.com/onsi/ginkgo v1.10.1 github.com/onsi/gomega v1.7.0 github.com/pkg/errors v0.8.1 - github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9 // indirect - github.com/projectcalico/libcalico-go v1.7.2-0.20200609222740-c6639bd64a77 + github.com/projectcalico/libcalico-go v1.7.2-0.20200610195847-d341ca89a0af github.com/projectcalico/pod2daemon v0.0.0-20191223184832-a0e1c4693271 - github.com/projectcalico/typha v0.7.3-0.20200610195605-14cf938c70e9 + github.com/projectcalico/typha v0.7.3-0.20200610223356-d5ba5f68c21e github.com/prometheus/client_golang v1.0.0 github.com/satori/go.uuid v1.2.0 github.com/sirupsen/logrus v1.4.2 diff --git a/go.sum b/go.sum index 2e65f5cbf4..4dddbc958e 100644 --- a/go.sum +++ b/go.sum @@ -75,6 +75,7 @@ github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= @@ -87,11 +88,7 @@ github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ github.com/containernetworking/plugins v0.8.2 h1:5lnwfsAYO+V7yXhysJKy3E1A2Gy9oVut031zfdOzI9w= github.com/containernetworking/plugins v0.8.2/go.mod h1:TxALKWZpWL79BC3GOYKJzzXr7U8R23PdhwaLp6F3adc= github.com/coredns/corefile-migration v1.0.4/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= -github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE= -github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.4.2/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -133,6 +130,7 @@ github.com/docopt/docopt-go v0.0.0-20160216232012-784ddc588536/go.mod h1:WwZ+bS3 github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -493,55 +491,26 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= -github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/projectcalico/go-json v0.0.0-20161128004156-6219dc7339ba h1:aaF2byUCZhzszHsfPEr2M3qcU4ibtD/yk/il2R7T1PU= github.com/projectcalico/go-json v0.0.0-20161128004156-6219dc7339ba/go.mod h1:q8EdCgBdMQzgiX/uk4GXLWLk+gIHd1a7mWUAamJKDb4= github.com/projectcalico/go-yaml-wrapper v0.0.0-20191112210931-090425220c54 h1:Jt2Pic9dxgJisekm8q2WV9FaWxUJhhRfwHSP640drww= github.com/projectcalico/go-yaml-wrapper v0.0.0-20191112210931-090425220c54/go.mod h1:UgC0aTQ2KMDxlX3lU/stndk7DMUBJqzN40yFiILHgxc= -github.com/projectcalico/libcalico-go v1.7.2-0.20200527172159-35eb09f7909c h1:LvngU7vcoUjjQ9BcqHFPVqoExc5z4F6BFKsGYeQZGiQ= -github.com/projectcalico/libcalico-go v1.7.2-0.20200527172159-35eb09f7909c/go.mod h1:P4D/eq0J3r5BMLmyyFD6TVNWKP2UzNUUT+atwSlqY4Y= -github.com/projectcalico/libcalico-go v1.7.2-0.20200529191439-77f762f742df h1:z+LPDycjewGKXtq6Q2jLsWT6tDc8PSy+UuGHvZXTZ6E= -github.com/projectcalico/libcalico-go v1.7.2-0.20200529191439-77f762f742df/go.mod h1:P4D/eq0J3r5BMLmyyFD6TVNWKP2UzNUUT+atwSlqY4Y= -github.com/projectcalico/libcalico-go v1.7.2-0.20200603171336-1b8bc835691e h1:1lTEvLSbVdgHfCl0P3dw3Y2kSqey20QYkMQGlWLzX1o= -github.com/projectcalico/libcalico-go v1.7.2-0.20200603171336-1b8bc835691e/go.mod h1:P4D/eq0J3r5BMLmyyFD6TVNWKP2UzNUUT+atwSlqY4Y= -github.com/projectcalico/libcalico-go v1.7.2-0.20200605154551-89d66798ae9a h1:T7FoJap/DQ0YNts7ZO0CjmIR9+UQoeiF+8pXy6JIgY8= -github.com/projectcalico/libcalico-go v1.7.2-0.20200605154551-89d66798ae9a/go.mod h1:P+KtlWYdi0TY2NpPWao6vUOSGle40VpuHnYn7T1WolQ= -github.com/projectcalico/libcalico-go v1.7.2-0.20200608214448-871c78fe00ea h1:+wDFdl+7tuszjFLxArKanQEz81THubJ90fIlwaDnqWk= -github.com/projectcalico/libcalico-go v1.7.2-0.20200608214448-871c78fe00ea/go.mod h1:P+KtlWYdi0TY2NpPWao6vUOSGle40VpuHnYn7T1WolQ= -github.com/projectcalico/libcalico-go v1.7.2-0.20200609222740-c6639bd64a77 h1:OLQasnarqPHp2tleZGG1IkXRSc0vrkS+lZJfpDr2Fxg= -github.com/projectcalico/libcalico-go v1.7.2-0.20200609222740-c6639bd64a77/go.mod h1:P+KtlWYdi0TY2NpPWao6vUOSGle40VpuHnYn7T1WolQ= +github.com/projectcalico/libcalico-go v1.7.2-0.20200610195847-d341ca89a0af h1:9X5io6Tz4lyM0jBVCNX873F870GzMdpS1OlsACXj5K0= +github.com/projectcalico/libcalico-go v1.7.2-0.20200610195847-d341ca89a0af/go.mod h1:1RxboTOZJzpDYDvE03hMlf13b7gR0DPNcO7J/9uv6iY= github.com/projectcalico/logrus v0.0.0-20180701205716-fc9bbf2f5799 h1:9jp4YoHqZvEKDW3Z9464x/whSRCWEinIo4/JifaKR+g= github.com/projectcalico/logrus v0.0.0-20180701205716-fc9bbf2f5799/go.mod h1:DfgrchabbtEO9wjOz5lVae+XRvjFKKWEA9GTMme6A8g= github.com/projectcalico/pod2daemon v0.0.0-20191223184832-a0e1c4693271 h1:AOFOckD83tAIMQob6I1FpzSVs+Rn5Td701Q3/aQFqe8= github.com/projectcalico/pod2daemon v0.0.0-20191223184832-a0e1c4693271/go.mod h1:uPOJFzjHy8fnFn4BcVk87fCKsuwafYnCtaz28Wb7yYk= -github.com/projectcalico/typha v0.7.3-0.20200527211152-a1bf881f9cc4 h1:j/1Qd7cdpSd1iR21UIREvsygqqgH2K9/D3efW/Xq7Nc= -github.com/projectcalico/typha v0.7.3-0.20200527211152-a1bf881f9cc4/go.mod h1:GsholfXQWXxv8RHdqFLoq41GUjTF+WYM0VZwF/+TgAI= -github.com/projectcalico/typha v0.7.3-0.20200530040817-4cdbcfc02b4b h1:PxnTyiIF6GGVces/wAiubHR8uHaJ74Vc7pDDdJRvH4s= -github.com/projectcalico/typha v0.7.3-0.20200530040817-4cdbcfc02b4b/go.mod h1:DADm6GN5i1I+n0VCrSLLiaEMwIhSrv7glUHuDCHgu5o= -github.com/projectcalico/typha v0.7.3-0.20200601160722-b55a2f1ba49b h1:m/o1EcBGRCBShQce+kyFIixNAf6/bBugtX8/RjkiI3g= -github.com/projectcalico/typha v0.7.3-0.20200601160722-b55a2f1ba49b/go.mod h1:DADm6GN5i1I+n0VCrSLLiaEMwIhSrv7glUHuDCHgu5o= -github.com/projectcalico/typha v0.7.3-0.20200604041231-8008b7863673 h1:Czl6SSRiiV7PZvFrXdFCguojNPZ5+L1l+cXhC+VJU94= -github.com/projectcalico/typha v0.7.3-0.20200604041231-8008b7863673/go.mod h1:1JCNo9Zbsd1Dlnr9emZa5v9BqW/QeazNWplWRqB/vl0= -github.com/projectcalico/typha v0.7.3-0.20200605163503-074b94b91ff2 h1:UrrtOmJz/y0S4nDv0938z+vdK7hnvR1Rj04iqt2+uzA= -github.com/projectcalico/typha v0.7.3-0.20200605163503-074b94b91ff2/go.mod h1:9hRcaKCt0ACAo7X0F5lv4Eo6BaUMmiY03kfo8g4lZsg= -github.com/projectcalico/typha v0.7.3-0.20200609040740-1f53331676c0 h1:Wohi33JijEdJWDmg6C3e3Eg2ZAP5/YuHkfn/PC97q5o= -github.com/projectcalico/typha v0.7.3-0.20200609040740-1f53331676c0/go.mod h1:4divLId/R5AI6nintVek9SMowqBEmqQhA4WpwxHjw6o= -github.com/projectcalico/typha v0.7.3-0.20200610195605-14cf938c70e9 h1:5Vwe5Xt1i5xwH6/y3cRlWsjvrxd/j5CiYTjGTmMftas= -github.com/projectcalico/typha v0.7.3-0.20200610195605-14cf938c70e9/go.mod h1:b7CYgn/v4LDJsxUa6Rrh27uI9B/mQu4BKCmcVrMLx5k= -github.com/prometheus/client_golang v0.0.0-20171005112915-5cec1d0429b0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/projectcalico/typha v0.7.3-0.20200610223356-d5ba5f68c21e h1:P8WXvojKNsfVDps1HWh1OYl4Y7Dk72URdvCQqL6ZVvU= +github.com/projectcalico/typha v0.7.3-0.20200610223356-d5ba5f68c21e/go.mod h1:RMu+bb0G24CIhQfGDC3Nxs2TggGCI77NRnJfGfRhOnw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20171104095907-e3fb1a1acd76/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20190416093430-c873fb1f9420 h1:xyu41rG5IiIw9ZkHVLB917q/7yDXyBoEIS/Iv2sTQOE= -github.com/prometheus/common v0.0.0-20190416093430-c873fb1f9420/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20171017214025-a6e9df898b13/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -639,6 +608,8 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200401174654-e694b7bb0875 h1:C7kWARE8r64ppRadl40yfNo6pag+G6ocvGU2xZ6yNes= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200401174654-e694b7bb0875/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= diff --git a/ipsets/ipset_defs.go b/ipsets/ipset_defs.go index 8bb05f3cde..6670d1a601 100644 --- a/ipsets/ipset_defs.go +++ b/ipsets/ipset_defs.go @@ -24,6 +24,8 @@ import ( "fmt" "strconv" + cprometheus "github.com/projectcalico/libcalico-go/lib/prometheus" + "github.com/projectcalico/felix/ip" "github.com/projectcalico/felix/labelindex" "github.com/projectcalico/libcalico-go/lib/set" @@ -50,7 +52,7 @@ var ( Name: "felix_ipset_lines_executed", Help: "Number of ipset operations executed.", }) - summaryExecStart = prometheus.NewSummary(prometheus.SummaryOpts{ + summaryExecStart = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_exec_time_micros", Help: "Summary of time taken to fork/exec child processes", }) diff --git a/iptables/lock.go b/iptables/lock.go index 4bacc0c7a9..17338ddd1e 100644 --- a/iptables/lock.go +++ b/iptables/lock.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2020 Tigera, Inc. All rights reserved. // Copyright 2017 The Kubernetes Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,10 +30,12 @@ import ( "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" "golang.org/x/sys/unix" + + cprometheus "github.com/projectcalico/libcalico-go/lib/prometheus" ) var ( - summaryLockAcquisitionTime = prometheus.NewSummary(prometheus.SummaryOpts{ + summaryLockAcquisitionTime = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_iptables_lock_acquire_secs", Help: "Time in seconds that it took to acquire the iptables lock(s).", }) diff --git a/routetable/route_table.go b/routetable/route_table.go index db4f42fd1c..c952d56a35 100644 --- a/routetable/route_table.go +++ b/routetable/route_table.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2020 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,6 +30,8 @@ import ( "github.com/projectcalico/felix/conntrack" "github.com/projectcalico/felix/ifacemonitor" "github.com/projectcalico/felix/ip" + cprometheus "github.com/projectcalico/libcalico-go/lib/prometheus" + netlinkshim "github.com/projectcalico/felix/netlink" timeshim "github.com/projectcalico/felix/time" "github.com/projectcalico/libcalico-go/lib/set" @@ -51,11 +53,11 @@ var ( ipV6LinkLocalCIDR = ip.MustParseCIDROrIP("fe80::/64") - listIfaceTime = prometheus.NewSummary(prometheus.SummaryOpts{ + listIfaceTime = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_route_table_list_seconds", Help: "Time taken to list all the interfaces during a resync.", }) - perIfaceSyncTime = prometheus.NewSummary(prometheus.SummaryOpts{ + perIfaceSyncTime = cprometheus.NewSummary(prometheus.SummaryOpts{ Name: "felix_route_table_per_iface_sync_seconds", Help: "Time taken to sync each interface", })