Store historical snapshots as compressed .json.gz files to reduce disk
usage. The operational.json file remains uncompressed for easy access.
Signed-off-by: Richard Alpe <richard@bit42.se>
Dump operational datastore to timestamped JSON snapshots every 5 minutes
(in /var/lib/statd/). The operational.json symlink always points to the
latest snapshot.
Implement hierarchical retention policy that keeps the first snapshot of
each time period (hour/day/week/month/year), providing fine-grained recent
history while preventing unbounded disk usage.
This will allow us to plot / track how the system state evolves as
well as give us somewhat fine-grained info in the case of an event,
such as a crash.
Add unit test simulating months of snapshots to verify retention
behavior using a statd stub that only runs the retention code locally
(unit test)
Signed-off-by: Richard Alpe <richard@bit42.se>
Turn on OOPS-to-panic, soft/hard lockup panic, hung-task panic, and
extra workqueue watchdog reporting. This makes latent stalls visible
instead of silently freezing, improving diagnosis of issues like the
recent resource-pressure lockup.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Newer board revisions of RPi4 and CM4, as well as older boards with
upgraded EEPROM, require newer firmware.
This is a backport of the latest rpi-firmware on Buildroot master.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch adds diagnostic data and additional logging to catch the root
cause for issue #1303:
- Exactly when and why cleanup is called
- Whether the cd /tmp command succeeds
- The actual tar exit code (not just 255 from SSH)
- Whether cleanup happens before tar completes (race condition)
- The full collection.log showing the sequence of events
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch unlocks "routing interfaces" support in the ietf-routing yang
model. An array of interface with IP forwarding enabled.
Note, because of #515 we skip IPv6 forwarding for now. This will in the
near future be handled by a per-interface force_forwarding sysctl flag.
The 'show interface [ifname]' admin-exec command has been extended with
a Flags field for a quick overview of which interfaces have forwarding
currently enabled.
Fixes#647
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
After merging post-post-image, TRUSTED_KEYS must be set in order for
the keys to be injected into the U-Boot DTB, so we need to explicitly
enable it for all boards that use the generic secure boot scripts.
This was a stray config fragment used during development that was
accedentally included in the referenced commit.
Fixes: 0fe5964909 ("aarch64_qemu_boot: Restore build after removing post-image.sh")
Previously, post-image.sh was able to create QEMU images from an
existing release tarball. This was useful when you wanted to test a
new bootloader build without having to wait for a full Infix build.
Restore this capability by adding a separate image target for it, and
then allow image-itb-qcow to source its input images from that instead
of a locally build squash+aux.
Limit support to x86, like we do on the "official" appliances on the
marketplace. Aarch64 has never really been used AFAIK.
Avoid the os-release import, since all that info is not important now
that these appliance files are only for development scenarios. In all
other cases, the official one, based on a proper release, should be
used.
We have not installed .dtb:s to $O/images/ for quite some time, and
nobody cared. That goes to show that this is not really used.
The image is still useful at times, so if it needed in the future,
then we can resurrect it from the logs and refactor it to an image
package.
Add a generic image target to build aux.ext4, which can be used both
when creating target-specific SD-card images, and when creating
regular disk images.
While we're here, make sure that we don't need a RAUC bundle in order
to generate aux.ext4 (which mkrauc-status.sh did). This saves us time
on _every_ incremental build.