Comments (7)
Hi, thanks for the report!
Does "latest" mean v0.1.4
or master
?
Also, could you please paste the stacktrace?
from hcloud-ip-floater.
That was a fast reply! Sorry, I meant version "v0.1.4".
This is all I got:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6e7eba]
goroutine 84 [running]:
github.com/hetznercloud/hcloud-go/hcloud.(*FloatingIPClient).Assign(0xc000142248, 0x14db860, 0xc000046030, 0xc00058a640, 0x0, 0x0, 0xc0002118c0, 0x0, 0x0)
github.com/hetznercloud/[email protected]/hcloud/floating_ip.go:276 +0x3a
github.com/costela/hcloud-ip-floater/internal/fipcontroller.(*Controller).attachFIPToNode(0xc0002529a0, 0xc00058a640, 0xc000047730, 0x8, 0xc0000bc748, 0x1)
github.com/costela/hcloud-ip-floater@/internal/fipcontroller/fipcontroller.go:203 +0x10f
github.com/costela/hcloud-ip-floater/internal/fipcontroller.(*Controller).Reconcile.func1(0x0, 0x0, 0x0, 0x0)
github.com/costela/hcloud-ip-floater@/internal/fipcontroller/fipcontroller.go:153 +0x287
golang.org/x/sync/singleflight.(*Group).doCall(0xc000252a00, 0xc000588910, 0x1302267, 0xe, 0xc0005f6650)
golang.org/x/[email protected]/singleflight/singleflight.go:93 +0x2e
created by golang.org/x/sync/singleflight.(*Group).DoChan
golang.org/x/[email protected]/singleflight/singleflight.go:86 +0x2b4
from hcloud-ip-floater.
Could you please try v0.1.5-rc.1
?
from hcloud-ip-floater.
Using version 'v0.1.5-rc.1', the error message is gone, but I got the following new one, when the floating IP is not attached to the node where the "loadbalancer" service is listening on:
time="2020-05-20T09:31:14Z" level=error msg="could not attach floating IP" component=fipcontroller error="could not find node minion-1" fip=116.200.XXX.XXX node=minion-1
Unfortunately the controller does not switch the IP address itself. I had to do it manually, but there are no other logs.
Edit:
I have to correct myself, the message above is shown always, even if the ip is attached to the correct node. I also tried rc.2 but it seems nothing has changed.
Edit2:
minion-1 would be the correct node, but the local hostname (and the K8s nodename) differs from the name in the hetzner cloud. And I see requests against the wrong server name. Let me try to rename it in the web frontend.
From the debug output:
https://api.hetzner.cloud/v1/servers?name=minion-1&page
I was waiting for the pod to recheck the assignment, but it did not happend, maybe I had to wait a little bit longer. Then I switched the floating IP from the correct node to the wrong one and the controller wrotes:
time="2020-05-20T10:20:11Z" level=info msg="attached floating IP" component=fipcontroller fip=116.202.XXX.XXX node=minion-1
But nothing happend, the web UI continues to show that the IP was assigned to the wrong node (my choice).
But after I deleted the controller pod, the Ip was instantly assigned to the correct node! Many thanks. So a workaround would be, to rename all nodes in the hcloud UI by its hostname or vice versa. But to make it bulletproof, I'm sure there is a better method of getting the "real" name of the current node.
However, I appreciate your work!
from hcloud-ip-floater.
k8s node names must currently match the hcloud node names. This is the default behavior if no hostname renaming is taking place, but it should probably be better documented as a requirement.
There's unfortunately no other practicable way I'm aware of, for hcloud-ip-floater
to match a k8s node to a hcloud node. We could use node annotations for this, but then these would have to be managed during k8s provisioning. I'm not sure this is worth the trouble, because I can't think of a reason for node renaming.
What's your use-case for it? Maybe I'm missing something.
from hcloud-ip-floater.
Thank you, and sorry, I wasn't aware of, that the hostname must match. After a short dive into the hcloud API, I also didn't see an easy solution to get informations of the current node, if the hostname differs. I guess there isn't a real usecase, for using different namens :) That only happend to me, when I was changing my terraform templates. I reverted it, and everything works fine, I'm pretty happy with it!
from hcloud-ip-floater.
No need to apologize, that requirement wasn't documented anywhere until
836cc83! 😉
from hcloud-ip-floater.
Related Issues (17)
- Installation with kubectl failes HOT 5
- example on a service/ip HOT 11
- implement service controller HOT 4
- add optional MetalLB integration
- support for kubernets 1.20 HOT 6
- Dependabot can't resolve your Go dependency files
- Floating Ip Configuration HOT 3
- Add support for other cloud providers HOT 5
- Add support for dedicated hetzner servers (robot api) HOT 1
- Supporting multiple floating ips in a cluster HOT 2
- no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1" HOT 1
- Could not sync Floating IPs... HOT 1
- wrong Node assigned floating IP HOT 3
- Integration with nginx ingress? HOT 4
- arm64 image HOT 2
- Swarm and the old floater ip HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hcloud-ip-floater.