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-systemd: initial support for systemd unit control #424
Conversation
It's a lot of code, and it can't do much yet (but it's not so trivial as chkconfig 😄 ) Known issues
Feedback is welcome, no need to review the |
@ned21 don't review per commit. There is some major rework done at the end, i'm open to suggestion how to rewrite the git history. |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
sshd => 1, | ||
); | ||
|
||
Readonly my $BASE => "/software/components/systemd"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use $self->prefix
instead as this then allows module "aliasing"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ned21 what do you mean with aliasing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, it makes things complicated on my end as Systemd::Service
is not a component. i'll have to think about this.
the current usage i have in mind is to use unmodified ncm-chkconfig
profiles under EL7 by including the following template in EL7:
https://github.com/stdweird/configuration-modules-core/blob/systemd/ncm-systemd/src/main/pan/components/systemd/legacy/chkconfig.pan
it sets an alias on ncm-chkconfig
for a partial ncm-systemd
, namely the part of ncm-systemd
that deals with services. (ncm-systemd
will also be able to do e.g. unit configuration, the equivalent of current ncm-sysconfig
).
Could we merge this one (with or without @ned21 suggested change) to allow give it some early exposure for those starting to look at EL7. I think this is in line with Grenoble discussion. As it is still not use in any part of the template library, it is harmless if the component is not yet rock solid. We may add a disclaimer in the doc that this is an early/beta version and that many things are subject to change in the next release, including the schema... What do you think? |
@jouvin i'd like things reviewed before merged in. i also found that the |
Ok, as you prefer. As I said, personnally I don't mind putting a beta version of a new component (not an existing one!) in a release if we manage to put a disclaimer somewhere... |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
… but has an active unit that it is triggeredby, is considered active.
Refer to this link for build results (access rights to CI server needed): |
current state: we run this in production as pure replacement for ncm-chkconfig using nothing more then
in the and a modification to the
everything else is unmodified wrt templates and it seems to work quite ok. |
see quattor/template-library-core#63 for the schema change |
Refer to this link for build results (access rights to CI server needed): |
I really want this in 15.4, I'll try and find some time to sit down and go through the code, but the more reviewers the better! |
# they do show up in list-units --all | ||
# even when only chkconfig --add is used | ||
# systemctl mask removes it from the output of chkconfig --list | ||
# systemctl umask restores it to last known state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umask => unmask
The code looks OK although I am not sure it will give very useful output in NoAction mode without the "list" commands to provide data to work with. I don't know anything about systemd to conclude whether this is the "right" way to implement this but I guess the schema and use of the component was reviewed at the workshop? |
@ned21 |
…rmless (i.e. that only query for iniformation, not for making changes)
…ist to avoid unnecessary warnings
Refer to this link for build results (access rights to CI server needed): |
I'm trying to use
Do I need an updated schema? |
Works like a charm :) Thanks for this very useful contribution. I'll add the suggested include as part of the base EL7 config in the template library: this will make the transition very easy. As far as I'm concerned, I think it is ready for merging. |
Agreed. |
Were @ned21's comments about |
@jouvin yes, the second last commit should do that |
ncm-systemd: initial support for systemd unit control
Provide inital framework to handle systemd units.