Comment 4 for bug 2051569

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

I *think* the bug is a race in the config rendering in designate in:

    def render_full_config(self, interfaces_list):
        """Render all config for Designate service

        @returns None
        """
        # Render base config first to ensure Designate API is responding as
        # sink configs rely on it.
        self.render_base_config(interfaces_list)
        self.render_with_interfaces(interfaces_list)

It calls render twice, which potentially involves two restarts.

However, it looks like `configure_tls(...)` function in charms.openstack does a `service_reload('apache2')` as part of configuring certs to try a restart apache2 when the certs have been written.

So the issue appears to be:

The apache2 config is written with the cert info and then apache2 is restarted BEFORE the cert file is written to disk, and this is some kind of race or logic error as it doesn't happen EVERY time.

This might be due to the ordering of charms.reactive calls to handlers that occur and when a file gets written vs when certificates get configured.