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

[avahi] conditionalize Avahi Service Start and Installation (#2280) #2282

Merged
merged 1 commit into from May 21, 2024

Conversation

kevinanderson1
Copy link
Contributor

@kevinanderson1 kevinanderson1 commented May 10, 2024

Ensure the Avahi daemon is installed and started only when OTBR_MDNS == "avahi". This prevents multiple mDNS stacks from running especially in container environments.

I saw in the CONTRIBUTING documentation that CI checks should pass but I'm not sure how to get them to run in my fork.

Fixes #2280

@kevinanderson1 kevinanderson1 force-pushed the conditional_avahi branch 2 times, most recently from e0f8e40 to 7c1f16c Compare May 10, 2024 20:52
Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.77%. Comparing base (2b41187) to head (1fb1360).
Report is 660 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2282       +/-   ##
===========================================
- Coverage   55.77%   39.77%   -16.01%     
===========================================
  Files          87       88        +1     
  Lines        6890     9778     +2888     
  Branches        0      721      +721     
===========================================
+ Hits         3843     3889       +46     
- Misses       3047     5691     +2644     
- Partials        0      198      +198     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wgtdkp
Copy link
Member

wgtdkp commented May 10, 2024

I saw in the CONTRIBUTING documentation that CI checks should pass but I'm not sure how to get them to run in my fork.

The CI tests run in this PR. You will need to pass those failing tests.

Screenshot from 2024-05-11 07-58-07

script/bootstrap Outdated Show resolved Hide resolved
@kevinanderson1 kevinanderson1 force-pushed the conditional_avahi branch 3 times, most recently from 3770df1 to a6a0e65 Compare May 11, 2024 22:22
script/server Outdated Show resolved Hide resolved
@kevinanderson1 kevinanderson1 force-pushed the conditional_avahi branch 3 times, most recently from 7320446 to da557fd Compare May 16, 2024 17:19
@kevinanderson1
Copy link
Contributor Author

@superwhd I believe this is ready for review.

@jwhui jwhui requested a review from superwhd May 16, 2024 18:47
script/bootstrap Outdated

# Thread Certification tests require Avahi to publish records for tests. Since the
# same image is used for all tests this needs to be installed here.
if [[ ${OTBR_MDNS} == "avahi" || ${OT_BACKBONE_CI} == 1 ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

@sunytt Do you think ${OT_BACKBONE_CI} == 1 will be true when building a BR reference release? Is there a more accurate variable?

Copy link
Contributor

Choose a reason for hiding this comment

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

When building reference release the bootstrap script is called with the build option REFERENCE_DEVICE=1, when the reference device is a BR it also has the build option BORDER_ROUTING=1.

Can we use the combination of those 2 build options here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've modified the PR to ensure Avahi is installed if REFERENCE_DEVICE=1.

@superwhd
Copy link
Contributor

LGTM overall except concern of failing to include avahi in BR reference release.

Ensure the Avahi daemon is installed and started only when
OTBR_MDNS == "avahi". This prevents multiple mDNS stacks from
running especially in container environments.
@kevinanderson1
Copy link
Contributor Author

kevinanderson1 commented May 20, 2024

@superwhd I've modified the PR to ensure Avahi is installed if REFERENCE_DEVICE=1. Let me know if anything else needs to be addressed.

Copy link
Contributor

@superwhd superwhd left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@superwhd superwhd requested a review from sunytt May 21, 2024 03:03
Copy link
Contributor

@sunytt sunytt left a comment

Choose a reason for hiding this comment

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

LGTM

@jwhui jwhui changed the title Conditionalize Avahi Service Start and Installation (#2280) [avahi] conditionalize Avahi Service Start and Installation (#2280) May 21, 2024
Copy link
Member

@jwhui jwhui left a comment

Choose a reason for hiding this comment

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

Thanks! 👍🏼

@jwhui jwhui merged commit 1045a0b into openthread:main May 21, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenThread Border Router - Container runs multiple mDNS stacks
5 participants