-
Notifications
You must be signed in to change notification settings - Fork 84
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
Bridges update #2322
Bridges update #2322
Conversation
cf77796
to
1bd4cb3
Compare
core/start-blueos-core
Outdated
@@ -15,6 +15,7 @@ MAV_COMPONENT_ID_ONBOARD_COMPUTER4=194 | |||
# Enable Rust backtrace for all programs | |||
RUST_BACKTRACE=1 | |||
|
|||
RUN_AS_BLUEOS_USER="sudo -u blueos" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case sudo
is not available, you can su blueos -c "commandline with arguments"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the quotes in there make commands insanely hard to assemble. Do you want to take a look at it? I tried for a while but ended up giving up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be something like:
BLUEOS_USER='blueos'
run_as_blueos_user () {
su "$BLUEOS_USER" -c "$1"
}
run_as_blueos_user 'ls -lah /dev/video*'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't quite work, I think this need to be on its own file so it can be used inside the new tmux sessions.
I'll try it in a subsequent pr
29e952c
to
9a69775
Compare
2722437
to
d293e8d
Compare
d293e8d
to
5f01dfa
Compare
core/services/bridget/settings.py
Outdated
"udp_listen_port": spec["udp_port"] if server else 0, | ||
} | ||
) | ||
data["specsv2"] = new_specs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just replacing specs directly ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, that is just how my brain works. updated.
core/start-blueos-core
Outdated
@@ -85,6 +86,12 @@ else | |||
echo "Waring: Using dockers's resolv.conf, this may cause DNS issues if the host's network configuration changes." | |||
fi | |||
|
|||
# fix permissions for logging folders: | |||
find /var/logs/blueos -type d -exec chmod 777 {} \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default folder permission should be "755", no ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, updated
self._bridges: Dict[BridgeSpec, Bridge] = {} | ||
self._settings_manager = Manager("bridget", SettingsV1) | ||
self._bridges: Dict[BridgeFrontendSpec, Bridge] = {} | ||
self._settings_manager = Manager("bridget", SettingsV2, USERDATA / "settings" / "bridget") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we moving this to userdata over our standard settings folder ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-root users have no access to our regular folder because it is under /root/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a comment explaining that in the code
…t services The user they run under has no permission for setting the memory use budget
5f01dfa
to
b0af3a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be free to merge it
cool, I'm trying @joaoantoniocardoso 's suggestion and I'll merge it after I'm done |
41f36e8
to
dc4cb6b
Compare
dc4cb6b
to
b9ccd93
Compare
The previous code did not work since it was running with the extensions folder that can have a huge number of files Not sure about the original work done in: bluerobotics#2322 Signed-off-by: Patrick José Pereira <[email protected]>
The previous code did not work since it was running with the extensions folder that can have a huge number of files Not sure about the original work done in: #2322 Signed-off-by: Patrick José Pereira <[email protected]>
This splits udp port handling into udp target port and udp lister port.
client will always send data to
udp_target_port
.server will always listen at
udp_listen_port
.additionally, this now allows the client to pick the port it will bind to, using
udp_listen_port
.this is useful for implementations where whatever is talking to us is sending/receiving packets naively, without an actual udp "connection".
depends on patrickelectric/bridges#11fix #2305
fix #2304