Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions packaging/bootc.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ RUN ${REPO_CONFIG_SCRIPT} -create ${USHIFT_RPM_REPO_PATH} && \
rm -rvf ${USHIFT_RPM_REPO_PATH} && \
dnf clean all

# Pin the greenboot package to 0.15.z until the following issue is resolved:
# https://github.com/fedora-iot/greenboot-rs/issues/132
RUN dnf install -y 'greenboot-0.15.*' && dnf clean all

# Post-install MicroShift configuration
COPY --chmod=755 ./src/rpm/postinstall.sh ${USHIFT_POSTINSTALL_SCRIPT}
RUN ${USHIFT_POSTINSTALL_SCRIPT} && rm -vf "${USHIFT_POSTINSTALL_SCRIPT}"
Expand Down
22 changes: 21 additions & 1 deletion src/cluster_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ _add_node() {
mount_opts="--volume ${EXTRA_CONFIG}:/etc/microshift/config.d/api_server.yaml:ro"
fi

local rc=0
# shellcheck disable=SC2086
sudo podman run --privileged -d \
--ulimit nofile=524288:524288 \
Expand All @@ -134,7 +135,26 @@ _add_node() {
--hostname "${name}" \
"${USHIFT_IMAGE}"

return $?
rc=$?
if [ $rc -ne 0 ]; then
return $rc
fi

# Wait up to 60 seconds for the container to activate the dbus service.
# It is necessary to prevent subsequent systemctl commands to fail with dbus errors.
local is_active=false
for _ in {1..60}; do
if sudo podman exec -i "${name}" systemctl is-active -q dbus.service ; then
is_active=true
break
fi
sleep 1
done
if [ "${is_active}" = "false" ]; then
echo "ERROR: The container did not activate the dbus service within 60 seconds"
return 1
fi
return 0
}


Expand Down
4 changes: 4 additions & 0 deletions src/quickrpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ function install_rpms() {
dnf install -y --setopt=install_weak_deps=False \
microshift microshift-kindnet microshift-topolvm
"${WORKDIR}/create_repos.sh" -delete

# Pin the greenboot package to 0.15.z until the following issue is resolved:
# https://github.com/fedora-iot/greenboot-rs/issues/132
dnf install -y 'greenboot-0.15.*'
}

function prepare_lvm_disk() {
Expand Down
Loading