TT#157450 Add extra logging entries and copy logs later

Add extra deployment statuses for grub-install and
try to have more data logged.

Change-Id: Id06dfad1264f781157631c51035ab219cfc30070
mr10.3.1
Volodymyr Fedorov 5 years ago
parent 50d8966747
commit 7b53916c30

@ -2352,12 +2352,10 @@ EOF
fi # if [ -n "$PUPPET" ] ; then
if [ -r "${INSTALL_LOG}" ] && [ -d "${TARGET}"/var/log/ ] ; then
cp "${INSTALL_LOG}" "${TARGET}"/var/log/
fi
if [[ "${SWRAID}" = "true" ]] ; then
if efi_support ; then
set_deploy_status "swraidinstallefigrub"
grml-chroot "${TARGET}" mount /boot/efi
# if efivarfs kernel module is loaded, but efivars isn't,
@ -2377,6 +2375,7 @@ if [[ "${SWRAID}" = "true" ]] ; then
efibootmgr --create --disk "/dev/${SWRAID_DISK2}" -p 2 -w --label 'NGCP Fallback' --load '\EFI\debian\grubx64.efi'
fi
set_deploy_status "swraidinstallgrub"
for disk in "${SWRAID_DISK1}" "${SWRAID_DISK2}" ; do
grml-chroot "${TARGET}" grub-install "/dev/$disk"
done
@ -2384,6 +2383,12 @@ if [[ "${SWRAID}" = "true" ]] ; then
grml-chroot "${TARGET}" update-grub
fi
if [ -r "${INSTALL_LOG}" ] && [ -d "${TARGET}"/var/log/ ] ; then
set_deploy_status "copylogfiles"
cp "${INSTALL_LOG}" "${TARGET}"/var/log/
sync
fi
# unmount /ngcp-data partition inside chroot (if available)
if [ -n "${DATA_PARTITION}" ] ; then
grml-chroot "${TARGET}" umount /ngcp-data
@ -2410,6 +2415,7 @@ dmsetup remove_all || true
declare efidev1 efidev2
if [[ "${SWRAID}" = "true" ]] ; then
if efi_support ; then
set_deploy_status "swraidclonegrub"
partlabel="EFI System"
max_tries=60
get_pvdevice_by_label_with_retries "/dev/${SWRAID_DISK1}" "${partlabel}" "${max_tries}" efidev1

Loading…
Cancel
Save