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
Added support for s6, moved some configuration files around #484
base: main
Are you sure you want to change the base?
Conversation
Also, I should probably say: Ideally, it should only |
Please rebase, also:
|
@mazunki Did you see my last comment? |
@JamiKettunen , sorry, I hadn't seen it until now, no. I'll rebase and look at the changes sometime next week. Would you prefer a separate PR for the configuration changes, and the support for s6? Maybe close this PR, and make a separate one for each of those points? |
Yes please. This PR is very intrusive. I'd prefer to see minimal changes and their reasoning. |
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.
Shouldn't these be read by waydroid-net.sh
then?
Though there's the issue of dynamically appending ipv6 rules or not
@@ -0,0 +1,17 @@ | |||
USE_LXC_BRIDGE="true" | |||
LXC_BRIDGE="${vnic}" |
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.
this was made to be renamable so that the network could be configured by the user instead of by waydroid-net.sh, but with this change it's getting configurable already. I'd undo #267 as part of this change (except the part that replaces 192.168.250.0
with 192.168.240.0
), as it was never well supported anyways -- waydroid upgrade
would overwrite the changes
if (ready_fd := session_cfg["session"]["ready_fd"]): | ||
if ready_fd.isnumeric(): | ||
os.write(int(ready_fd), b"\n") | ||
else: | ||
logging.warning("{readyfd = } is not a valid file descriptor. Ready state skipped") | ||
|
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.
not super fond of this
command = [tools.config.tools_src + | ||
"/data/scripts/waydroid-net.sh", "start"] | ||
tools.helpers.run.user(args, command, check=False) | ||
if not session_cfg or session_cfg["session"]["autoload_netbridge"] == "1": |
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.
this should probably be part of the global config instead (/var/lib/waydroid/waydroid.cfg
)
I was creating a service for Waydroid for myself, and figured it would be nice if we unified the configuration somewhere.
The s6 service provided here oneshots the network bridge (previously run from waydroid-net.sh) prior to launching its own service. I have considered moving this into its own oneshot service, perhaps that's healthier.
I am sourcing the environment which was previous in waydroid-net.sh from /etc/waydroid/lxc.conf, and I also made it so waydroid-net.sh supports the same file, in case people still use the provided shellscript.
Furthermore, we now have /etc/waydroid/nftables.rules which can be passed on directly to nftables, given that we also pass in
LXC_BRIDGE
andLXC_NETWORK
to it. I didn't change this in the waydroid-net.sh script.@JamiKettunen , does this sound like what you had in mind?