Closed danmcd closed 3 years ago
Test run from this morning using the latest piadm per this PR:
[root@larry (kebecloud) ~]# /tmp/piadm list
PI STAMP BOOTABLE FILESYSTEM BOOT IMAGE NOW NEXT
20200930T173623Z zones/boot next no no
ipxe zones/boot next no yes
[root@larry (kebecloud) ~]# /tmp/piadm -v list
PI STAMP BOOTABLE FILESYSTEM BOOT IMAGE NOW NEXT
20200930T173623Z zones/boot next no no
ipxe(20200626T133005Z) zones/boot next no yes
[root@larry (kebecloud) ~]# zfs list -t all | grep boot
zones/boot 600M 284G 304M /zones/boot
zones/boot@baseline 297M - 300M -
[root@larry (kebecloud) ~]# zfs rollback zones/boot@baseline
[root@larry (kebecloud) ~]# /tmp/piadm -v list
PI STAMP BOOTABLE FILESYSTEM BOOT IMAGE NOW NEXT
20200910T155139Z zones/boot none no no
ipxe(20200219T112943Z) zones/boot next no yes
[root@larry (kebecloud) ~]#
[root@larry (kebecloud) ~]# /tmp/piadm -v bootable
zones ==> BIOS
[root@larry (kebecloud) ~]# /tmp/piadm -v bootable -e
To enable a pool for booting, please specify at last a pool
Usage: piadm [-v] <command> [command-specific arguments]
piadm activate|assign <PI-stamp> [ZFS-pool-name]
piadm avail
piadm bootable [-d] [-e [-i <source>]] [-r] [ZFS-pool-name]
piadm install <source> [ZFS-pool-name]
piadm list <-H> [ZFS-pool-name]
piadm remove <PI-stamp> [ZFS-pool-name]
piadm update [ZFS-pool-name]
[root@larry (kebecloud) ~]# /tmp/piadm -v bootable -e zones
Pool zones appears to be bootable.
Use 'piadm update' to update the CN's iPXE and backup PI.
[root@larry (kebecloud) ~]# /tmp/piadm -v update
Selecting lone boot pool zones by default.
Updating backup PI to 20201002T173911Z
Installing as a backup Platform image PI stamp 20201002T173911Z
making platform-20201002T173911Z directories
Pulling unix
Pulling boot_archive
Pulling boot_archive.hash
Pulling boot_archive.manifest
Pulling boot_archive.gitstatus
...success installing 20201002T173911Z
Updating iPXE provided by headnode (ver: 20200626T133005Z)
Updating boot provided by headnode (ver: 20200930T173623Z)
[root@larry (kebecloud) ~]# /tmp/piadm -v update
Selecting lone boot pool zones by default.
No updates needed for iPXE and its loader.
If you think there should be an update, run
'sdcadm experimental update-gz-tools' on your Triton Head Node
[root@larry (kebecloud) ~]# /tmp/piadm update
[root@larry (kebecloud) ~]# echo $?
0
[root@larry (kebecloud) ~]# /tmp/piadm -v list
PI STAMP BOOTABLE FILESYSTEM BOOT IMAGE NOW NEXT
20201002T173911Z zones/boot none yes no
ipxe(20200626T133005Z) zones/boot next no yes
[root@larry (kebecloud) ~]# /tmp/piadm list
PI STAMP BOOTABLE FILESYSTEM BOOT IMAGE NOW NEXT
20201002T173911Z zones/boot none yes no
ipxe zones/boot next no yes
[root@larry (kebecloud) ~]#
Prior testing has given me confidence enough to promote this out of draft.
I think this is looking really good. 3 things to note:
Need to re-run tests (initial batches were quite helpful, thanks @bahamat), verify no regressions, etc. etc., and then request IA.
Darn it, while inspecting the diffs to write the test plan, I found a missing bit. It will be tested as part of the final batch of tests test-plan. (Sorry @bahamat )
Last changes (including one below about rsync) were inspired by field-testing against missing PIs that were booted (and then deleted by the head node).
If @bahamas10 has time I'd defer to him about quoting things vs what shellcheck says. He's the resident bash expert.
Stubs, and the ability to detect a Triton CN. Do not use yet save to test "yes I'm on a CN" vs. "No I'm not on a CN".