This adds [PPID] to the syslog lines to the dagger script. After all,
the dagger script is a proxy for confd, so when reading the logs it
seems natural to see the PID of confd rather than a script that will
die soon anyway.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- Relocate python based probe to netconf builds, and
- Restore basic shell script based probe for classic builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
A very limited part of the YANG model is implemented so far, basicly it is OSPFv2 with multiple areas and you can change timers
for the interfaces. Limited operational support.
admin@infix-00-00-00:/config/> edit routing control-plane-protocol ietf-ospf:ospfv2 name default
admin@infix-00-00-00:/config/routing/control-plane-protocol/ietf-ospf:ospfv2/name/default/> set ospf area 0.0.0.0 interface e0 enabled true
admin@infix-00-00-00:/config/routing/control-plane-protocol/ietf-ospf:ospfv2/name/default/> leave
In review discussions we have decided, for resonsons of consistency over
correctness, to rename this column to match the YANG model node name
rather than the Linux kernel name.
Also, right align the values. Numbers should always be right-aligned.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- New log() function replaces stdout logging
- New set_dhcp_routes() and clr_dhcp_routes() functions
- Set all option 121 routes with same metric
- Set all option 3 routers with increasing metric (this is what the
reference udhcpc scripts do, and RFC says the routers should be
listed in order of preference ...)
- Clearing routes must, like IP addresses, be done both by interface
and protocol. This refactor makes sure to delete any DHCP routes
set on the given interface (in case options change)
- Use resolvconf per-interface search+nameserver
- Cache IP lease so we can ask for it back later
- On deconfig|leasefail|nak, make sure to clean up anything that might
be lingering from this interface. E.g., we can get leasefail when a
server denies our request to prolong a lease.
- On renew|bound, refresh routes, and set search+dns + NTP servers
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Move from everything in a single /etc/chrony.conf to a split up with
configuration and server snippets. The latter comes in the form of
configured (static) and DHCP client (dynamic) server setup.
To accomodate this new scheme we need to detect when serves are removed
from the configuration, so not only have the whole change_ntp() been
refactored, it has been extended with a new pass.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Break out unit tests to separate make target as they don't require all
the built code and infrastructure that the normal tests does.
Run the unit tests early in the Github action stage. They don't
require a full build. This will give early feedback to the users.
Signed-off-by: Richard Alpe <richard@bit42.se>
In this patch we add some arbitrary system output files which contains
interface data. Such as the output from "ip link" and "ethtool". These
files are used by yanger instead of running the actual commands.
Yanger then generates a lot of YANG json data, which are merged using
jq into something that looks like the sysrepo operational data on
a running system. This data is then passed though cli-pretty and its
ouput is compared to the static expected output in the .txt files in
cli-output.
Here's a basic flow overview.
* system-output/foo.json -> yanger ->> data
* system-output/bar.json -> yanger ->> data
* data -> merge -> sysrepo-operational-data
* sysrepo-operational-data -> cli-pretty -> output.txt
* compare output.txt too cli-output/show-foobar.txt
The result of this is that if something changes in yanger OR in
cli-pretty. The corresponding system-output file needs to be updated
for the test to pass. This is indented to catch regression where the
output is unintentionally changed.
Signed-off-by: Richard Alpe <richard@bit42.se>
This fixes [ERR] from CLI `show routes`, and broken operational status
in setups with DHCP client enabled by default.
Feature (static routing) introduced in release cycle, no need to bring
up in release notes.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Empirical studies shows that the surge protection on the alder board
is not compatible with Energy Efficient Ethernet.
Root cause has not yet been determined.
On the P2's the only reasonable way (in terms of hardware patching
effort) of driving the LEDs is to have the green LEDs at the top and
the yellow ones at the bottom.
Turns out that the gpio-charger doesn't have polled fallback if the
GPIO pin can't function as an interrupt controller.
Fortunately, we have access to the IRQ pin, so we can just use that
for now and leave the driver as-is.
New command 'show software' to display software versions on each
partition, install date, and which one is currently booted.
admin@infix-00-00-00:/> show software
NAME STATE VERSION DATE
primary booted v23.10.0-132 2023-11-23T22:24:33+00:00
secondary inactive v23.10.0-132 2023-11-23T22:24:33+00:00
admin@infix-00-00-00:/> show software name primary
Name : primary
State : booted
Version : v23.10.0-132-gfd6e8ea
Size : 61992960
SHA-256 : ed6146aec462b77fb8631b14c48d281dd0f4fdb9c062f9482d863ee854081358
Installed : 2023-11-23T22:24:33+00:00
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The bootstrap script gets feedback from gen-admin-auth, on error we no
longer bail out but instead log the error and continue booting. This
way a developer build with root login can diagnose the error.
When logging the error we also set /etc/issue, /etc/issue.net for local
and remote login services, as well as the dedicated /etc/banner used by
OpenSSH, to hold the error summary. So when attaching to the console
port, or attempting to log in remotely with SSH, the error is printed
to indicate the device is not healthy.
Finally, since factory-config may be missing we need to bootstrap the
sysrepo db with something else, and fortunately we will always have a
failure-config to fall back on.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Break fallback hash to a separate function and allow gen_qemu_system_file()
to return the status. We'd like to update the qeneth templates to include
the same VPD data as is used with qemu.sh, but for now this is sufficient.
The Qemu detection has been changed to the, slightly more, secure detection
of qemu_fw_cfg filesystem.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>