keystone charm
Giuseppe Attardi
giuseppe.attardi at garr.it
Tue Nov 7 11:57:00 UTC 2017
I run into a problem when adding a unit to keystone.
The log shows this;
2017-11-07 11:18:11 DEBUG leader-settings-changed File "/var/lib/juju/agents/unit-keystone-ba1-cl2-14/charm/hooks/leader-settings-changed", line 675, in leader_settings_changed
2017-11-07 11:18:11 DEBUG leader-settings-changed update_all_identity_relation_units()
2017-11-07 11:18:11 DEBUG leader-settings-changed File "/var/lib/juju/agents/unit-keystone-ba1-cl2-14/charm/hooks/leader-settings-changed", line 353, in update_all_identity_relation_units
2017-11-07 11:18:11 DEBUG leader-settings-changed CONFIGS.write_all()
2017-11-07 11:18:11 DEBUG leader-settings-changed File "/var/lib/juju/agents/unit-keystone-ba1-cl2-14/charm/hooks/charmhelpers/contrib/openstack/templating.py", line 285, in write_all
2017-11-07 11:18:11 DEBUG leader-settings-changed [self.write(k) for k in six.iterkeys(self.templates)]
2017-11-07 11:18:11 DEBUG leader-settings-changed File "/var/lib/juju/agents/unit-keystone-ba1-cl2-14/charm/hooks/charmhelpers/contrib/openstack/templating.py", line 276, in write
2017-11-07 11:18:11 DEBUG leader-settings-changed with open(config_file, 'wb') as out:
2017-11-07 11:18:11 DEBUG leader-settings-changed IOError: [Errno 2] No such file or directory: '/etc/keystone/keystone.conf'
2017-11-07 11:18:11 ERROR juju.worker.uniter.operation runhook.go:107 hook "leader-settings-changed" failed: exit status 1
and indeed the directory /etc/keystone is still missing.
I am using Juju 2.2.4 and a variant of the keystone charm from stable/17.08.
I solved the problem by adding:
from charmhelpers.core.host import (mkdir) # Attardi
mkdir(os.path.dirname(config_file)) # Attardi
in templating.py before line 276.
Doing so should be no harm, but I wonder whether this is the right solution.
— Beppe
More information about the Juju
mailing list