FIX Cluster join must use synthetic host name and CTDB must be running
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -64,11 +64,18 @@ if [ ! -f "$ETC_DIR/krb5.keytab" ]; then
|
||||
|
||||
rm -f "$ETC_DIR/smb.conf" /etc/krb5.conf
|
||||
|
||||
if [ "$CTDB_ENABLED" = "true" ]; then
|
||||
PREV_HOSTNAME=`hostname`
|
||||
hostname -b "$CLUSTER_NAME.$DOMAIN"
|
||||
fi
|
||||
# realm join is broken as it requires --privileged but difficult to add for swarm
|
||||
# so it can execute /usr/sbin/adcli. Therefore we execute it directly and create
|
||||
# the /etc/krb5.conf and /etc/sssd/sssd.conf manually
|
||||
# echo $ADMIN_PASSWORD|realm join -v $REALM --user=$ADMIN_ACCOUNT
|
||||
echo $ADMIN_PASSWORD|/usr/sbin/adcli join --verbose --domain $DOMAIN --domain-realm $REALM --login-type user --login-user $ADMIN_ACCOUNT --stdin-password
|
||||
if [ "$CTDB_ENABLED" = "true" ]; then
|
||||
hostname -b "$PREV_HOSTNAME"
|
||||
fi
|
||||
mv /etc/krb5.keytab "$ETC_DIR/"
|
||||
fi
|
||||
|
||||
@@ -117,7 +124,14 @@ if [ -z "$REAL_REALM" ]; then
|
||||
mkdir -p /var/lib/samba/private
|
||||
|
||||
# Join
|
||||
if [ "$CTDB_ENABLED" = "true" ]; then
|
||||
((/usr/sbin/ctdbd --interactive)&)
|
||||
CTDB_PID=$!
|
||||
fi
|
||||
net ads join --no-dns-updates -U"$ADMIN_ACCOUNT"%"$ADMIN_PASSWORD"
|
||||
if [ "$CTDB_ENABLED" = "true" ]; then
|
||||
kill $CTDB_PID
|
||||
fi
|
||||
|
||||
((/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf -j /tmp/sp.pid)&)
|
||||
sleep 10
|
||||
|
||||
Reference in New Issue
Block a user