From 0bca6e0852b8bb54a654fec1e0890a5a71b6b1cc Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 2 Feb 2022 15:22:58 -0500 Subject: [PATCH] Apply more fixes for EL7 diskless --- .../usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh | 4 ++-- .../el7-diskless/profiles/default/scripts/imageboot.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/el7-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh b/confluent_osdeploy/el7-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh index 50c6ff29..564a6aa7 100644 --- a/confluent_osdeploy/el7-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh +++ b/confluent_osdeploy/el7-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh @@ -221,7 +221,7 @@ ssh-keygen -A for pubkey in /etc/ssh/ssh_host*key.pub; do certfile=${pubkey/.pub/-cert.pub} privfile=${pubkey%.pub} - curl -sf -X POST -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $confluent_apikey" -d @$pubkey https://$confluent_mgr/confluent-api/self/sshcert > $certfile + curl -gsf -X POST -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $confluent_apikey" -d @$pubkey https://$confluent_mgr/confluent-api/self/sshcert > $certfile if [ -s $certfile ]; then echo HostCertificate $certfile >> /etc/ssh/sshd_config fi @@ -240,6 +240,6 @@ for addr in $(grep ^MANAGER: /etc/confluent/confluent.info|awk '{print $2}'|sed done confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg| awk '{print $2}') mkdir -p /etc/confluent -curl -sf https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/functions > /etc/confluent/functions +curl -gsf https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/functions > /etc/confluent/functions . /etc/confluent/functions source_remote imageboot.sh diff --git a/confluent_osdeploy/el7-diskless/profiles/default/scripts/imageboot.sh b/confluent_osdeploy/el7-diskless/profiles/default/scripts/imageboot.sh index 0c8a6188..16452009 100644 --- a/confluent_osdeploy/el7-diskless/profiles/default/scripts/imageboot.sh +++ b/confluent_osdeploy/el7-diskless/profiles/default/scripts/imageboot.sh @@ -5,9 +5,11 @@ if [ "untethered" = "$(getarg confluent_imagemethod)" ]; then curl https://$confluent_mgr/confluent-public/os/$confluent_profile/rootimg.sfs -o /mnt/remoteimg/rootimg.sfs else confluent_urls="$confluent_urls https://$confluent_mgr/confluent-public/os/$confluent_profile/rootimg.sfs" + modprobe fuse /opt/confluent/bin/urlmount $confluent_urls /mnt/remoteimg fi /opt/confluent/bin/confluent_imginfo /mnt/remoteimg/rootimg.sfs > /tmp/rootimg.info +modprobe loop loopdev=$(losetup -f) export mountsrc=$loopdev losetup -r $loopdev /mnt/remoteimg/rootimg.sfs