[What Bugs] 1. optimize name: reboot.cgz => reboot-after-sshd.cgz 2. nfs mount result dir: - before: ${os}/${os_arch}/${os_version}-iso-${ROOTFS_SUFFIX} - after : ${iso_os}/${iso_arch}/${iso_version}-iso-${ROOTFS_SUFFIX} 3. exit directory before umount
Signed-off-by: Yu Chuan 13186087857@163.com --- tests/install-iso-pre | 6 +++--- tests/install-iso-sync-rootfs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/install-iso-pre b/tests/install-iso-pre index f9ff9ebe9e94..16639e437d71 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -203,8 +203,8 @@ submit_install_iso_firstboot_yaml() custom_ipxe="#!ipxe\\n" custom_ipxe="${custom_ipxe}\\ndhcp" custom_ipxe="${custom_ipxe}\\ninitrd http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/$%7Biso_os%7D/$%7Biso_arch..." - custom_ipxe="${custom_ipxe}\\ninitrd http://$%7BINITRD_HTTP_HOST%7D:$%7BINITRD_HTTP_PORT%7D/initrd/custom_bootstr..." - custom_ipxe="${custom_ipxe}\\nkernel http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/$%7Biso_os%7D/$%7Biso_arch... ip=dhcp root=/dev/mapper/os-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX} initrd=initrd.lkp initrd=reboot.cgz local rw" + custom_ipxe="${custom_ipxe}\\ninitrd http://$%7BINITRD_HTTP_HOST%7D:$%7BINITRD_HTTP_PORT%7D/initrd/custom_bootstr..." + custom_ipxe="${custom_ipxe}\\nkernel http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/$%7Biso_os%7D/$%7Biso_arch... ip=dhcp root=/dev/mapper/os-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX} initrd=initrd.lkp initrd=reboot-after-sshd.cgz local rw" custom_ipxe="${custom_ipxe}\\nboot\\n"
sed -i "/custom_ipxe:/ccustom_ipxe: "${custom_ipxe}"" $firstboot_yaml @@ -232,7 +232,7 @@ submit_install_iso_sync_rootfs_yaml() install-iso-sync-rootfs.NFS_ROOT_DIR=${NFS_ROOT_DIR} \ install-iso-sync-rootfs.ROOTFS_SUFFIX=${ROOTFS_SUFFIX} \ install-iso-sync-rootfs.VG_NAME=${VG_NAME} \ - testbox=$testbox || die "submit ${sync_rootfs_yaml} failed" + testbox=$testbox || die "submit job failed: ${sync_rootfs_yaml}" }
main() diff --git a/tests/install-iso-sync-rootfs b/tests/install-iso-sync-rootfs index 34096229ccfb..b74c7bed2044 100755 --- a/tests/install-iso-sync-rootfs +++ b/tests/install-iso-sync-rootfs @@ -59,7 +59,7 @@ sync_rootfs_to_nfs_server() local nfs_rootfs_mount_point=/tmp/nfs_rootfs_${ROOTFS_SUFFIX}
mkdir -p ${nfs_rootfs_mount_point} - mount -t nfs ${NFS_SERVER_HOST}:${NFS_ROOT_DIR}/${os}/${os_arch}/${os_version}-iso-${ROOTFS_SUFFIX} ${nfs_rootfs_mount_point} || die "mount nfs rootfs failed" + mount -t nfs ${NFS_SERVER_HOST}:${NFS_ROOT_DIR}/${iso_os}/${iso_arch}/${iso_version}-iso-${ROOTFS_SUFFIX} ${nfs_rootfs_mount_point} || die "mount nfs rootfs failed"
# activate the lvm vgchange -ay @@ -78,7 +78,7 @@ sync_rootfs_to_nfs_server() cd ${nfs_rootfs_mount_point} && mkdir -p "${SKIP_SYNC_DIRS[@]}"
# umount nfs rootfs - umount $nfs_rootfs_mount_point || log_warn "umount failed: nfs_rootfs_mount_point" + cd / && umount $nfs_rootfs_mount_point || log_warn "umount failed: nfs_rootfs_mount_point"
# umount local logical volume umount $lv_rootfs_mount_point || log_warn "umount failed: $lv_rootfs_mount_point"
On Fri, Apr 23, 2021 at 12:03:35PM +0800, Yu Chuan wrote:
[What Bugs]
- optimize name: reboot.cgz => reboot-after-sshd.cgz
- nfs mount result dir:
- before: ${os}/${os_arch}/${os_version}-iso-${ROOTFS_SUFFIX}
- after : ${iso_os}/${iso_arch}/${iso_version}-iso-${ROOTFS_SUFFIX}
- exit directory before umount
Signed-off-by: Yu Chuan 13186087857@163.com
tests/install-iso-pre | 6 +++--- tests/install-iso-sync-rootfs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/install-iso-pre b/tests/install-iso-pre index f9ff9ebe9e94..16639e437d71 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -203,8 +203,8 @@ submit_install_iso_firstboot_yaml() custom_ipxe="#!ipxe\\n" custom_ipxe="${custom_ipxe}\\ndhcp" custom_ipxe="${custom_ipxe}\\ninitrd http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/$%7Biso_os%7D/$%7Biso_arch..."
- custom_ipxe="${custom_ipxe}\\ninitrd http://$%7BINITRD_HTTP_HOST%7D:$%7BINITRD_HTTP_PORT%7D/initrd/custom_bootstr..."
- custom_ipxe="${custom_ipxe}\\nkernel http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/$%7Biso_os%7D/$%7Biso_arch... ip=dhcp root=/dev/mapper/os-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX} initrd=initrd.lkp initrd=reboot.cgz local rw"
- custom_ipxe="${custom_ipxe}\\ninitrd http://$%7BINITRD_HTTP_HOST%7D:$%7BINITRD_HTTP_PORT%7D/initrd/custom_bootstr..."
reboot-after-sshd.cgz => reboot-after-logind.cgz
-------- Thanks, Xijian
custom_ipxe="${custom_ipxe}\\nkernel http://$%7BOS_HTTP_HOST%7D:$%7BOS_HTTP_PORT%7D/os/$%7Biso_os%7D/$%7Biso_arch... ip=dhcp root=/dev/mapper/os-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX} initrd=initrd.lkp initrd=reboot-after-sshd.cgz local rw" custom_ipxe="${custom_ipxe}\\nboot\\n"
sed -i "/custom_ipxe:/ccustom_ipxe: "${custom_ipxe}"" $firstboot_yaml
@@ -232,7 +232,7 @@ submit_install_iso_sync_rootfs_yaml() install-iso-sync-rootfs.NFS_ROOT_DIR=${NFS_ROOT_DIR} \ install-iso-sync-rootfs.ROOTFS_SUFFIX=${ROOTFS_SUFFIX} \ install-iso-sync-rootfs.VG_NAME=${VG_NAME} \
testbox=$testbox || die "submit ${sync_rootfs_yaml} failed"
testbox=$testbox || die "submit job failed: ${sync_rootfs_yaml}"
}
main() diff --git a/tests/install-iso-sync-rootfs b/tests/install-iso-sync-rootfs index 34096229ccfb..b74c7bed2044 100755 --- a/tests/install-iso-sync-rootfs +++ b/tests/install-iso-sync-rootfs @@ -59,7 +59,7 @@ sync_rootfs_to_nfs_server() local nfs_rootfs_mount_point=/tmp/nfs_rootfs_${ROOTFS_SUFFIX}
mkdir -p ${nfs_rootfs_mount_point}
- mount -t nfs ${NFS_SERVER_HOST}:${NFS_ROOT_DIR}/${os}/${os_arch}/${os_version}-iso-${ROOTFS_SUFFIX} ${nfs_rootfs_mount_point} || die "mount nfs rootfs failed"
mount -t nfs ${NFS_SERVER_HOST}:${NFS_ROOT_DIR}/${iso_os}/${iso_arch}/${iso_version}-iso-${ROOTFS_SUFFIX} ${nfs_rootfs_mount_point} || die "mount nfs rootfs failed"
# activate the lvm vgchange -ay
@@ -78,7 +78,7 @@ sync_rootfs_to_nfs_server() cd ${nfs_rootfs_mount_point} && mkdir -p "${SKIP_SYNC_DIRS[@]}"
# umount nfs rootfs
- umount $nfs_rootfs_mount_point || log_warn "umount failed: nfs_rootfs_mount_point"
cd / && umount $nfs_rootfs_mount_point || log_warn "umount failed: nfs_rootfs_mount_point"
# umount local logical volume umount $lv_rootfs_mount_point || log_warn "umount failed: $lv_rootfs_mount_point"
-- 2.23.0