From 62b4c3aa1c5c46de23f0128f3cd728876a32f9d3 Mon Sep 17 00:00:00 2001 From: Bin Qian Date: Mon, 16 Aug 2021 12:59:28 -0400 Subject: [PATCH] relocate /www to /var/www Relocate writable /www to /var/www Passed TCs: 1. provisioned DC system, std system controller + SX subcloud 2. Provision AIO-DX, standard load w/ compute and storage nodes 3. DC Upgrade, AIO-SX subclouds 4. reinstall controller 5. backup restore Story: 2009101 Task: 43474 Change-Id: I0fd5cd4b57655325139f7c06bd44e42d06390ab7 Signed-off-by: Bin Qian --- .../kickstarts/post_miniboot_controller.cfg | 12 ++++++------ bsp-files/kickstarts/post_net_controller.cfg | 8 ++++---- bsp-files/kickstarts/post_pxeboot_controller.cfg | 8 ++++---- bsp-files/kickstarts/post_usb_controller.cfg | 16 ++++++++-------- bsp-files/kickstarts/post_yow_controller.cfg | 9 +++++---- .../centos/pxe-network-installer.spec | 4 ++-- kickstart/centos/platform-kickstarts.spec | 2 +- kickstart/opensuse/platform-kickstarts.spec | 8 ++++---- 8 files changed, 34 insertions(+), 33 deletions(-) diff --git a/bsp-files/kickstarts/post_miniboot_controller.cfg b/bsp-files/kickstarts/post_miniboot_controller.cfg index 2983acda..95b4f002 100644 --- a/bsp-files/kickstarts/post_miniboot_controller.cfg +++ b/bsp-files/kickstarts/post_miniboot_controller.cfg @@ -183,8 +183,8 @@ EOF # Mirror local software repositories SYSIMAGE_MOUNT=/mnt/sysimage -FEED_DIR=${SYSIMAGE_MOUNT}/www/pages/feed/rel-xxxPLATFORM_RELEASExxx -UPDATES_DIR=${SYSIMAGE_MOUNT}/www/pages/updates/rel-xxxPLATFORM_RELEASExxx +FEED_DIR=${SYSIMAGE_MOUNT}/var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx +UPDATES_DIR=${SYSIMAGE_MOUNT}/var/www/pages/updates/rel-xxxPLATFORM_RELEASExxx PATCHING_DIR=${SYSIMAGE_MOUNT}/opt/patching PACKAGES_DIR=${PATCHING_DIR}/packages/xxxPLATFORM_RELEASExxx/ @@ -313,7 +313,7 @@ KS="Miniboot post:" # Create a uuid specific to this installation INSTALL_UUID=`uuidgen` -echo $INSTALL_UUID > /www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid +echo $INSTALL_UUID > /var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid echo "INSTALL_UUID=$INSTALL_UUID" >> /etc/platform/platform.conf wlog "${KS} updating platform.conf with install uuid : ${INSTALL_UUID}" @@ -335,7 +335,7 @@ fi # - Packages # - Repodata # -FEED_DIR=/www/pages/feed/rel-xxxPLATFORM_RELEASExxx +FEED_DIR=/var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx declare -i cut_dirs=NUM_DIRS if [ ! -d "${FEED_DIR}/Packages" ]; then mkdir -p "${FEED_DIR}/Packages" @@ -373,7 +373,7 @@ patches_url=xxxHTTP_URLxxx/patches wget ${NOVERIFYSSL_WGET_OPT} -q --spider ${patches_url}/ if [ $? -eq 0 ]; then wlog "${KS} downloading patch repository $patches_url" - cd /www/pages + cd /var/www/pages mkdir -p updates/rel-xxxPLATFORM_RELEASExxx/Packages mkdir -p updates/rel-xxxPLATFORM_RELEASExxx/repodata cd updates/rel-xxxPLATFORM_RELEASExxx @@ -399,7 +399,7 @@ if [ $? -eq 0 ]; then || report_post_failure_with_logfile $anaconda_logdir/patches_rpmget_metadata.log wlog "${KS} save a copy of all patch packages, preserve attributes" - find /www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ + find /var/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ | xargs --no-run-if-empty -I files cp --preserve=all files /opt/patching/packages/xxxPLATFORM_RELEASExxx/ else wlog "${KS} get from patches url '$patches_url' failed" diff --git a/bsp-files/kickstarts/post_net_controller.cfg b/bsp-files/kickstarts/post_net_controller.cfg index 4d8286e0..41cc3107 100644 --- a/bsp-files/kickstarts/post_net_controller.cfg +++ b/bsp-files/kickstarts/post_net_controller.cfg @@ -16,7 +16,7 @@ if [ $? -ne 0 ]; then echo "INSTALL_UUID=$INSTALL_UUID" >> /etc/platform/platform.conf fi -cd /www/pages +cd /var/www/pages # Sync software repository feed_url=http://pxecontroller:${http_port:-8080}/feed/ anaconda_logdir=/var/log/anaconda @@ -38,7 +38,7 @@ shopt -s nullglob . /etc/build.info CURRENT_REL_DIR=rel-${SW_VERSION} OTHER_REL_DIR= -for REL_DIR in /www/pages/feed/*; do +for REL_DIR in /var/www/pages/feed/*; do if [[ ! $REL_DIR =~ "${SW_VERSION}" ]]; then OTHER_REL_DIR=`basename $REL_DIR` OTHER_REL_VERSION=${OTHER_REL_DIR:4} @@ -49,8 +49,8 @@ done # If second release is installed, find the latest version of the installer # RPM and install the pxeboot files we require to boot hosts with that release. if [ ! -z "$OTHER_REL_DIR" ]; then - PATCH_RPM=`find /www/pages/updates/${OTHER_REL_DIR}/Packages -name 'pxe-network-installer*' | sort -V | tail -1` - BASE_RPM=`find /www/pages/feed/${OTHER_REL_DIR}/Packages -name 'pxe-network-installer*' | sort -V | tail -1` + PATCH_RPM=`find /var/www/pages/updates/${OTHER_REL_DIR}/Packages -name 'pxe-network-installer*' | sort -V | tail -1` + BASE_RPM=`find /var/www/pages/feed/${OTHER_REL_DIR}/Packages -name 'pxe-network-installer*' | sort -V | tail -1` if [ ! -z "$PATCH_RPM" ]; then INSTALL_RPM=$PATCH_RPM diff --git a/bsp-files/kickstarts/post_pxeboot_controller.cfg b/bsp-files/kickstarts/post_pxeboot_controller.cfg index 6a3f3a4e..da74b86a 100644 --- a/bsp-files/kickstarts/post_pxeboot_controller.cfg +++ b/bsp-files/kickstarts/post_pxeboot_controller.cfg @@ -82,7 +82,7 @@ else NOVERIFYSSL_WGET_OPT="" fi -cd /www/pages +cd /var/www/pages mkdir -p feed/rel-xxxPLATFORM_RELEASExxx/Packages mkdir -p feed/rel-xxxPLATFORM_RELEASExxx/repodata cd feed/rel-xxxPLATFORM_RELEASExxx @@ -101,7 +101,7 @@ patches_url=xxxHTTP_URLxxx/patches wget ${NOVERIFYSSL_WGET_OPT} -q --spider ${patches_url}/ if [ $? -eq 0 ]; then echo "Downloading patches..." >/dev/console - cd /www/pages + cd /var/www/pages mkdir -p updates/rel-xxxPLATFORM_RELEASExxx/Packages mkdir -p updates/rel-xxxPLATFORM_RELEASExxx/repodata cd updates/rel-xxxPLATFORM_RELEASExxx @@ -120,7 +120,7 @@ if [ $? -eq 0 ]; then wget ${NOVERIFYSSL_WGET_OPT} --mirror --no-parent --no-host-directories --reject 'index.html*' \ --cut-dirs=$patches_cut_dirs $patches_url/metadata/ -o $anaconda_logdir/patches_rpmget_metadata.log \ || report_post_failure_with_logfile $anaconda_logdir/patches_rpmget_metadata.log - find /www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ + find /var/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ | xargs --no-run-if-empty -I files cp --preserve=all files /opt/patching/packages/xxxPLATFORM_RELEASExxx/ echo "Done" >/dev/console @@ -128,6 +128,6 @@ fi # Create a uuid specific to this installation INSTALL_UUID=`uuidgen` -echo $INSTALL_UUID > /www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid +echo $INSTALL_UUID > /var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid echo "INSTALL_UUID=$INSTALL_UUID" >> /etc/platform/platform.conf %end diff --git a/bsp-files/kickstarts/post_usb_controller.cfg b/bsp-files/kickstarts/post_usb_controller.cfg index 357c5426..822cd323 100644 --- a/bsp-files/kickstarts/post_usb_controller.cfg +++ b/bsp-files/kickstarts/post_usb_controller.cfg @@ -60,26 +60,26 @@ else fi if [ -d $srcdir/Packages ] ; then - mkdir -p /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx - cp -r $srcdir/Packages /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/Packages - cp -r $srcdir/repodata /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/repodata + mkdir -p /mnt/sysimage/var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx + cp -r $srcdir/Packages /mnt/sysimage/var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/Packages + cp -r $srcdir/repodata /mnt/sysimage/var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/repodata fi if [ -d $srcdir/patches ]; then - mkdir -p /mnt/sysimage/www/pages/updates/rel-xxxPLATFORM_RELEASExxx - cp -r $srcdir/patches/Packages /mnt/sysimage/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages - cp -r $srcdir/patches/repodata /mnt/sysimage/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/repodata + mkdir -p /mnt/sysimage/var/www/pages/updates/rel-xxxPLATFORM_RELEASExxx + cp -r $srcdir/patches/Packages /mnt/sysimage/var/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages + cp -r $srcdir/patches/repodata /mnt/sysimage/var/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/repodata mkdir -p /mnt/sysimage/opt/patching cp -r $srcdir/patches/metadata /mnt/sysimage/opt/patching/metadata mkdir -p /mnt/sysimage/opt/patching/packages/xxxPLATFORM_RELEASExxx - find /mnt/sysimage/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ + find /mnt/sysimage/var/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ | xargs --no-run-if-empty -I files cp --preserve=all files /mnt/sysimage/opt/patching/packages/xxxPLATFORM_RELEASExxx/ fi # Create a uuid specific to this installation INSTALL_UUID=`uuidgen` -echo $INSTALL_UUID > /mnt/sysimage/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid +echo $INSTALL_UUID > /mnt/sysimage/var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid echo "INSTALL_UUID=$INSTALL_UUID" >> /mnt/sysimage/etc/platform/platform.conf %end diff --git a/bsp-files/kickstarts/post_yow_controller.cfg b/bsp-files/kickstarts/post_yow_controller.cfg index d2f0ac77..3c792769 100644 --- a/bsp-files/kickstarts/post_yow_controller.cfg +++ b/bsp-files/kickstarts/post_yow_controller.cfg @@ -75,7 +75,7 @@ EOF anaconda_logdir=/var/log/anaconda mkdir -p $anaconda_logdir -cd /www/pages +cd /var/www/pages mkdir -p feed/rel-xxxPLATFORM_RELEASExxx/Packages mkdir -p feed/rel-xxxPLATFORM_RELEASExxx/repodata cd feed/rel-xxxPLATFORM_RELEASExxx @@ -91,7 +91,7 @@ wget --mirror --no-parent --no-host-directories --reject 'index.html*' --cut-dir patches_url=http://xxxBOOT_SERVERxxx/umalab/`hostname`_feed/patches wget -q --spider ${patches_url}/ if [ $? -eq 0 ]; then - cd /www/pages + cd /var/www/pages mkdir -p updates/rel-xxxPLATFORM_RELEASExxx/Packages mkdir -p updates/rel-xxxPLATFORM_RELEASExxx/repodata cd updates/rel-xxxPLATFORM_RELEASExxx @@ -106,7 +106,8 @@ if [ $? -eq 0 ]; then cd /opt/patching wget --mirror --no-parent --no-host-directories --reject 'index.html*' --cut-dirs=$patches_cut_dirs $patches_url/metadata/ -o $anaconda_logdir/patches_rpmget_metadata.log \ || report_post_failure_with_logfile $anaconda_logdir/patches_rpmget_metadata.log - find /www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ + find /var/www/pages/updates/rel-xxxPLATFORM_RELEASExxx/Packages -name '*.rpm' \ + | xargs --no-run-if-empty -I files cp --preserve=all files /opt/patching/packages/xxxPLATFORM_RELEASExxx/ echo "Done" >/dev/console @@ -114,6 +115,6 @@ fi # Create a uuid specific to this installation INSTALL_UUID=`uuidgen` -echo $INSTALL_UUID > /www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid +echo $INSTALL_UUID > /var/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid echo "INSTALL_UUID=$INSTALL_UUID" >> /etc/platform/platform.conf %end diff --git a/installer/pxe-network-installer/centos/pxe-network-installer.spec b/installer/pxe-network-installer/centos/pxe-network-installer.spec index 444f8f0a..feb0802f 100644 --- a/installer/pxe-network-installer/centos/pxe-network-installer.spec +++ b/installer/pxe-network-installer/centos/pxe-network-installer.spec @@ -64,7 +64,7 @@ ln -s installer-bzImage_1.0 %{buildroot}/pxeboot/rel-%{platform_release}/install ln -s installer-intel-x86-64-initrd_1.0 %{buildroot}/pxeboot/rel-%{platform_release}/installer-initrd install -v -D -m 644 %{_sourcedir}/squashfs.img \ - %{buildroot}/www/pages/feed/rel-%{platform_release}/LiveOS/squashfs.img + %{buildroot}/var/www/pages/feed/rel-%{platform_release}/LiveOS/squashfs.img install -v -d -m 755 %{buildroot}%{_sbindir} @@ -140,5 +140,5 @@ ln -s pxelinux.cfg/grub.cfg %{buildroot}/pxeboot/grub.cfg %dir /pxeboot /pxeboot/* %{_sbindir}/pxeboot-update-%{platform_release}.sh -/www/pages/feed/rel-%{platform_release}/LiveOS/squashfs.img +/var/www/pages/feed/rel-%{platform_release}/LiveOS/squashfs.img diff --git a/kickstart/centos/platform-kickstarts.spec b/kickstart/centos/platform-kickstarts.spec index 94204259..640c4e76 100644 --- a/kickstart/centos/platform-kickstarts.spec +++ b/kickstart/centos/platform-kickstarts.spec @@ -18,7 +18,7 @@ BuildRequires: perl BuildRequires: perl(Getopt::Long) BuildRequires: perl(POSIX) -%define feed_dir /www/pages/feed/rel-%{platform_release} +%define feed_dir /var/www/pages/feed/rel-%{platform_release} %prep %setup diff --git a/kickstart/opensuse/platform-kickstarts.spec b/kickstart/opensuse/platform-kickstarts.spec index 8c019b47..6d1d9967 100644 --- a/kickstart/opensuse/platform-kickstarts.spec +++ b/kickstart/opensuse/platform-kickstarts.spec @@ -1,5 +1,5 @@ %define platform_release 1 -%define feed_dir /www/pages/feed/rel-%{platform_release} +%define feed_dir /var/www/pages/feed/rel-%{platform_release} Summary: Platform Kickstarts Name: platform-kickstarts @@ -44,9 +44,9 @@ install -D -m 0444 extra_cfgs/* %{buildroot}/extra_cfgs %files %defattr(-,root,root,-) -/www -/www/pages -/www/pages/feed +/var/www +/var/www/pages +/var/www/pages/feed %package pxeboot Summary: Kickstarts Pxeboot Server