Bootstrap kernel update requires successful chef run

Successful chef run requires successful bootstrap kernel update.

When bootstrapping a new system, we upgrade the kernel to our desired version.

During the bootstrap process, before the kernel upgrade, we do a chef run.

If this chef run fails for any reason (including missing vault keys), the kernel update fails - then the system reboots, leaving the system locked in an unbootable state.

This makes it difficult to determine why the chef run failed. Fixing the chef problem will not cause it to recover, since it will never try again.  The machine needs to be destroyed and re-created.

The kernel upgrade should not depend on the success of the chef run. It should be robust enough to succeed even if chef does not. It should end up powered on and repeatedly re-trying the chef run. That will leave it in a state where fixing the chef or credential problem will result in the next chef attempt succeeding.

Here are the relevant lines from the bootstrap log:

```
Feb 12 00:01:10 geo-postgres-01-db-dr startup-script: INFO startup-script: + [[ 4.13.0-1007-gcp != *4.15.0-1015* ]]
Feb 12 00:01:10 geo-postgres-01-db-dr startup-script: INFO startup-script: + apt-get install -y linux-modules-4.15.0-1015-gcp linux-modules-extra-4.15.0-1015-gcp linux-image-4.15.0-1015-gcp linux-gcp-headers-4.15.0-1015
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: Reading package lists...
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: Building dependency tree...
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: Reading state information...
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Unable to locate package linux-modules-4.15.0-1015-gcp
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Couldn't find any package by glob 'linux-modules-4.15.0-1015-gcp'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Couldn't find any package by regex 'linux-modules-4.15.0-1015-gcp'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Unable to locate package linux-modules-extra-4.15.0-1015-gcp
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Couldn't find any package by glob 'linux-modules-extra-4.15.0-1015-gcp'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Couldn't find any package by regex 'linux-modules-extra-4.15.0-1015-gcp'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Unable to locate package linux-image-4.15.0-1015-gcp
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Couldn't find any package by glob 'linux-image-4.15.0-1015-gcp'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Couldn't find any package by regex 'linux-image-4.15.0-1015-gcp'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Unable to locate package linux-gcp-headers-4.15.0-1015
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Couldn't find any package by glob 'linux-gcp-headers-4.15.0-1015'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: E: Couldn't find any package by regex 'linux-gcp-headers-4.15.0-1015'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: ++ dpkg-query -W '-f=${binary:Package}\n' 'linux-image*' 'linux-headers*'
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: ++ grep -v 4.15.0-1015
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: + apt-get purge -y linux-headers linux-headers-3.0 linux-headers-4.13.0-1007-gcp linux-headers-gcp linux-image linux-image-4.13.0-1007-gcp linux-image-gcp
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: Reading package lists...
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: Building dependency tree...
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: Reading state information...
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: The following packages were automatically installed and are no longer required:
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script:   grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script:   libfreetype6 linux-gcp-headers-4.13.0-1007 os-prober
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: Use 'apt autoremove' to remove them.
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script: The following packages will be REMOVED:
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script:   linux-gcp* linux-headers-4.13.0-1007-gcp* linux-headers-gcp*
Feb 12 00:01:11 geo-postgres-01-db-dr startup-script: INFO startup-script:   linux-image-4.13.0-1007-gcp* linux-image-gcp*
Feb 12 00:01:13 geo-postgres-01-db-dr startup-script: INFO startup-script: 0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
Feb 12 00:01:13 geo-postgres-01-db-dr startup-script: INFO startup-script: After this operation, 78.8 MB disk space will be freed.
Feb 12 00:01:13 geo-postgres-01-db-dr startup-script: INFO startup-script: (Reading database ... #015(Reading database ... 5%#015(Reading database ... 10%#015(Reading database ... 15%#015(Reading database ... 20%#015(Reading database ... 25%#015(Reading database ... 30%#015(Reading database ... 35%#015(Reading database ... 40%#015(Reading database ... 45%#015(Reading database ... 50%#015(Reading database ... 55%#015(Reading database ... 60%#015(Reading database ... 65%#015(Reading database ... 70%#015(Reading database ... 75%#015(Reading database ... 80%#015(Reading database ... 85%#015(Reading database ... 90%#015(Reading database ... 95%#015(Reading database ... 100%#015(Reading database ... 83018 files and directories currently installed.)
Feb 12 00:01:13 geo-postgres-01-db-dr startup-script: INFO startup-script: Removing linux-gcp (4.13.0.1007.9) ...
Feb 12 00:01:14 geo-postgres-01-db-dr startup-script: INFO startup-script: Removing linux-headers-gcp (4.13.0.1007.9) ...
Feb 12 00:01:14 geo-postgres-01-db-dr startup-script: INFO startup-script: Removing linux-headers-4.13.0-1007-gcp (4.13.0-1007.10) ...
Feb 12 00:01:18 geo-postgres-01-db-dr startup-script: INFO startup-script: Removing linux-image-gcp (4.13.0.1007.9) ...
Feb 12 00:01:18 geo-postgres-01-db-dr startup-script: INFO startup-script: Removing linux-image-4.13.0-1007-gcp (4.13.0-1007.10) ...
Feb 12 00:01:18 geo-postgres-01-db-dr startup-script: INFO startup-script: WARN: Proceeding with removing running kernel image.
Feb 12 00:01:18 geo-postgres-01-db-dr startup-script: INFO startup-script: Examining /etc/kernel/postrm.d .
Feb 12 00:01:18 geo-postgres-01-db-dr startup-script: INFO startup-script: run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-1007-gcp /boot/vmlinuz-4.13.0-1007-gcp
Feb 12 00:01:18 geo-postgres-01-db-dr startup-script: INFO startup-script: update-initramfs: Deleting /boot/initrd.img-4.13.0-1007-gcp
Feb 12 00:01:18 geo-postgres-01-db-dr startup-script: INFO startup-script: run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-1007-gcp /boot/vmlinuz-4.13.0-1007-gcp
Feb 12 00:01:19 geo-postgres-01-db-dr startup-script: INFO startup-script: Generating grub configuration file ...
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: done
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: The link /vmlinuz is a damaged link
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: Removing symbolic link vmlinuz
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script:  you may need to re-run your boot loader[grub]
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: The link /initrd.img is a damaged link
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: Removing symbolic link initrd.img
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script:  you may need to re-run your boot loader[grub]
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: Purging configuration files for linux-image-4.13.0-1007-gcp (4.13.0-1007.10) ...
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: Examining /etc/kernel/postrm.d .
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-1007-gcp /boot/vmlinuz-4.13.0-1007-gcp
Feb 12 00:01:20 geo-postgres-01-db-dr startup-script: INFO startup-script: run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-1007-gcp /boot/vmlinuz-4.13.0-1007-gcp
Feb 12 00:01:22 geo-postgres-01-db-dr startup-script: INFO startup-script: + update-grub
Feb 12 00:01:22 geo-postgres-01-db-dr startup-script: INFO startup-script: Generating grub configuration file ...
Feb 12 00:01:22 geo-postgres-01-db-dr startup-script: INFO startup-script: done
```

Story points: 2.0