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

ncm-metaconfig 23.6: daemon name should be escaped/unescaped #1672

Open
jouvin opened this issue Mar 17, 2024 · 2 comments
Open

ncm-metaconfig 23.6: daemon name should be escaped/unescaped #1672

jouvin opened this issue Mar 17, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@jouvin
Copy link
Contributor

jouvin commented Mar 17, 2024

Currently, the daemon names in daemons resource are interpreted as plain string. It works for all standard services but not for template services with multiple instance where an instance name is named template_service@instance, as @ is an invalid character in a dict key. A workaround is probably possible using the actions but it would be good to support such service names which probably means that metaconfig should interpret the daemon names as escaped strings. It should not really pose backward compatibility problems as it is unlikely that a standard service name matches an escaped name.

@jouvin
Copy link
Contributor Author

jouvin commented May 17, 2024

@stdweird @jrha I have seen no reply to my issue and it is a real issue for us as we are relying more and more on template units for things like uwsgi, gunicorn.... Do you agree that the change would be harmless/acceptable or did I miss something?

@stdweird
Copy link
Member

more things that slipped my radar...

i agree, fix should be as simple as replacing https://github.com/quattor/CAF/blob/master/src/main/perl/ServiceActions.pm#L116 with

    foreach my $escdaemon (sort keys %{$pairs || {}}) {
        my $daemon = unescape($escdaemon);
        my $action = $pairs->{$daemon};

and importing the unescape from some CCM module

also updating the docs somewhere i guess

@jrha jrha added this to the 24.3 milestone May 20, 2024
@jrha jrha added the bug label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants