Charm should either block or mkdir if dir_certs or dir_keys does not exist

Bug #1791882 reported by Barry Price
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autocert-charm
Fix Released
Undecided
Unassigned

Bug Description

If the charm is configured with dir_certs/dir_keys pointing to a directory that does not exist, the charm will install as normal but the daily cron job will fail.

The Nagios check will alert on this, if configured, but the charm should be more proactive here.

I'd favour a mkdir -p if any given configured dir doesn't exist. But if there's a good reason not to do that, then we should at least block and/or warn via unit status.

Revision history for this message
Joel Sing (jsing) wrote :

This was already fixed in commit 50a680e38a9719808ef80138adb740e824d2ea5d.

https://git.launchpad.net/autocert-charm/commit/?id=50a680e38a9719808ef80138adb740e824d2ea5d

Changed in autocert-charm:
status: New → Fix Released
Revision history for this message
Barry Price (barryprice) wrote :

Quite right - what I was actually seeing was the charm correctly doing its mkdir, but then the kubernetes-master charm doing a corresponding and unfortunate rmdir:

https://github.com/kubernetes/kubernetes/blob/master/cluster/juju/layers/kubernetes-master/reactive/kubernetes_master.py#L252

Keeping the certs/keys outside of /etc/kubernetes (or any other dir in the above linked snipped) solves this problem.

Not an autocert-charm bug, anyway.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.