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

Configurable services #119

Merged
merged 24 commits into from
Aug 30, 2023
Merged

Configurable services #119

merged 24 commits into from
Aug 30, 2023

Conversation

troglobit
Copy link
Contributor

@troglobit troglobit commented Aug 22, 2023

  1. Disable all services we want to have configurable (package/skeleton-init-finit: enable fewer services by default #118)
  2. Refactor to break out a libsrx from confd (confd: break out srx fns to separate library #116)
  3. Flatten confd file hierarchy (confd: flatten directory structure now that statd has moved out #115)
  4. YANG support for enabling/disabling mDNS/SD and SSDP
  5. Enable mDNS/SD and SSDP by default in factory-config
  6. Enable LLDP by default in factory-config

There's also a few other minor fixes and additions I found while cleaning up my working directory after the summer, should not be too much of a surprise, I hope.

As discussed offline, any native SNMP support in Infix is postponed for a future date.

@troglobit troglobit added the enhancement New feature or request label Aug 22, 2023
@troglobit troglobit requested a review from wkz August 22, 2023 15:03
@troglobit
Copy link
Contributor Author

troglobit commented Aug 23, 2023

@wkz: As discussed in our AFK code review, this updated force-push of the PR contains:

  • drop discover/ level from mdns and ssdp in the yang model, placing them on the root level along with lldp and snmp
  • add LLDP service support (heavily redacted) config using ieee802-dot1ab-lldp std yang model
  • enable LLDP in Infix factory-config

Other changes compared to the original PR:

  • RFC: add CLI end alias to up, because that's what I've got in my bones
  • Rename sysrepo-bootstrap.sh -> confd-bootstrap.sh, it lives in src/confd/ ...

@troglobit
Copy link
Contributor Author

Fix copy-paste error in factory-config. Locally checked and rechecked this time.

@troglobit troglobit marked this pull request as draft August 24, 2023 08:15
@troglobit
Copy link
Contributor Author

Converted to draft, because we need to discuss the NETCONF wire format for enabled. Right now we have infix-services:enabled for mdns and ssdp, but infix-lldp:enabled for lldp. I suggest we:

a) either split infix-services.yang in two and standardize on infix-<SVC>:enabled, or
b) add a infix-service:enabled typedef that's used everywhere.

@troglobit troglobit marked this pull request as ready for review August 29, 2023 07:46
This patch drops auto-enable of services we want to be able to control
via NETCONF/YANG.  SSDP and mDNS/SD enable/disable configure support,
using native models, will be included in the same PR and LLDP+SNMP may
come later, using std. IEEE/IETF models, they are not critical atm.

Fix #118

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Everything (!) potentially shared with other sysrepo plugins/daemons and
helper functions (not yet in libite) that can be used by other daemons
have been relocated to libsrx.

Fix #116

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Fix #115

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Also, for usability, add `name:<SVC>` to each service declaration so they
can be located more easily and/or enabled/disabled using the service they
provide.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Lost in the big summer merge of 2023

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Lost in the big summer merge of 2023

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The script resides with confd and sets up our system for confd, this
should make it easier to rememeber where it's located.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
I'm sorry, I'm just so used to this modus from the previous company.
The difference to 'exit', which is available on Cisco IOS, is that it
on the top-level config context does not exit/abort to admin-exec but
instead stops.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch adds support for enabling LLDP using the std IEEE 802.1ab
LLDP yang model.  An infix-lldp model is as well to reduce the set of
available parameters to a bare minimum (enabled), for now.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Monday fixup, audit with @wkz

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
src/confd/yang/infix-services@2023-08-22.yang Show resolved Hide resolved
test/infamy/__init__.py Outdated Show resolved Hide resolved
test/case/infix_services/services_basic.py Outdated Show resolved Hide resolved
test/case/infix_services/services_basic.py Outdated Show resolved Hide resolved
This first version reliles on netcat (nc), mostly because that's what I
could figure out how to run in a netns.  A better way would be to have a
full SsdpClient that can collect query responses properly and log all
devices found.

This, however, will do fine for verifying SSDP on/off functionality.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This test use NETCONF to enable/disable SSDP, it then verifies that the
DUT responds to, or does not respond to, SSDP discover messages.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This unfortunately required some restructuring, and as well as extending
the run time since we have no way of sending Ethernet frames currently
in the test framework (socat would be nice).

 - Put enable/disable of services before tcpdump start, LLDP lingers ...
 - Extend run time: 3 -> 20 sec to catch periodic LLDP messages

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Bootstrap and daemon-specific helper scripts, sometimes known as foot
guns, should not be in $PATH.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
See issue #126 for details.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@wkz wkz merged commit e3d9236 into main Aug 30, 2023
2 checks passed
@wkz wkz deleted the configurable-services branch August 30, 2023 08:37
@troglobit troglobit mentioned this pull request Jul 2, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants