After discussing with David, we've agreed to make the charm behave slightly better: only go through delete/create dance if the existing "image-stream" endpoint is set to a different URL. Since we expect swift address to remain the same during installation, at least we'll reduce the chance of such raciness.
Still, keystone charm should probably behave more atomically regarding this: once it fetches endpoint data, it should use it both for the check if it's defined and to generate the URL using the template.
After discussing with David, we've agreed to make the charm behave slightly better: only go through delete/create dance if the existing "image-stream" endpoint is set to a different URL. Since we expect swift address to remain the same during installation, at least we'll reduce the chance of such raciness.
Still, keystone charm should probably behave more atomically regarding this: once it fetches endpoint data, it should use it both for the check if it's defined and to generate the URL using the template.