Skip to content

Ensure API sessions are restored before starting the HTTP server#2803

Merged
DL6ER merged 2 commits intodevelopmentfrom
fix/import_api_sessions_earlier
Mar 13, 2026
Merged

Ensure API sessions are restored before starting the HTTP server#2803
DL6ER merged 2 commits intodevelopmentfrom
fix/import_api_sessions_earlier

Conversation

@DL6ER
Copy link
Member

@DL6ER DL6ER commented Mar 9, 2026

What does this implement/fix?

Restore API sessions way ahead of starting the web server to ensure we are not falsely rejecting still valid sessions. This is a regression of the asynchronous query importing as the thread importing the queries may get queued to only be able to restore the API sessions once history importing is done. This can take some time on slow devices.


Related issue or feature (if applicable): Fixes #2802

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories development branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

…e are not falsely rejecting still valid sessions

Signed-off-by: Dominik <[email protected]>
@DL6ER DL6ER requested a review from a team as a code owner March 9, 2026 21:06
@DL6ER DL6ER linked an issue Mar 9, 2026 that may be closed by this pull request
@yubiuser
Copy link
Member

The issue you tried to fix with your last commit

216/216 ✗ FTL terminates with message
(in test file test/test_suite.bats, line 2352)
`[[ $status == 0 ]]' failed

Did not find string "########## FTL terminated after" in file /var/log/pihole/FTL.log within 30 seconds

Happens for unkown reasons from time-to-time on Github. Usually, it's enough to restart the workflow. I just did it and the test passed now for amd64.
I suggest you push away the last commit.

@yubiuser
Copy link
Member

I build a local image and with this FTL binary adding/removing CNAMES and switching pages works fine without logout.

Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

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

Assuming RISCV will finish one day and pass - could you please squash this down to two commits?

@DL6ER DL6ER force-pushed the fix/import_api_sessions_earlier branch from a5e1d09 to 0eb5fe8 Compare March 10, 2026 19:16
rdwebdesign
rdwebdesign previously approved these changes Mar 10, 2026
…ermore, wait in Teleporter test until FTL is again ready. Otherwise, following tests may fail for unclear reasons

Signed-off-by: Dominik <[email protected]>
@DL6ER DL6ER force-pushed the fix/import_api_sessions_earlier branch from 0eb5fe8 to 9b1425b Compare March 11, 2026 18:56
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/webserver-session-timeout/85197/40

@DL6ER DL6ER merged commit 86f690a into development Mar 13, 2026
18 checks passed
@DL6ER DL6ER deleted the fix/import_api_sessions_earlier branch March 13, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session Logout - CNAME Records

4 participants