Code Monkey home page Code Monkey logo

Comments (16)

tlaguz avatar tlaguz commented on June 14, 2024 4

How can I disable host renaming?

from machine.

bfirsh avatar bfirsh commented on June 14, 2024

There was some discussion about this on IRC. I also went back and forth on this with @tianon a while back.

I think the original reasoning was that:

  1. We don't want name conflicts.
  2. Renaming hosts is a pain.

I agree though, it's a bit odd having hostnames set automatically. Maybe we can assume that the hostname is going to be incorrect if you rename a machine. Or perhaps we don't allow you to rename a machine. Or perhaps we only give machines automatically generated names if the provider makes renaming difficult.

from machine.

robhaswell avatar robhaswell commented on June 14, 2024

The purpose of this issue is really to be able to identify machines from the prompt when logged in via machine ssh, maybe it would help to re-open this issue in that context?

from machine.

ehazlett avatar ehazlett commented on June 14, 2024

I like the idea of having the host match the machine. Perhaps we forbid the rename? This would follow Docker as well as far as names.

from machine.

thaJeztah avatar thaJeztah commented on June 14, 2024

If this is to identify a machine, perhaps the new "labels" and "name" properties should be looked at. If I understood those correctly, they were added by the "Swarm" team to be able to identify a specific host in the cluster. There's still one PR open to manage this; moby/moby#9571

And this is the PR for labels (which is in the 1.4 release): moby/moby#9265

Edit: Added link to "labels" PR

from machine.

robhaswell avatar robhaswell commented on June 14, 2024

Specifically I was concerned with identifying the machine from the prompt. That doesn't necessarily mean setting the hostname - an alternative would be to customise the prompt, for example.

from machine.

bfirsh avatar bfirsh commented on June 14, 2024

We can have renaming where renaming is possible. If a driver can't do renames, it can just throw an error.

from machine.

ehazlett avatar ehazlett commented on June 14, 2024

+1

On Monday, December 15, 2014, Ben Firshman [email protected] wrote:

We can have renaming where renaming is possible. If a driver can't do
renames, it can just throw an error.

β€”
Reply to this email directly or view it on GitHub
#59 (comment).

from machine.

sthulb avatar sthulb commented on June 14, 2024

If I've read this issue correctly, the implementation should be:

  1. Set a hostname on creation
  2. add machine move/rename which will change a machine's name in the internal data store and change the hostname
  3. For move/rename: Error if the name is taken in the internal data store.

from machine.

bfirsh avatar bfirsh commented on June 14, 2024

I don't think renaming is necessary to start with - that's already being worked on here #59

At the moment we give hostnames long random names. I think we should set the name on the provider to be the name given by the user, which normally is also the hostname given to the machine. For example – when you create a droplet on digital ocean, you give it a name, which is also used by the hostname.

from machine.

bfirsh avatar bfirsh commented on June 14, 2024

Another thing to be aware of: the name given by the user might already exist on the provider. We should display useful error messages about this.

from machine.

sthulb avatar sthulb commented on June 14, 2024

I absolutely agree with setting the name on the provider too. Things like EC2 won't care since the unique criteria will be the instance id.

As per:

I don't think renaming is necessary to start with - that's already being worked on here #59

That's this issue :)

from machine.

ehazlett avatar ehazlett commented on June 14, 2024

+1 for setting the name / hostname on the provider if supported. I agree to leave renaming / moving out of this one -- I believe bfirsh meant #30 is being worked on for that.

from machine.

sthulb avatar sthulb commented on June 14, 2024

I'll give it a go :)

from machine.

bfirsh avatar bfirsh commented on June 14, 2024

Oh whoops, yes, wrong issue. Sorry.

Thanks @sthulb!

from machine.

ehazlett avatar ehazlett commented on June 14, 2024

Closing as #219 has been merged.

from machine.

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.