Giter Club home page Giter Club logo

Comments (6)

JonasProgrammer avatar JonasProgrammer commented on May 30, 2024

Hi,

sorry for the assigment, that was fat-fingered...

I'll have a look at this in the next days. Setting an existing placement group or creating it as required should not be a problem -- that's basically what we do with SSH-keys.

I beg to differ regarding the default behaviour, however. First of all, that would be a breaking change, as more resources are created by default, and I don't see that feature justifying a major version bump. Also, the default seems underspecified to me: What, if I just create some short-lived machines for development? What happens, when I deal with multiple clusters? The driver binary is only ever invoked for actions performed on a certain machine, so a 'shared mind' is not really feasible.

What I could offer as a compromise: Perhaps a --hetzner-auto-spread flag could be added, that is mutually exclusive with specifying a placement group and just spreads the machines in a well-known group specific to docker-machine. If you do want your 'spread-by-default' then, just set the corresponding env var in your profile.

Would that be feasible for your use case?

from docker-machine-driver-hetzner.

anebi avatar anebi commented on May 30, 2024

Hi,

I didn't give much thinking on the best way of dealing with the placement groups and how the process should go. I am OK with any solution you could provide actually. I thought that default behaviour of placing nodes into a placing group would be good from stability point no matter of the environment or how many clusters are deployed.

When i think now, in reallity we don't really need placement group per cluster, because a single placement group should be more than enough for all machines that require spreading.

So what we could have maybe is to have a flag that will define if we want to use a placement group or not, and then if there are existing groups to have a list where we can select which one to be used, or if there is no existing group then to create one.

In any case, any solution is ok for me. I don't have any special requirements to be honest :)

Thanks and regards,
Ali

from docker-machine-driver-hetzner.

JonasProgrammer avatar JonasProgrammer commented on May 30, 2024

So I have tried to accommodate your use case as well as the manual selection. The cross-machine nature of placement groups made things a little more difficult, but generally speaking, auto-created PGs should be deleted when their last server is -- and existing ones be left untouched.

Can you verify #73 matches your needs? Prebuilt binaries available in here

from docker-machine-driver-hetzner.

anebi avatar anebi commented on May 30, 2024

Hi,

Thank you for fast implementation. I did some tests for both functionalities:
- autocreating of the placement group and getting the instances assigned to that group - worked fine
- assigning a new instance to an existing group - worked fine

What i noticed is that the autocreated placement group didn't get removed automarically once the last instance was removed/deleted using the docker-machine (stop & rm). This is the only thing that might require an extra check. Of course, only if you want to auto delete that autocreated group.

Otherwise looks fine to me.

Thanks again and best regards,
Ali Nebi

from docker-machine-driver-hetzner.

JonasProgrammer avatar JonasProgrammer commented on May 30, 2024

Hi,

thanks for testing this so quickly. I tried to reproduce your issue, but I think the root cause here was a timing problem: When you kill docker-machine too early in the creation process and try to remove the server, it seems sometimes the placement group information is either missing or outdated.

I did manage to reproduce it once, but with some time between creation/deletion and deletions of different machines, everything worked as expected. I'm not entirely sure how to approach this; simply adding some sleeps in the hopes of getting the timing right seems hacky to me.

If that is not a major concern, I'd merge for now as-is, especially with placement groups being free of charge. Should that change in the future, this may need further addressing.

Best regards
Jonas

from docker-machine-driver-hetzner.

anebi avatar anebi commented on May 30, 2024

I don't think that this is an issue at all. It doesn't harm by anyway even if it stays empty :)

I believe that It should be fine to merge and make this feature available as it is.

Thanks again and best regards,
Ali

from docker-machine-driver-hetzner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.