Skip to content

Commit

Permalink
compat: SPAAS connectivity check
Browse files Browse the repository at this point in the history
Before trying to invoke spatch-as-a-service (and possibly failing
later), we want to know whether or not we can actually reach the
service. For this, a new endpoint was implemented on the server side;
use this when building drbd.
  • Loading branch information
chrboe committed Apr 7, 2020
1 parent 5dd220a commit b574620
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drbd/drbd-kernel-compat/gen_compat_patch.sh
Expand Up @@ -111,6 +111,15 @@ else
echo " be patient, may take up to 10 minutes"
echo " if it is in the server side cache it might only take a second"
echo " SPAAS $chksum"

# check if SPAAS is even reachable
if ! curl -fsS https://drbd.io:2020/api/v1/hello; then
echo " ERROR: SPAAS is not reachable! Please check if your network"
echo " configuration or some firewall prohibits access to "
echo " https://drbd.io:2020."
exit 1
fi

REL_VERSION=$(sed -ne '/^\#define REL_VERSION/{s/^[^"]*"\([^ "]*\).*/\1/;p;q;}' linux/drbd_config.h)
rm -f $compat_patch.tmp.header $compat_patch.tmp
if ! base64 $incdir/compat.h |
Expand Down

0 comments on commit b574620

Please sign in to comment.