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

lib: mgmtd: convert affinitymap to mgmtd #15153

Closed

Conversation

choppsv1
Copy link
Contributor

No description provided.

Copy link

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

@choppsv1 choppsv1 force-pushed the chopps/convet-affinity-map branch 2 times, most recently from 161c693 to ed16541 Compare January 16, 2024 15:38
@choppsv1 choppsv1 changed the title [NOTYET] lib: mgmtd: convert affinitymap to mgmtd lib: mgmtd: convert affinitymap to mgmtd Jan 16, 2024
@choppsv1 choppsv1 force-pushed the chopps/convet-affinity-map branch from ed16541 to e25b57a Compare January 16, 2024 15:42
@@ -101,7 +93,7 @@ void cli_show_affinity_map(struct vty *vty, const struct lyd_node *dnode,
void affinity_map_init(void)
{
/* CLI commands. */
install_node(&affinitymap_node);
// install_node(&affinitymap_node);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove it completely instead of commenting it out?

@@ -566,6 +567,9 @@ void mgmt_vty_init(void)
* backend components that are moved to new MGMTD infra
* here one by one.
*/
affinity_map_init();
if_cmd_init(NULL);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if_cmd_init is already called in mgmt_main.c. Probably makes sense to move it here together with vrf_cmd_init, but we definitely don't want double initialization.

@mwinter-osr
Copy link
Member

PR is failing on the RPM based systems as the lib/affinitymap_cli.c is not included in the make dist archive.
Add lib/affinitymap_cli.c to lib/subdir.am and it should build fine.

@choppsv1
Copy link
Contributor Author

PR is failing on the RPM based systems as the lib/affinitymap_cli.c is not included in the make dist archive. Add lib/affinitymap_cli.c to lib/subdir.am and it should build fine.

What should I add it to inside lib/subdir.am? We do not want it built or linked in to libfrr.a so where is the correct place to add it?

@choppsv1 choppsv1 force-pushed the chopps/convet-affinity-map branch 2 times, most recently from 3cebaf6 to ce364e3 Compare January 17, 2024 08:57
@choppsv1 choppsv1 force-pushed the chopps/convet-affinity-map branch from ce364e3 to 73f33ad Compare January 17, 2024 09:09
@choppsv1
Copy link
Contributor Author

PR is failing on the RPM based systems as the lib/affinitymap_cli.c is not included in the make dist archive. Add lib/affinitymap_cli.c to lib/subdir.am and it should build fine.

The fix was to use the "dist" version of _SOURCES rather than nodist_ inside mgmtd/subdir.am

Copy link
Contributor

@pushpasis pushpasis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this change would mean any new component using affinity-maps would have to be moved to mgmtd infra first (Hope my deduction here was right). Do we really want to put such restrictions?

The new hooks now directly need a dnode as argument. why could we not have retained the old arguments and internally derive it in lib/affinity_map.c before calling the hook. This way the library can be moved to mgmtd without having the clients moved to mgmtd infra too.

This should be discussed in the weekly meeting first. Was this restriction explicitly discussed? I could not attend the weekly for last few weeks. Hence I am not sure.

@idryzhov
Copy link
Contributor

@pushpasis you can keep sending affinity-map commands to non-converted daemons directly, bypassing mgmtd. There's no restriction. This is how VRFs/interfaces work at the moment.

@choppsv1
Copy link
Contributor Author

Making this change would mean any new component using affinity-maps would have to be moved to mgmtd infra first (Hope my deduction here was right). Do we really want to put such restrictions?

Even if it doesn't do this, yes mgmtd cannot be a 1/2-baked project that lingers around forever that way. We need to transition, and we don't need to make it easy for people to keep avoiding this with new work. New work needs to use mgmtd .

We can discuss this in the development meeting but I would be shocked if that's not the answer.

Copy link

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

@idryzhov
Copy link
Contributor

This is included into #15181 now. It's a single commit: 3e2ce0e

@idryzhov idryzhov closed this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants