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

Core: create Beacon #878

Merged
merged 2 commits into from
Mar 22, 2022
Merged

Conversation

Williangalvani
Copy link
Member

@Williangalvani Williangalvani commented Mar 18, 2022

image

This is a very configurable mDNS alternative to avahi.

fix #472
fix #360
fix #849

lays the groundwork for #680

image is live at williangalvani/blueos-core:beacon

I'll go through this one more time to tidy up and add comments/logging/better exception handling

@Williangalvani
Copy link
Member Author

no idea of how I closed this -.-

@Williangalvani Williangalvani force-pushed the beacon branch 6 times, most recently from 581d226 to 0b439bc Compare March 19, 2022 18:51
@Williangalvani Williangalvani marked this pull request as ready for review March 19, 2022 18:57
core/services/beacon/settings.py Outdated Show resolved Hide resolved
core/services/beacon/settings.py Outdated Show resolved Hide resolved
core/services/beacon/settings.py Outdated Show resolved Hide resolved
core/services/beacon/main.py Show resolved Hide resolved
@Williangalvani Williangalvani force-pushed the beacon branch 4 times, most recently from ebbc64a to f5579c3 Compare March 19, 2022 20:40
Copy link
Member

@patrickelectric patrickelectric left a comment

Choose a reason for hiding this comment

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

I tested it from docker and it appears that is using the mac address as IP address

image

@Williangalvani
Copy link
Member Author

Williangalvani commented Mar 21, 2022

I tested it from docker and it appears that is using the mac address as IP address

This should be fixed in the latest image. as a side-effect, it now handles changes in settings/interfaces

core/services/beacon/settings.py Outdated Show resolved Hide resolved
core/services/beacon/settings.py Outdated Show resolved Hide resolved
@Williangalvani Williangalvani force-pushed the beacon branch 7 times, most recently from c7652c0 to 8a6ac89 Compare March 22, 2022 18:07
exit 1
)
sed -i "s/#host-name=foo/host-name=blueos-avahi/g" ${AVAHI_DAEMON_CONFIG_PATH}

Copy link
Member

Choose a reason for hiding this comment

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

This appears to be a bit weird, why are we failing if avahi is not available since is not required for the system to work (since now we have beacon).
Also, the cat will make all other lines to not work.
The correct would be:

Suggested change
AVAHI_DAEMON_CONFIG_PATH="/etc/avahi/avahi-daemon.conf"
AVAHI_HOST_NAME="blueos-avahi"
[ ! -d "${AVAHI_DAEMON_CONFIG_PATH}" ] && (
echo "Avahi daemon config file found, changing avahi host name to: ${AVAHI_HOST_NAME}"
sed -i "s/#host-name=/host-name=blueos-avahi/g" ${AVAHI_DAEMON_CONFIG_PATH}
) || echo "Avahi daemon config file not found in ${AVAHI_DAEMON_CONFIG_PATH}"

This also remove the old "foo" name to make the command more future proof.

@Williangalvani Williangalvani force-pushed the beacon branch 2 times, most recently from edbf029 to 76acb04 Compare March 22, 2022 18:51
@patrickelectric patrickelectric merged commit 7db3eed into bluerobotics:master Mar 22, 2022
@Williangalvani Williangalvani deleted the beacon branch April 12, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants