Comments (3)
Hi,
the driver attempts to create a remote key corresponding with the local public key. Apparently, hetzner disallows the creation of keys with the same fingerprint; I did not know this until now, perhaps this is worth mentioning in the README.
As a workaround, I'd suggest creating the public key manually and refer to it using --hetzner-existing-key-id
.
Of course, we could simply add a heuristic searching for an existing key by fingerprint, if --hetzner-existing-key-path
is passed, but IMHO this will create issues downstream. When not passed --hetzner-existing-key-id
. the driver attempts to also destroy the key on machine destruction.
Now suppose we had this heuristic, someone could create machine-a
, thereby creating a managed key k
. Then machine-b
is created and uses the existing k
in unmanaged mode, as it is found by fingerprint. Attempting to destroy machine-a
now will not work anymore, as it will be unable to delete k
.
I don't have a good solution for this problem right now, but the workaround of passing the ID should get you up and running for now.
from docker-machine-driver-hetzner.
Thanks for your answer !
I implemented the search for an existing key by fingerprint, then created successfully 2 machines. Attempting to destroy machine-a
works (the key is deleted from Hetzner, even if it's still used by machine-b
). Destroying machine-b
also works !
I only changed the Create() function, I will open a WIP pull request so you can see my changes
from docker-machine-driver-hetzner.
Thank you very much for investigating this further; apparently there was some confusion on my side. While I'm positive I've faced some referential integrity issues in the past, either Hetzner changed something or -- most likely -- I got things mixed up. Nonetheless, thank you for pushing for a solution despite my negative and, as it turns out, wrong answer.
Your PR looks good in general, but I've added a few comments. You can try and resolve them yourself; don't hesitate to let me know if you need help or want me to make the requested changes.
from docker-machine-driver-hetzner.
Related Issues (20)
- wrong naming of wait-on-error HOT 4
- make driver rancher compatible HOT 1
- image has incompatible architecture HOT 2
- Support int64 IDs HOT 1
- panic: runtime error: invalid memory address or nil pointer dereference HOT 7
- unknown location / unable to find ssh-keys HOT 2
- Provide fallback server type HOT 3
- Hetzner: Cloud API Change: GET /actions endpoint HOT 2
- Error creating machine HOT 13
- Lots of machines in cloud but only a few in docker-machine HOT 3
- Rancher - error scaling up servers HOT 7
- Rancher - VMs are not removed from Hetzner, when got storage
- Rancher - It is not possible to create Node/Clusters using RKE2/K3s, only RKE1 is available HOT 6
- Wait on srv.NextActions after creating server HOT 3
- Apple M3 Max HOT 1
- Fleeting plugin for Hetzner HOT 3
- Problem with Rancher when scaling up HOT 2
- No UI in Rancher after 3.8.1 HOT 3
- Hetzer debian/ubuntu provisioning fails HOT 4
- Suggestion: `--hetzner-user-data-from-file` could be string instead of boolean HOT 4
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 docker-machine-driver-hetzner.