Skip to content

Fix mxstartup problems #6

Merged
merged 3 commits into from Jan 4, 2019
Merged

Fix mxstartup problems #6

merged 3 commits into from Jan 4, 2019

Conversation

donald
Copy link
Contributor

@donald donald commented Jan 3, 2019

Fix startup problem identified after the power cut reboot.

Although the error on argh was introduced by a obsolete systemctl command in /usr/bin, which was removed, there are other errors which could happen to systemctl start UNIT e.g. a misstyped service name. The results are severe (all mxstartup services get killed again) , so I still want to handle errors.

For a test you can check out this branch and run the appended script.

This goes together with a little cleanup. I've merged #5 today, so #5 is in the master, but has not been updated via bee on the distmaster. So the script contains commands to convert from the distmaster installed versions to this branch.

#! /bin/bash

if [ "$(git symbolic-ref --short HEAD)" != fix-mxstartup-problems ]; then
	echo "Please checkout fix-mxstartup-problems"
	exit 1
fi

systemctl disable mxstartup-systemd.service
rm /etc/systemd/system/mxstartup-systemd.service
rm /usr/sbin/mxstartup.systemd

systemctl disable mxstartup-mxvip.service
rm /etc/systemd/system/mxstartup-mxvip.service

systemctl disable mxstartup-classic.service
rm /etc/systemd/system/mxstartup-classic.service

make install
systemctl enable mxstartup.service

systemctl daemon-reload

echo ""
echo "***************"
echo "On-disk changes done. For test reboot or ..."
echo ""
echo "  systemctl stop  mxstartup-mxvip mxstartup-classic "
echo "  systemctl start mxstartup"

This is not needed as a service, because mxstartupctl from
mxstartup-classic.service calls `mxvipctl start` by itself.

Remove this service.
If `systemctl start SERVICE` fails for whatever reasons,
mxservicectl, which is running with the -e option, immediately
exits with a non-zero exit status and doesn't attempt to
start later mxstartup services.

The exist status will also be the final exit status
of mxstartupctl. If mxstartupctl has been called from
mxstartup-classic.service, the service startup is regarded
as a failure and systemd kills all processes in the group,
which terminates all previously started mxstartup services.

Ignore exit status from `systemctl start SERVICE'.
The -classic postfix does no longer make any sense, because
we removed the other mxstartup related units.
@pmenzel pmenzel merged commit 06ba2f6 into master Jan 4, 2019
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants