-
Notifications
You must be signed in to change notification settings - Fork 266
updating miner info to grab firmware distro name #1263
Conversation
We need to fix our firmware image to have the right information in this file, too |
which firmware image is this? if it's the deb package build wouldn't that imply it runs on any debian-compatible system that would already have this file? |
@Vagabond i believe i found the change you're recommending in the firmware image repo; tagged you for review. Please advise if there's anything else i'm missing or other changes you'd like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems reasonable, does it also need to be changed in the jsonrpc stuff?
Didn't realize that was there and didn't use the same code; fixed @evanmcc ! |
Will this not just pull the docker base image info rather than the host OS? Or is that the intention? |
For dockerized miners this will query the file inside the base image unless it’s being mounted over at runtime by the user. This is consistent with the current behavior. |
Reason I ask, is mainly to understand what this would be used for in the future? Is there a need for us to show the base OS and expose this into the container or its just a sort of nice to have? |
Since this is an artifact from firmware builds I would argue that it’s more valuable to reflect the Linux distro/filesystem providing the miner’s runtime, so the value supplied by the base container image. As this base image changes the file will reflect the version of Linux powering the containerized miner. I would not recommend overriding this file, personally. |
The same logic is also used in miner_utils to pull the version for gossip metadata. Shouldn't it be revised there as well? Line 112 in e1ee9bd
Also, is it intention that the OS version is being in the gossip instead of the miner version with something like:
|
@PaulVMo the This will assume the As for the gossip metadata, since the existing |
9a5d632
to
725ee97
Compare
Updates the miner cli to pull the "firmware" linux disto pretty name from the now-standard
/etc/os-release
file which is in effect across all SystemD distros of linux (our current runtime option being Alpine) and the/etc/lsb_release
being deprecated and not present on most distros any longer.I've verified this file is present in most standard distros (Alpine, Ubuntu, Debian, Fedora) so this command should likely succeed in any supported version of Linux that runs miner but I can have it conditionally check for the older
lsb_release
file/command if this file isn't present as well for maximum compatibility.