Handle if CA cert with alias already exists for Minion

Description

The problem occurs when the Minion Docker container is set to load custom CA certificates via minion-server-certs.env.

In this case the container starts fine initially, however on restart the entrypoint scripts attempts to add the certificate again, however this fails as a certificate with the same alias already exists, so the container fails to start.

Removing and recreating the container fixes this issue until the next restart.

The error in shown in docker logs is:

keytool error: java.lang.Exception: Certificate not imported, alias <ca-certificate.pem> already exists

Contents of minion-server-certs.env (mounted into the Minion "overlay" directory):

ca-certificate.pem

The file ca-certificate.pem is a PEM formatted CA certificate that is mounted into the "server-certs" location on the Minion container.

Environment

Docker container

Acceptance / Success Criteria

None

Activity

Chandra Gorantla February 4, 2025 at 4:03 PM

PR from Andrew Heberle :

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created January 15, 2025 at 2:15 AM
Updated February 4, 2025 at 4:03 PM