After the debugging session via comments to the original question, we found out what the issue is.
When using a self-signed certificate, the apache2 charm had a bug where it would generate such a certificate with only 30 days of validity.
What happened is that it expired. This was fixed in a newer version of the charm, so what we will do is upgrade to that and trigger a new certificate generation.
Please follow these steps to upgrade the charm and regenerate the certificate:
juju ssh apache2/0 'sudo rm -f /etc/ssl/certs/apache2.cert /etc/ssl/private/apache2.key /etc/ssl/certs/landscape_server_ca.crt'.
juju upgrade-charm apache2. This will upgrade the charm, and the new charm, once it sees there are no certificates (deleted in the first step), will generate a new pair.
- Watch the output of
juju debug-log until it quiets down.
juju ssh apache2/0 'sudo service apache2 restart' (I will file a bug about this step: it shouldn't be needed, but is right now)
Now we need to tell the clients about this new certificate. This is a bit trickier, because the clients are running in another juju environment which exists on the landscape/0 unit, inception-like. Follow these steps:
- Grab the new certificate:
juju scp apache2/0:/etc/ssl/certs/apache2.cert .
- Make sure permissions are 0644:
chmod 0644 apache2.cert
- Verify it expires 10 years from now:
openssl x509 -in apache2.cert -noout -enddate
- Upload it to landscape/0:
juju scp apache2.cert landscape/0:/tmp
- Login on landscape/0:
juju ssh landscape/0
- Change the landscape user shell:
sudo chsh -s /bin/bash landscape
- Become landscape:
sudo -u landscape -i
- Point to the cloud juju environment:
export JUJU_HOME=/var/lib/landscape/juju-homes/$(ls -1t /var/lib/landscape/juju-homes/|head -n 1)
- Run this to confirm juju is working in that environment:
juju status. You should see a lot of OpenStack services
- Tell landscape-client about the new certificate:
juju set landscape-client ssl-public-key="base64:$(cat /tmp/apache2.cert|base64)"
- Watch the output of
juju debug-log until it quiets down
- Restart landscape-client everywhere:
juju run --service landscape-client 'sudo service landscape-client restart'
- If the above command fails with something about subordinate services not being supported, run this instead:
juju run --all 'sudo service landscape-client restart'
You can login on a client and tail -f the broker.log file, see if the SSL error persists.