Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test ftl.pi-hole.net availability #5563

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jan 30, 2024

What does this implement/fix?

Add checking for availability of https://ftl.pi-hole.net when using FTL from a custom branch. If the server is down (or the user is offline, cannot resolve the domain, etc.), we fail early and hard instead of possibly corrupting the installation.

Note

This can easily be tested by checking out this branch and - thereafter - defining a local DNS record like

0.0.0.0 ftl.pi-hole.net

Then, pihole -up sees a situation where we have simulated a non-reachable FTL binary server:

Screenshot from 2024-01-30 19-21-59


Related issue or feature (if applicable): #5561 #5562

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 developmental 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.

@DL6ER DL6ER added the Bug: fixed Contains a bug resolution label Jan 30, 2024
@DL6ER DL6ER requested a review from a team January 30, 2024 18:23
else
printf " %b Unknown error. Please contact Pi-hole Support\\n" "${CROSS}"
return 4
fi
return 2
Copy link
Member

@rdwebdesign rdwebdesign Jan 30, 2024

Choose a reason for hiding this comment

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

This line (return 2) will never be executed.

When the new if-then-else command above is executed, one of the return commands will be executed before.

(Suggestion button is not available for this line)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed

…a custom branch. If the server is down (or the user is offline, cannot resolve the domain, etc.), we fail early and hard instead of possibly corrupting the installation

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER merged commit 92e741f into development-v6 Feb 2, 2024
14 checks passed
@DL6ER DL6ER deleted the tweak/check_ftl.pi-hole.net branch February 2, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: fixed Contains a bug resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants