chrisurwin / rancher-rebalancer Goto Github PK
View Code? Open in Web Editor NEWA simple re-balancing service for Rancher cattle environments
A simple re-balancing service for Rancher cattle environments
When launching the docker container on Rancher 1.6.15, it stops immediately with an error saying CATTLE_URL is not set
I have a bunch of nodes with label worker = 1 and a bunch with worker = 0 that contains specifically placed services and no workloads, unfortunately, any affinity rules make the rebalancer skip the balancing.
Any way around this would be awesome :)
Ideas?
2018-01-01 21:49:45INFO[0000] Starting Rancher Rebalancer
2018-01-01 21:49:45INFO[0000] Operating Mode: Opt mode:
2018-01-01 21:49:45INFO[0000] Healthcheck handler is listening on :9777
2018-01-01 21:49:46INFO[0001] Service pxc only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service letsencrypt only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Not balancing gitlab due to affinity rules
2018-01-01 21:49:46INFO[0001] Service runner01 only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service lb2 only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service ghost3 only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service ranch2github only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service digitalocean only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service rancher-server only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service as-service only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service production-database only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service adserver only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service rancher-service only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service videoserver only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service as2 only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service video-service only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service prometheus-rancher-exporter only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service cdn only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service cdn-service only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service letsencrypt-almasdarnews only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service proxysql only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service pxc-service only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service ad-service only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service proxysql-alias only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service proxysql-alias only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service amlink only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service letsencrypt-aml only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service proxy only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Not balancing appserver due to affinity rules
2018-01-01 21:49:46INFO[0001] Service nginx-vts-exporter-proxy-amn only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service lb-amn only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service vpnlb2 only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service nginx-vts-exporter-proxy-amn only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service alertmanager only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service nginx only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service testappserver only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Not balancing influxdb due to affinity rules
2018-01-01 21:49:46INFO[0001] Service lb only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service testnginx only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service testproxy only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service rancher-alarms only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service testvideoserver only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service wordpress only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service testwordpress only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service production-database only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service nginx only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service ldap only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service ldap-admin only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service amn-appserver-lb only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service adminserver only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Service rebalancer only has 1 container, not balancing
2018-01-01 21:49:46INFO[0001] Currently processing service: cni-driver1s11
2018-01-01 21:49:47INFO[0002] Service is already balanced
2018-01-01 21:49:47INFO[0002] Currently processing service: node-exporter1s77
2018-01-01 21:49:49INFO[0003] Service is already balanced
2018-01-01 21:49:49INFO[0003] Currently processing service: cadvisor1s78
2018-01-01 21:49:50INFO[0005] Service is already balanced
2018-01-01 21:49:50INFO[0005] Currently processing service: grafana1s81
2018-01-01 21:49:51ERRO[0005] Error with container client connection
2018-01-01 21:49:51panic: runtime error: invalid memory address or nil pointer dereference
2018-01-01 21:49:51[signal 0xb code=0x1 addr=0x0 pc=0x40414d]
2018-01-01 21:49:51
2018-01-01 21:49:51goroutine 1 [running]:
2018-01-01 21:49:51panic(0x8ab100, 0xc82000a080)
2018-01-01 21:49:51 /usr/lib/go/src/runtime/panic.go:481 +0x3e6
2018-01-01 21:49:51main.serviceHosts(0xc8201c2410, 0x7, 0xc8201c2068, 0x4, 0xc8203719c0, 0x2, 0x4, 0xc82049f7d0, 0x1)
2018-01-01 21:49:51 /go/src/github.com/chrisurwin/rancher-rebalancer/rancher-functions.go:298 +0xf6d
2018-01-01 21:49:51main.rebalance(0xc820135e98)
2018-01-01 21:49:51 /go/src/github.com/chrisurwin/rancher-rebalancer/rancher-rebalancer.go:93 +0x2f9
2018-01-01 21:49:51main.main()
2018-01-01 21:49:51 /go/src/github.com/chrisurwin/rancher-rebalancer/rancher-rebalancer.go:74 +0x5c8
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.