Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some clients are using the same "id" #3

Closed
one-three-three-seven opened this issue Feb 10, 2018 · 10 comments
Closed

Some clients are using the same "id" #3

one-three-three-seven opened this issue Feb 10, 2018 · 10 comments

Comments

@one-three-three-seven
Copy link

Because some servers are running with the same baseimage, these machines do have the same machine-id.

https://www.npmjs.com/package/node-machine-id

Take a look at "Caveats" at the bottom of the page.

@romansemko
Copy link

Added the caveat to the README. Thanks for pointing out!

@glumb
Copy link

glumb commented Feb 11, 2018

I am not sure if its a good idea to advise people to change their machine-id. Especially without a word of warning.

Why not generate some ID file .fiels_cli_id.txt, create a unique hash/ID on first execution and read it on successive program starts?

@romansemko
Copy link

Fair enough. Will need to think it through regarding generating custom ID file. I wanted to avoid it, to be honest.

@glumb
Copy link

glumb commented Feb 11, 2018

Is the MAC address sufficient for creating an id?

@one-three-three-seven
Copy link
Author

When you cloning a virtual machine these do have the same MAC, if not changed while cloning. (As example)

Best (and maybe only "safe") way is to use a random id.

@antonionardella
Copy link

Hi, I'm using docker images, and this images do not contain the /var/lib/dbus/machine-id or dbus-uuidgen therefore the ID cannot be created/renewed.

Any ideas?

@romansemko
Copy link

do you have /etc/machine-id ?

@antonionardella
Copy link

does not look like it is there:

/usr/src/field # ls /etc/

TZ               init.d/          network/         securetty
alpine-release   inittab          opt/             services
apk/             issue            os-release       shadow
conf.d/          localtime        passwd           shadow-
crontabs/        logrotate.d/     passwd-          shells
fstab            modprobe.d/      periodic/        ssl/
group            modules          profile          sysctl.conf
group-           modules-load.d/  profile.d/       sysctl.d/
hostname         motd             protocols        udhcpd.conf
hosts            mtab             resolv.conf

@MatthiasLohr
Copy link

The problem exists also with docker images,

@romansemko, what's the reason for avoiding it?

@romansemko
Copy link

Will add optional custom machine ID generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants