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-chkconfig: add chkconfig function to enable/disable services #1155

Closed
wants to merge 1 commit into from

Conversation

stdweird
Copy link
Member

No description provided.

@stdweird stdweird added this to the 17.8 milestone Aug 10, 2017
@stdweird
Copy link
Member Author

stdweird commented Aug 10, 2017

i'm really fed up with the usual way of enabling services.
i was going to add the on+startstop=true as default via schema, but quattor/pan#163 got in my way

@stdweird stdweird force-pushed the chkconfig_default_enable branch from 05a4f37 to 479dc3c Compare August 10, 2017 13:33
Copy link
Contributor

@ned21 ned21 left a comment

Choose a reason for hiding this comment

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

Seems a nice helper function which adds value.

Can you split the PAN cleanup into a separate commit please?

@{Enables (on + startstop=true) all arguments as services.
If argument starts with a -, it is disabled (off + startstop=true).
Use as e.g.
"/software/components" = chkconfig("service1", "-service2");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it necessary to escape the = ?

Copy link
Member Author

Choose a reason for hiding this comment

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

pan bug quattor/pan#127

Copy link
Contributor

Choose a reason for hiding this comment

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

😢

if (m[1] == '-') {
what = 'off';
};
SELF['chkconfig']['service'][escape(m[2])] = dict(what, '', 'startstop', true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you operate a level lower in the tree? This will cause an error if any part of /software/components is marked final since the compiler cannot tell that you are only modifying the chkconfig subtree.

Copy link
Member Author

Choose a reason for hiding this comment

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

i don't understand what you mean here. but if you want

"/software/components/chkconfig" = chkconfig(...);

we need a new function name. i don't like redundancy in names

Copy link
Member Author

Choose a reason for hiding this comment

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

i opened quattor/pan#164

Copy link
Contributor

Choose a reason for hiding this comment

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

I doubt the PAN bug is going to get fixed in time for 17.8 so how do we proceed? I can't think of a better name for the function than chkconfig()

@jrha jrha modified the milestones: 17.8, 17.10 Sep 14, 2017
@ned21
Copy link
Contributor

ned21 commented Oct 25, 2017

As discussed at workshop, fixing quattor/pan#166 solves this in a better way so closing won't fix.

@ned21 ned21 closed this Oct 25, 2017
@ned21 ned21 added the wontfix label Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants