Skip to content

Misc#1501

Merged
troglobit merged 4 commits into
mainfrom
misc
May 12, 2026
Merged

Misc#1501
troglobit merged 4 commits into
mainfrom
misc

Conversation

@troglobit
Copy link
Copy Markdown
Contributor

Description

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@troglobit troglobit added the ci:main Build default defconfig, not minimal label May 12, 2026
@troglobit troglobit requested review from Copilot and mattiaswal May 12, 2026 09:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bundles several operational bugfixes across confd, container lifecycle handling, and the packaged finit init system to improve robustness during configuration changes and process restarts.

Changes:

  • Reworked confd console progress output to avoid blank/garbled [ OK ] lines by caching and reprinting step descriptions.
  • Adjusted IP neighbor flush script generation to avoid acting on interfaces that are in containers and to skip non-existent interfaces.
  • Backported two finit patches to improve restart behavior after unclean daemon exits and to produce more informative “service died” logs; updated container stop wrapper behavior and ChangeLog.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/confd/src/main.c Updates confd progress output logic to prevent blank/garbled OK lines during bootstrap.
src/confd/src/ip.c Changes neighbor flush generation to avoid container-owned/non-existent interfaces.
board/common/rootfs/usr/sbin/container Ensures stop proceeds to podman stop even if a stale setup pidfile exists.
package/finit/0001-service-clean-stale-pidfile-after-unclean-daemon-exi.patch Backport: remove stale daemon-owned pidfiles after unclean exits to allow reliable restarts.
package/finit/0002-service-log-signal-name-and-core-dumps-in-death-mess.patch Backport: improve death/restart logs with signal names and core-dump annotation.
doc/ChangeLog.md Adds v26.05.0 unreleased notes for the fixes in this PR (and an additional kernel entry).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/confd/src/ip.c Outdated
Comment thread doc/ChangeLog.md
@troglobit
Copy link
Copy Markdown
Contributor Author

@mattiaswal all tests pass again now, as they should. Pushing another update though with some code simplification.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Comment thread src/confd/src/ip.c Outdated
troglobit added 4 commits May 12, 2026 13:38
When an interface has been handed off to a container it lives in
another netns, so `ip neigh/addr flush dev FOO` fails on the host.
The failure aborts dagger, and since interfaces_change() runs before
containers_change() in change_cb(), the container delete path is
never reached -- the stale container keeps the interface trapped in
its netns, breaking the next reconfiguration.

Guard both the neighbor and address flush exit scripts with
`if_nametoindex(ifname)` -- true exactly when the interface is in
the host netns, false for both "in a container" and "already gone".
This replaces the pre-existing `!cni_find(ifname) && if_nametoindex(
ifname)` guard at the addr site: cni_find() added no information
for this check and would popen(container find) for nothing when the
interface had been deleted entirely.

Also harden wrap() in /usr/sbin/container so a stale setup pidfile
doesn't short-circuit Finit's stop attempt -- kill the setup PID and
still ask podman to stop the container.

Fixes #1493

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The \r-overwrite of an in-progress line breaks when something else
writes to stderr between conout(3) and the final call, leaving blank
"[ OK ]" lines.  Cache the description and reprint it whole, so the
final status line is robust to intervening output.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Backport two fixes addressing a critical failure reported by a customer:
an unclean dbus-daemon exit leaves a lingering /run/messagebus.pid, the
daemon then refuse to start, and Finit's restart loop gives up.

0001 service: clean stale pidfile after unclean daemon exit
     Drop a daemon-owned (pid:!) pidfile when it still names the
     just-reaped PID and that PID is no longer alive.

0002 service: log signal name and core dumps in death message
     "by signal: 9" -> "killed by SIGKILL", with ", core dumped"
     when applicable.  Stronger breadcrumb for sudden deaths.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit requested a review from mattiaswal May 12, 2026 11:40
@troglobit troglobit merged commit a19684c into main May 12, 2026
@troglobit troglobit deleted the misc branch May 12, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:main Build default defconfig, not minimal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Containers is not correctly removed after removal

3 participants