Add support for Fioconfig - #109
Merged
Merged
Conversation
Member
Author
|
This is missing documentation, but I want y'all to give feedback before we try and do that. I think docs can be a separate PR. |
Member
Author
|
This is missing a couple things, but I wanted y'all to see what I have. Things missing:
|
doanac
force-pushed
the
fioconfig-support
branch
from
October 24, 2025 03:39
bc8f8f2 to
a64cd58
Compare
mike-sul
reviewed
Oct 24, 2025
This was referenced Oct 24, 2025
mike-sul
reviewed
Oct 24, 2025
doanac
force-pushed
the
fioconfig-support
branch
from
October 27, 2025 20:24
a64cd58 to
25cba14
Compare
mike-sul
reviewed
Oct 27, 2025
mike-sul
reviewed
Oct 28, 2025
Collaborator
|
@doanac Maybe it makes sense to move the first 3 commits into the separate PR? |
mike-sul
reviewed
Oct 28, 2025
Member
Author
totally. I'd been thinking about doing this in an attempt to make this less noisy. But as 3 different PRs. I'll start splitting them now. |
doanac
force-pushed
the
fioconfig-support
branch
from
October 30, 2025 18:18
25cba14 to
6364065
Compare
Member
Author
mike-sul
reviewed
Oct 31, 2025
mike-sul
reviewed
Oct 31, 2025
mike-sul
reviewed
Oct 31, 2025
mike-sul
reviewed
Oct 31, 2025
mike-sul
reviewed
Oct 31, 2025
mike-sul
reviewed
Oct 31, 2025
mike-sul
approved these changes
Oct 31, 2025
doanac
force-pushed
the
fioconfig-support
branch
from
October 31, 2025 15:15
cfb7fc7 to
35c025b
Compare
mike-sul
approved these changes
Oct 31, 2025
mike-sul
approved these changes
Oct 31, 2025
doanac
force-pushed
the
fioconfig-support
branch
2 times, most recently
from
October 31, 2025 15:46
6ee4c75 to
e00bbe7
Compare
This works just like the `fioconfig check-in` command Signed-off-by: Andy Doan <andy@foundries.io>
This allows secrets to be extracted earlier in the boot for services that may need them before fioup daemon is up and running. Signed-off-by: Andy Doan <andy@foundries.io>
This mimicks the same handy feature included in fioconfig. Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
This uses the same naming as the LmP so that fioctl and the WebUI will work the same way regardless of the OTA client. Signed-off-by: Andy Doan <andy@foundries.io>
If the command is run with a TTY, we'll assume the user is running
commands from the CLI and wants a more basic output.
If no TTY is present, we'll assume a daemon mode from a service where
structured logging would be preferred.
Example with TTY:
```
$ fioup check
ERROR: Unable to run lshw: error=exec: no command
2 [intel-corei7-64-lmp-2]
3 [intel-corei7-64-lmp-3]
8 [intel-corei7-64-lmp-8-debian-sway]
telegraf-agent hub.foundries.io/andy-debian-sway/telegraf-agent@sha256:f35401dbe539037b9a624bf74f5f3200b3fd2b2f86f922009720f2a82ac87cca
Current version: intel-corei7-64-lmp-8-debian-sway
You are running the latest version.
$ fioup daemon
Daemon starting: pid=276378
ERROR: Unable to run lshw: error=exec: no command
Extracting file: file=z-50-fioctl.toml
Extracting file: file=fioconfig-oneshot-diag
Extracting file: file=fioup-test
Extracting file: file=foo
Config on server has not changed
[1/5] Checking:ERROR: Error during update: error=failed at state Checking: latest target installation attempts has reached the limit (3)
Waiting before next check...: interval=1m0s
```
Example with no TTY:
```
$ fioup check 2>&1 | tee /dev/null
time=2025-10-23T21:59:46.963-05:00 level=ERROR msg="Unable to run lshw" error="exec: no command"
2 [intel-corei7-64-lmp-2]
3 [intel-corei7-64-lmp-3]
8 [intel-corei7-64-lmp-8-debian-sway]
telegraf-agent hub.foundries.io/andy-debian-sway/telegraf-agent@sha256:f35401dbe539037b9a624bf74f5f3200b3fd2b2f86f922009720f2a82ac87cca
Current version: intel-corei7-64-lmp-8-debian-sway
You are running the latest version.
$ fioup daemon 2>&1 | tee /dev/null
time=2025-10-23T22:03:52.462-05:00 level=INFO msg="Daemon starting" pid=276395
time=2025-10-23T22:03:52.462-05:00 level=ERROR msg="Unable to run lshw" error="exec: no command"
time=2025-10-23T22:03:52.463-05:00 level=INFO msg="Extracting file" file=z-50-fioctl.toml
time=2025-10-23T22:03:52.463-05:00 level=INFO msg="Extracting file" file=fioconfig-oneshot-diag
time=2025-10-23T22:03:52.463-05:00 level=INFO msg="Extracting file" file=fioup-test
time=2025-10-23T22:03:52.463-05:00 level=INFO msg="Extracting file" file=foo
time=2025-10-23T22:03:52.687-05:00 level=INFO msg="Config on server has not changed"
[1/5] Checking:time=2025-10-23T22:03:52.949-05:00 level=ERROR msg="Error during update" error="failed at state Checking: latest target installation attempts has reached the limit (3)"
time=2025-10-23T22:03:52.949-05:00 level=INFO msg="Waiting before next check..." interval=1m0s
```
Signed-off-by: Andy Doan <andy@foundries.io>
Before using fioconfig operations, we need to ensure we have permission to extract files into the secrets directory. This command will produce an error like: ``` $ ./bin/fioup config-extract ERROR: Unable to create files in `secrets-dir`: open /run/secrets/.test-writeable: permission denied ``` Signed-off-by: Andy Doan <andy@foundries.io>
doanac
force-pushed
the
fioconfig-support
branch
from
October 31, 2025 16:04
e00bbe7 to
49122a1
Compare
Member
Author
|
rebased on latest main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series of changes introduces support for fioconfig in the following ways:
fioup daemonwill now check config during each intervalfioup config-checkcan be run by handfioup run-and-reportcan be used exactly like the version in fioconfig