twosigma / satellite

Satellite monitors, alerts on, and self-heals your Mesos cluster.
Apache License 2.0
143 stars 18 forks source link

Please use atomic filesystem operations to update the whitelist #64

Open rustyconover opened 8 years ago

rustyconover commented 8 years ago

It seems that the whitelist is written in such a way that the whitelist file is truncated then new whitelist is written to the same file. I determined this behavior by watching the whitelist and noticing that inode number never changes.

It would be better to create a new file, write the new whitelist contents there, then rename that new file to whitelist. This would be an atomic operation and there wouldn't be a time when the whitelist contained zero hosts which does happen now.

Thank you,

Rusty

mforsyth commented 8 years ago

Thanks for the report @rustyconover.