Skip to content

Add switches to the host init script to toggle legacy behaviour - #3139

Open
dxapd wants to merge 1 commit into
google:mainfrom
dxapd:nftables-initscript-switch
Open

Add switches to the host init script to toggle legacy behaviour#3139
dxapd wants to merge 1 commit into
google:mainfrom
dxapd:nftables-initscript-switch

Conversation

@dxapd

@dxapd dxapd commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

add two new flags for toggling static resource initialization as well as running cvdalloc's init (which is to be implemented in the final PR in this series).

due to the way nftables works, cvdalloc also needs to do a small amount of install-time init (namely, creating its tables and chains). that code is better off living inside the cvdalloc binary, so we have the init script, which is our one hook point into install and uninstall, invoke it at exactly those times.

this change, as is, should be a no-op. the code enclosed within the if [ "${allocate_static_resources}" = "1" ]; then branches is the code we hope to delete one day, but until that day it will remain.

@dxapd
dxapd marked this pull request as ready for review September 3, 2026 23:56
@dxapd
dxapd requested review from 3405691582 and Databean September 4, 2026 00:01
@3405691582

Copy link
Copy Markdown
Collaborator

due to the way nftables works, cvdalloc also needs to do a small amount of install-time init (namely, creating its tables and chains).

Can we do this without having to do this at init? Can we interrogate nftables and see if our tables and chains exist, and if not, install them then?

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.

2 participants