Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions data/data/agent/files/usr/local/bin/set-node-zero.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ done
if [ "${IS_NODE_ZERO}" = "true" ]; then
echo "Node 0 IP ${NODE_ZERO_IP} found on this host" 1>&2

# Create tls certs, if they don't exist, via the installer command.
# This allows the certs to be created at run-time, e.g. when installed via the UI
AGENT_TLS_DIR=/opt/agent/tls
if [ -z $(ls -A "$AGENT_TLS_DIR") ]; then
. /usr/local/bin/release-image.sh
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be worth echoing a message, to leave a trace in the journal that the certs have been lazily generated (for troubleshooting)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably the installer will log something.

IMAGE=$(image_for installer)
/usr/bin/podman run --privileged -v /tmp:/assets --rm "${IMAGE}" agent create certificates --dir=/assets
cp /tmp/tls/* $AGENT_TLS_DIR
fi

Comment thread
bfournie marked this conversation as resolved.
Outdated
NODE0_PATH=/etc/assisted/node0
mkdir -p "$(dirname "${NODE0_PATH}")"

Expand Down