vyos-1x icon indicating copy to clipboard operation
vyos-1x copied to clipboard

vyos.client_server: T2854: Add classes for building client/server pairs

Open bob1de opened this issue 4 years ago • 8 comments

The classes in vyos.client_server should make building system daemons and associated clients a lot simpler. They care about all the low-level stuff such as message passing, data validation, sockets, logging, persistent state storage and CLI integration.

There also is vyos.ipsetd. For now, this mainly demonstrates how to use vyos.client_server. However, vyos.ipsetd is fully working, and it can probably be used as part of the firewall rewrite.

bob1de avatar Sep 04 '20 17:09 bob1de

Ok, I think it's sufficiently complete for now.

bob1de avatar Sep 07 '20 09:09 bob1de

Not my role to do the review, but I like this work.

thomas-mangin avatar Sep 09 '20 07:09 thomas-mangin

I had to rebase onto the current branch again because the state at which it originally diverted had a bug which made testing harder, so don't wonder about the extra commits.

bob1de avatar Sep 09 '20 13:09 bob1de

Sorry, but the more time I have, the more things I find to fine-tune :).

bob1de avatar Sep 13 '20 17:09 bob1de

I will echo Thomas' comment that this is very nice work; I am testing it in some current scenarios, and will update this PR with questions/feedback. Thank you!

jestabro avatar Oct 15 '20 18:10 jestabro

One note: IPset will be irrelevant when we switch the firewall to nftables. We aren't planning to use IPset in the future.

I'll give the PR a deeper review, I think it's a good idea, but for the long term it will need an example other than IPsec...

dmbaturin avatar Oct 15 '20 19:10 dmbaturin

@jestabro Thanks!

@dmbaturin

One note: IPset will be irrelevant when we switch the firewall to nftables. We aren't planning to use IPset in the future.

Ah, good to know. Never really "worked" with nftables so far. My original intention for this PR was T2719 which I already started fiddling with, so once that's implemented, it could serve as an example for using vyos.client_server. However, do you think we may keep vyos.ipsetd as reference for now?

bob1de avatar Oct 16 '20 08:10 bob1de

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jun 24 '21 01:06 github-actions[bot]

As mentioned in the previous comment, we will not make use of this as is, but will remain informed by the ideas contained.

jestabro avatar Aug 31 '23 14:08 jestabro