compiler-explorer / infra

Infrastructure to set up the public Compiler Explorer instances and compilers
https://godbolt.org
BSD 2-Clause "Simplified" License
350 stars 306 forks source link

Not all instance types have DMI #932

Open mattgodbolt opened 1 year ago

mattgodbolt commented 1 year ago

https://github.com/compiler-explorer/infra/blob/8e99f144c32c786f0e2b4a8b4432658c33d46c45/init/log-instance-id.service#L10

e.g. searching for this:

Jan 19 13:09:48Z ip-172-30-5-43 instance-id i-0088bda1b0868ad12 Jan 19 13:16:33Z ip-172-30-1-240 instance-id /usr/bin/cat: /sys/devices/virtual/dmi/id/board_asset_tag: No such file or directory Jan 19 13:46:41Z ip-172-30-4-158 instance-id i-0d9f6fe7c79fe5075 Jan 19 15:28:26Z ip-172-30-1-40 instance-id /usr/bin/cat: /sys/devices/virtual/dmi/id/board_asset_tag: No such file or directory

mattgodbolt commented 1 year ago

Hopefully fixed by c4b2166981f0eb6e62899bc18f1b1a861468729a

mattgodbolt commented 1 year ago

Needs checking but https://my.papertrailapp.com/events?q=program%3Ainstance-id looking good...

mattgodbolt commented 1 year ago

It wasn't "not ready" - for some instance types it would never turn up as older ones don't support DMI. For now 5b3e5ff24374c867e96c68aea396a1d50908531b limits us to only current generation, and I've reverted the wait change.

An alternative is to wait for networking and then curl an endpoint which I think works in more cases. Or accept instances with no logged out ID at startup, but it is useful information to have.