Skip to content

Ensure serial number is up-to-date when shipping logs #2367

@RebeccaMahany

Description

@RebeccaMahany

The logshipper pulls the serial from ServerProvidedDataStore, but that store doesn't get updated when launcher is transferred to a new computer -- so we continue to ship logs with the old serial attached to them. This makes it hard to troubleshoot issues when launcher is transferred to a new computer. (Related: #1346.)

We should make sure the serial is always up-to-date when shipping logs. I see a couple options:

  • Use knapsack.GetEnrollmentDetails() => HardwareSerial. This has the drawback of not being set yet when launcher first starts up, so we'd need to handle that scenario:
    • We could delay shipping logs until the serial is available
    • We could use ServerProvidedDataStore's serial initially and then update to use knapsack.GetEnrollmentDetails() => HardwareSerial once available
    • We could start persisting EnrollmentDetails in a db store so that they'll be available right away
  • Query for the serial directly via runsimple

Audit anywhere else we use ServerProvidedDataStore().Get([]byte("serial_number")) and see if we should update to use the enrollment details instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions