Enable Multinode Subcloud in Distributed Cloud
To create a duplex subcloud with multiple nodes with different personalites, pxeboot must be supported by controller-0 of the subcloud. Here, pxeboot is enabled on controller-0 by downloading files required for pxeboot from the System Controller, and copying them to the relevant locations under /var/www/pages/feed/rel-id and /var/pxeboot. Test Plan: PASS: Verify that all nodes in the subcloud install, come online and are unlocked, enabled and available by the end of the installation process. PASS: Verify that multinode install completes successfully with prestaged ostree_repo. Depends-On: https://review.opendev.org/c/starlingx/metal/+/862619/ Story: 2010118 Task: 46754 Change-Id: I8cfda9688d41d1f6f5997ac81f9b6e21d7f3ebe6 Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
This commit is contained in:
parent
26fcaf8b9f
commit
d09313ff0b
@ -867,6 +867,7 @@ HOOK_LABEL="ks-early"
|
||||
|
||||
export debug=0
|
||||
export prefix=""
|
||||
export insturl_orig=""
|
||||
|
||||
# Assume there is no Platform Backup (persistent) Partition
|
||||
export BACKUP_PART_FOUND=0
|
||||
@ -1940,6 +1941,8 @@ else
|
||||
|
||||
# If ostree_repo is found at the mounted backup directory,
|
||||
# then set the ostree url to its location.
|
||||
|
||||
insturl_orig="${insturl}"
|
||||
if [ -e ${backup_mount}/ostree_repo ]; then
|
||||
insturl="file:///${backup_mount}/ostree_repo"
|
||||
ilog "Setting insturl to ${insturl} to use prestaged ostree_repo"
|
||||
@ -2610,7 +2613,16 @@ if [ "${controller}" = true ] ; then
|
||||
sw_release="xxxPLATFORM_RELEASExxx" # updated by the build
|
||||
|
||||
feed="${IMAGE_ROOTFS}/var/www/pages/feed/rel-${sw_release}"
|
||||
pxeboot="${IMAGE_ROOTFS}/var/pxeboot"
|
||||
repo="${feed}/ostree_repo"
|
||||
pxedir="${IMAGE_ROOTFS}/var/www/pages/iso/${sw_release}"
|
||||
|
||||
mkdir -p "${repo}"
|
||||
mkdir -p "${feed}"
|
||||
mkdir -p "${feed}/pxeboot"
|
||||
mkdir -p "${feed}/kickstart"
|
||||
mkdir -p "${pxeboot}/rel-${sw_release}"
|
||||
mkdir -p "${pxedir}"
|
||||
|
||||
if [ ${OSTREE_REPO_FETCHED} -eq 0 ] ; then
|
||||
if is_usb_install -eq 0 ; then
|
||||
@ -2637,6 +2649,60 @@ if [ "${controller}" = true ] ; then
|
||||
|
||||
# This fetch is only needed once because the repo is stored in /var
|
||||
set_variable "ostree_repo_fetched"
|
||||
|
||||
# fetch pxeboot directories
|
||||
pxeurl=$(echo ${insturl_orig} | sed -e s/ostree_repo//)
|
||||
# Check for noverifyssl
|
||||
if grep -q noverifyssl /proc/cmdline; then
|
||||
NOVERIFYSSL_WGET_OPT="--no-check-certificate"
|
||||
else
|
||||
NOVERIFYSSL_WGET_OPT=""
|
||||
fi
|
||||
|
||||
# change to the pxedir. Store pxe artifacts here.
|
||||
pushd ${pxedir} > /dev/null
|
||||
|
||||
#download the iso directory from the System Controller to here.
|
||||
wget ${NOVERIFYSSL_WGET_OPT} -nH -np -r ${pxeurl}/pxeboot/ --cut-dirs=2 -o /${LAT_DIR}/wget_pxe_files.tmp
|
||||
[ $? -ne 0 ] && report_failure_with_msg "Failed to download iso/${sw_release}/pxeboot from system controller"
|
||||
|
||||
wget ${NOVERIFYSSL_WGET_OPT} -nH -np -r ${pxeurl}/kickstart/ --cut-dirs=2 -o /${LAT_DIR}/wget_pxe_files.tmp
|
||||
[ $? -ne 0 ] && report_failure_with_msg "Failed to download iso/${sw_release}/kickstart from system controller"
|
||||
|
||||
wget ${NOVERIFYSSL_WGET_OPT} ${pxeurl}/efi.img -o /${LAT_DIR}/wget.tmp
|
||||
[ $? -ne 0 ] && report_failure_with_msg "Failed to find ${pxeurl}/pxeboot/${f}"
|
||||
|
||||
# copy files to relevant locations in feed/rel-id/ and /var/pxeboot
|
||||
cp -a pxeboot ${feed}
|
||||
cp -a pxeboot/bzImage* ${feed}/pxeboot/
|
||||
cp -a pxeboot/initrd* ${feed}/pxeboot/
|
||||
cp -a efi.img ${feed}
|
||||
cp -a kickstart ${feed}
|
||||
|
||||
cp -a efi.img ${pxeboot}
|
||||
cp -a pxeboot/bzImage* ${pxeboot}/rel-${sw_release}/
|
||||
cp -a pxeboot/initrd* ${pxeboot}/rel-${sw_release}/
|
||||
cp -a pxeboot/EFI ${pxeboot}/
|
||||
|
||||
# go out of this directory
|
||||
popd > /dev/null
|
||||
|
||||
# Temporary WorkAround: The current UEFI pxeboot loader does not call the
|
||||
# default provisioning grub menu in /var/pxeboot/pxelinux.cfg/grub.cfg.
|
||||
#
|
||||
# While the above issue is investigated, to support DX and system node
|
||||
# install for UEFI servers this code moves the lat grub.cfg aside and
|
||||
# creates a link to the default provisioning mac based grub menu.
|
||||
|
||||
pushd ${pxeboot}/EFI/BOOT > /dev/null
|
||||
if [ ! -L grub.cfg ] ; then
|
||||
if [ -e grub.cfg ] ; then
|
||||
mv grub.cfg grub.cfg.lat
|
||||
fi
|
||||
ln -s ../../pxelinux.cfg/grub.cfg
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user