1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-07 12:45:41 +01:00

12 Commits

Author SHA1 Message Date
Colin Walters
6d9d2e36a4 Implementation of adoption
So far we've supported updating systems that we installed,
but we also need to handle updating at least older CoreOS
systems.

This shares a lot of similarity with `update`; the biggest
difference is that we aren't sure which files we should
be managing.  So given a pending update, we only replace
files that exist in that update.

Closes: https://github.com/coreos/bootupd/issues/38
2020-10-13 19:39:55 +02:00
Colin Walters
c38feb3d5f Fix clippy lints
Nothing really important, may try to add clippy to CI at some point.
2020-10-13 11:25:05 -04:00
Colin Walters
9fb4418764 Drop operating system from status, print client side
For now let's address concerns over how we represent
the operating system by dropping them from the status
JSON.  Instead detect CoreOS specifically client side
too and print the aleph there.
2020-10-12 11:27:44 -04:00
Luca BRUNO
065a496d52 cargo: drop library crate, for now
This removes the current library/binary crate split, leaving
only the application in place.
The original idea was to add the logic as a vendored library into
rpm-ostree for an emergency fix. However the urgency dropped and
this now lives as a self-standing application.
We may or may not consider re-adding it later on, but only for the
interop parts (paths, JSON, etc).
2020-10-05 17:12:54 +02:00
Colin Walters
ac3cd8d6f4 daemon: Exit when done processing requests
There's no reason to sit there taking up RAM just because
someone did `bootupctl status`.  Properly implementing
exit-on-idle really requires an event loop (e.g. `tokio`)
but that'd be a large change.

For now let's just exit when a client disconnects.  However,
this quickly broke the test suite which does a lot of
commands in a row.

Tweak the systemd unit to allow more restarts, and also
add a few strategic sleeps.

Closes: https://github.com/coreos/bootupd/issues/43
2020-10-02 03:38:33 -04:00
Luca BRUNO
9d638b327a cli: add flag to control logging level
This introduces a new `-v(vv)` flag on both `bootupd` and `bootupctl`
to control log verbosity. The default level only shows warnings and
higher priorities.
The service unit sets up the daemon to log info messages too, and
can be overridden via a drop-in.
This also introduces some basic unit-tests on CLI parsing.
2020-10-01 13:59:55 -04:00
Luca BRUNO
bc0904eeae daemon: log and keep going on client errors
This tweaks daemon core-logic to keep going on client-induced errors,
logging them at "error" level.
It also introduces docstring to ease casual code navigation.
2020-09-28 14:20:04 +00:00
Luca BRUNO
33974f9f87 daemon: split daemon core-loop logic 2020-09-28 14:20:04 +00:00
Luca BRUNO
6fad76e096 cli/bootupctl: temporary backend verbs
This is a temporary compat patch to bridge backend verbs
via bootupctl, for existing consumers.
It is meant to be reverted as a whole later on once all consumers
have been migrated.
2020-09-25 12:58:43 +00:00
Luca BRUNO
3658f5aafe cli: rework into a multicall binary
This reworks the CLI options parser to branch the inner logic
to accommodate two entrypoints, `bootupd` and `bootupctl`, into
a single multicall binary.
2020-09-25 12:58:43 +00:00
Colin Walters
4444591165 Add a validate command
Let's add support for checking the on-disk state.  This helps
cross-check our implementation and is also useful for administrators
(ref `ostree fsck`, `rpm -V` etc).
2020-09-24 15:35:59 +00:00
Luca BRUNO
8b5c974fed cli: split handlers and runners for sub-commands
This moves CLI parsing logic and sub-commands handling to its own
module, making full use of structopt for matching verbs to enum
variant and for dispatching to the relevant entrypoint.
2020-09-22 14:57:39 +00:00