Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-4031

osbuild: edge kickstart requires post to setup insights-client service at boot

XMLWordPrintable

    • sst_image_builder

      Goal: 

      Insights-client collection must occur at boot time (instead of on a schedule) so that the current ostree commit hash can be reflected after upgrade.

      Otherwise, the upgrade shows as errored in the UI/API.

      Acceptance Criteria:

      • Verify the insights-client service file is in the osbuild kickstart file included in an Immutable ISO.
      • Verify the insights-client service is setup at install
      • Verify collection occurs at first boot
      • Verify collection occurs on each subsequent reboot
      • Verify the correct ostree commit has is reflected in the Insights Inventory Detail UI
      • Verify the correct Image version is reflected in Insights Image UI
      • Verify the Status in the UI reflects a successful upgrade.

       

      Post section from Edge kickstart file:

      %post --log=/var/log/anaconda/insights-on-reboot-unit-install.log --interpreter=/usr/bin/bash --erroronfail
      echo POST-INSIGHTS-CLIENT-OVERRIDE
      INSIGHTS_CLIENT_OVERRIDE_DIR=/etc/systemd/system/insights-client.service.d
      INSIGHTS_CLIENT_OVERRIDE_FILE=$INSIGHTS_CLIENT_OVERRIDE_DIR/override.conf
      if [ ! -f $INSIGHTS_CLIENT_OVERRIDE_FILE ]; then
          mkdir -p $INSIGHTS_CLIENT_OVERRIDE_DIR
          cat > $INSIGHTS_CLIENT_OVERRIDE_FILE << EOF 
      [Unit]
      Requisite=greenboot-healthcheck.service
      After=network-online.target greenboot-healthcheck.service osbuild-first-boot.service
      [Install]
      WantedBy=multi-user.target
      EOF
          systemctl enable insights-client.service
      fi
      %end

       

            akoutsou@redhat.com Achilleas Koutsou
            jhollowa@redhat.com Jonathan Holloway
            Jonathan Holloway
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: