Skip to content

fix(facts.server): make Uptime work on OpenBSD - #2125

Open
dl6tom wants to merge 1 commit into
pyinfra-dev:3.xfrom
dl6tom:3.x
Open

dl6tom wants to merge 1 commit into
pyinfra-dev:3.xfrom
dl6tom:3.x

Conversation

@dl6tom

@dl6tom dl6tom commented Nov 30, 2026 •

Copy link
Copy Markdown

previously:

$ pyinfra technikraum.heizhaus fact server.Uptime
--> Loading config...
--> Loading inventory...
--> Connecting to hosts...
    [technikraum.heizhaus] Connected

--> Gathering facts...
    [technikraum.heizhaus] Loaded fact server.Kernel
    [technikraum.heizhaus] cut: /proc/uptime: No such file or directory
    [technikraum.heizhaus] Error: could not load fact: server.Uptime

--> Fact data for: server.Uptime
{
    "technikraum.heizhaus": null
}

--> Disconnecting from hosts...

now:

$ pyinfra technikraum.heizhaus fact server.Uptime
--> Loading config...
--> Loading inventory...
--> Connecting to hosts...
    [technikraum.heizhaus] Connected

--> Gathering facts...
    [technikraum.heizhaus] Loaded fact server.Kernel
    [technikraum.heizhaus] Loaded fact server.Uptime

--> Fact data for: server.Uptime
{
    "technikraum.heizhaus": 3120
}

--> Disconnecting from hosts...
  • Pull request is based on the default branch (3.x at this time)
  • Pull request includes tests for any new/updated operations/facts
  • Pull request includes documentation for any new/updated operations/facts
  • Tests pass (see scripts/dev-test.sh)
  • Type checking & code style passes (see scripts/dev-lint.sh)
  • Pull request title follows the
    conventional commits format

@wowi42 wowi42 added bug Label for all kind of bugs. facts Issues with facts. operations Issues with operations. labels Nov 30, 2026
@dl6tom
dl6tom marked this pull request as ready for review November 30, 2026 15:14

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Label for all kind of bugs. facts Issues with facts. operations Issues with operations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants