Comment 0 for bug 1609899

Revision history for this message
Nathan Grennan (9-ubuntuone-g) wrote :

  Cloud-init's salt minion module writes minion.pem, and minion.pub to the wrong directory. Salt-minion expects them in /etc/salt/pki/minion, but /etc/salt/pki is used by cloud-init's salt minion module. Somehow in the past this worked out, and the files would be moved to /etc/salt/pki/minion. This part I don't understand, but currently on Ubuntu 16.04 Xenial with cloud-init 0.7.7 it doesn't work out. What happens is cloud-init writes to /etc/salt/pki, and salt-minion ignores the /etc/salt/pki files and writes it's own /etc/salt/pki/minion files. This results in the salt minion generated keys being rejected by the salt master.

Current:
pki_dir = salt_cfg.get('pki_dir', '/etc/salt/pki')

Fixed:
pki_dir = salt_cfg.get('pki_dir', '/etc/salt/pki/minion')