Skip to content

Instantly share code, notes, and snippets.

View zetaab's full-sized avatar

Jesse Haka zetaab

  • Feedtrail Inc
  • Helsinki
View GitHub Profile
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: thanos-compactor
namespace: monitoring
labels:
app: thanos-compactor
spec:
serviceName: thanos-compactor
replicas: 1
% kubectl logs thanos-compactor-0 -f
level=debug ts=2020-05-13T11:07:40.511042001Z caller=main.go:103 msg="maxprocs: Leaving GOMAXPROCS=[4]: CPU quota undefined"
level=info ts=2020-05-13T11:07:40.511374944Z caller=main.go:152 msg="Tracing will be disabled"
level=info ts=2020-05-13T11:07:40.511655783Z caller=factory.go:46 msg="loading bucket configuration"
level=info ts=2020-05-13T11:07:40.512608895Z caller=compact.go:522 msg="starting compact node"
level=info ts=2020-05-13T11:07:40.512661068Z caller=intrumentation.go:48 msg="changing probe status" status=ready
level=info ts=2020-05-13T11:07:40.512831351Z caller=intrumentation.go:60 msg="changing probe status" status=healthy
level=info ts=2020-05-13T11:07:40.512879547Z caller=http.go:56 service=http/server component=compact msg="listening for requests and metrics" address=0.0.0.0:10902
level=info ts=2020-05-13T11:07:40.512883946Z caller=compact.go:887 msg="start sync of metas"
level=debug ts=2020-05-13T11:07:41.44930719Z caller=fetcher.go:734 msg="block is too
2020-04-03 18:06:19.841 [INFO][1] main.go 87: Loaded configuration from environment config=&config.Config{LogLevel:"info", ReconcilerPeriod:"5m", CompactionPeriod:"10m", EnabledControllers:"node", WorkloadEndpointWorkers:1, ProfileWorkers:1, PolicyWorkers:1, NodeWorkers:1, Kubeconfig:"", HealthEnabled:true, SyncNodeLabels:true, DatastoreType:"kubernetes"}
2020-04-03 18:06:19.842 [INFO][1] k8s.go 228: Using Calico IPAM
W0403 18:06:19.842866 1 client_config.go:541] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
2020-04-03 18:06:19.843 [INFO][1] main.go 108: Ensuring Calico datastore is initialized
2020-04-03 18:06:19.868 [INFO][1] main.go 182: Starting status report routine
2020-04-03 18:06:19.868 [INFO][1] main.go 364: Starting controller ControllerType="Node"
2020-04-03 18:06:19.869 [INFO][1] node_controller.go 133: Starting Node controller
2020-04-03 18:06:19.969 [INFO][1] node_controller.go 146: Node controller is now running
2020-04-03 18:06:20.001
I0403 18:31:39.888920 103 instancegroups.go:268] Cluster did not pass validation, will try again in "30s" until duration "20m0s" expires: machine "i-049ef8fce8b1dbc0f" has not yet joined cluster, kube-system pod "kube-controller-manager-ip-172-20-72-244.eu-north-1.compute.internal" is pending.
W0403 18:32:10.305321 103 aws_cloud.go:666] ignoring instance as it is terminating: i-0d6474588a05645ea in autoscaling group: master-eu-north-1c.masters.awsupdtest.k8s.local
I0403 18:32:10.376250 103 instancegroups.go:268] Cluster did not pass validation, will try again in "30s" until duration "20m0s" expires: machine "i-049ef8fce8b1dbc0f" has not yet joined cluster.
W0403 18:32:40.260965 103 aws_cloud.go:666] ignoring instance as it is terminating: i-0d6474588a05645ea in autoscaling group: master-eu-north-1c.masters.awsupdtest.k8s.local
I0403 18:32:40.339866 103 instancegroups.go:268] Cluster did not pass validation, will try again in "30s" until duration "20m0s" expires: machine "i-049ef8fce8b1dbc0
mydb=> EXPLAIN ANALYZE SELECT "main_feedbacks"."id", "main_feedbacks"."createtime" FROM "main_feedbacks" WHERE ("main_feedbacks"."customer_id" = 513 AND "main_feedbacks"."ignore" = False) ORDER BY "main_feedbacks"."id" DESC LIMIT 20;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=0.42..5113.42 rows=20 width=12) (actual time=18.027..30545.848 rows=19 loops=1)
-> Index Scan Backward using main_feedbacks_pkey on main_feedbacks (cost=0.42..444830.83 rows=1740 width=12) (actual time=18.026..30545.834 rows=19 loops=1)
Filter: ((NOT ignore) AND (customer_id = 513))
Rows Removed by Filter: 473698
Planning Time: 0.142 ms
Execution Time: 30546.834 ms
(6 rows)
# Generated by iptables-save v1.8.2 on Fri Oct 25 05:37:18 2019
*mangle
:PREROUTING ACCEPT [5336:400836]
:INPUT ACCEPT [30288:68916983]
:FORWARD ACCEPT [45986:44672496]
:OUTPUT ACCEPT [31329:10883706]
:POSTROUTING ACCEPT [77313:55556122]
:cali-PREROUTING - [0:0]
:cali-failsafe-in - [0:0]
:cali-from-host-endpoint - [0:0]
2019-10-25 05:12:49.518 [INFO][9] startup.go 255: Early log level set to info
2019-10-25 05:12:49.518 [INFO][9] startup.go 271: Using NODENAME environment for node name
2019-10-25 05:12:49.518 [INFO][9] startup.go 283: Determined node name: nodes-z2-1-dbaas-test-k8s-local
2019-10-25 05:12:49.520 [INFO][9] k8s.go 228: Using Calico IPAM
2019-10-25 05:12:49.520 [INFO][9] startup.go 315: Checking datastore connection
2019-10-25 05:12:49.537 [INFO][9] startup.go 339: Datastore connection verified
2019-10-25 05:12:49.537 [INFO][9] startup.go 94: Datastore is ready
2019-10-25 05:12:49.547 [INFO][9] startup.go 381: Initialize BGP data
2019-10-25 05:12:49.548 [INFO][9] startup.go 583: Using autodetected IPv4 address on interface eth0: 10.1.64.8/19
2019-10-25 05:12:49.548 [INFO][9] startup.go 451: Node IPv4 changed, will check for conflicts
# Generated by iptables-save v1.8.2 on Fri Oct 25 05:37:25 2019
*mangle
:PREROUTING ACCEPT [6490:530430]
:INPUT ACCEPT [26833:78023687]
:FORWARD ACCEPT [56003:38719814]
:OUTPUT ACCEPT [21100:7216391]
:POSTROUTING ACCEPT [77103:45936205]
:cali-PREROUTING - [0:0]
:cali-failsafe-in - [0:0]
:cali-from-host-endpoint - [0:0]
2019-10-25 05:12:44.849 [INFO][8] startup.go 255: Early log level set to info
2019-10-25 05:12:44.849 [INFO][8] startup.go 271: Using NODENAME environment for node name
2019-10-25 05:12:44.849 [INFO][8] startup.go 283: Determined node name: nodes-z3-1-dbaas-test-k8s-local
2019-10-25 05:12:44.853 [INFO][8] k8s.go 228: Using Calico IPAM
2019-10-25 05:12:44.855 [INFO][8] startup.go 315: Checking datastore connection
2019-10-25 05:12:44.867 [INFO][8] startup.go 339: Datastore connection verified
2019-10-25 05:12:44.867 [INFO][8] startup.go 94: Datastore is ready
2019-10-25 05:12:44.874 [INFO][8] startup.go 381: Initialize BGP data
2019-10-25 05:12:44.875 [INFO][8] startup.go 583: Using autodetected IPv4 address on interface eth0: 10.1.96.9/19
2019-10-25 05:12:44.875 [INFO][8] startup.go 451: Node IPv4 changed, will check for conflicts
not working:
# iptables -nv -t nat -L POSTROUTING
Chain POSTROUTING (policy ACCEPT 1 packets, 60 bytes)
pkts bytes target prot opt in out source destination
727K 45M cali-POSTROUTING all -- * * 0.0.0.0/0 0.0.0.0/0 /* cali:O3lYWMrLQYEMJtB5 */
606K 38M CNI-HOSTPORT-MASQ all -- * * 0.0.0.0/0 0.0.0.0/0 /* CNI portfwd requiring masquerade */
608K 38M KUBE-POSTROUTING all -- * * 0.0.0.0/0 0.0.0.0/0 /* kubernetes postrouting rules */
0 0 MASQUERADE all -- * !docker0 172.17.0.0/16 0.0.0.0/0