deric / puppet-mesos

Puppet module for managing Mesos nodes
https://forge.puppetlabs.com/deric/mesos
Apache License 2.0
69 stars 61 forks source link

Adds notifier from credentials and acls files to services #92

Closed theosotr closed 5 years ago

theosotr commented 5 years ago

Hi!

This pull request adds notifiers from credentials_file and acls_file to services.

Determining whether authorization or authentication is enabled is done during the start of the service e.g., through the --credentials option. Then, the service reads the corresponding files. For example, you can see the system call that took place when the mesos-master fires up.

6112  open("/etc/mesos/master-credentials", O_RDONLY|O_CLOEXEC) = 7
6112  ioctl(7, TCGETS, 0x7ffc30844c60)  = -1 ENOTTY (Inappropriate ioctl for device)
6112  read(7, "{\"credentials\":[{\"principal\":\"some-principal\",\"secret\":\"some-secret\"}]}", 4096) = 71
6112  read(7, "", 4025)                 = 0
6112  read(7, "", 4096)                 = 0
6112  close(7)                          = 0

I would expect that whenever there is a change/update to those files, the services is notified.

deric commented 5 years ago

LGTM, thanks!