-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add Journald support #14
Conversation
manifests/init.pp
Outdated
if !empty($journald_settings) { | ||
service{'systemd-journald': | ||
ensure => running, | ||
} |
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.
Do we only want to manage journald if settings are passed, or always?
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.
I'm totally open, I just did an implementation that was the most non-intrusive.
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.
I'd say we might aswell manage it if we're going to.
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.
@duritong can you make the change to always manage it then?
086f52e
to
6528a20
Compare
Ok, I pushed a rebased version that manages the journald service all the time. |
When can we get this merged? |
I understand wanting to put all of the systemd subsystems under the We forked https://github.com/cristifalcas/puppet-journald over at https://github.com/simp/pupmod-simp-journald to continue on with it, get it updated, and add our tests so I would recommend not adding |
Given the size of those modules I wonder if a |
@ekohl The issue isn't the size, it's the fact that the API for journald and systemd settings change independently and a change to either would cause a (potentially breaking) change to the API. You would basically end up with two forks running under this project to keep track of minute changes in either subsystem. |
@trevor-vaughan I'm not that familiar with it so I'll let you judge it then. |
@mcanevet what do you think? Should we manage journald (and all its friends eventually) or let other modules do that (like @trevor-vaughan suggested)? |
@raphink Our team is okay with (and prefers) one module for both systemd and journald, |
We've been running @duritong 's journald patch for quite a while. Seeing a strange issue on CentOS 7.4 - when puppet refreshes the systemd-journald service, the agent run silently dies. EDIT: FYI - this happens when the puppet agent run is launched by cloud-init. |
@raphink and @mcanevet I would like to point out that both |
@mcanevet what's your take on this? |
Personally I would be fine to have this PR in this module. Journald is, besides timesyncd, resolved and the actual init systemd, part of the systemd project. I see this module as something that managed the project, not only the init system. @trevor-vaughan systemd itself (the init system) and systemd-journald have different options In a well designed code, breaking changes in one of those components shouldn't effect the other components, so I don't see an issue here. The module may need a major release to support those changes, but that should only affect this specific component (e.g. journald) and not the rest. |
This module already has support for managing networkd, resolved, timesyncd, so I think managing journald is totally fine as long as the default behavior is to not manage it. @duritong are you still interested in this PR? Can you rebase it? @trevor-vaughan would you be okay with this? |
manifests/init.pp
Outdated
@@ -1,7 +1,8 @@ | |||
# -- Class systemd | |||
# This module allows triggering systemd commands once for all modules | |||
class systemd ( | |||
$service_limits = {} | |||
$service_limits = {}, |
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.
Those parameters need datatypes
spec/classes/init_spec.rb
Outdated
|
||
describe 'systemd' do | ||
|
||
let(:facts) { { |
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.
could you use rspec-puppet-facts instead?
a9a8603
to
155b374
Compare
Sure, if it gives the chance to get it merged... |
} | ||
$systemd::journald_settings.each |$option, $value| { | ||
ini_setting{ | ||
$option: |
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.
interesting format, I haven't seen it this way in the past.
metadata.json
Outdated
}, | ||
{ | ||
"name": "puppetlabs/inifile", | ||
"version_requirement": ">= 1.6.0 <2.0.0" |
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.
can you bump the version requirement to < 3.0.0? 2.2.0 is the latest release.
Hi @duritong, thanks for rebasing it. I found one little issue that needs to be fixed. I'm going to merge this tomorrow unless somebody raises concerns. |
155b374
to
2a7b238
Compare
Any chance of actually getting this merged? |
@bastelfreak Arg...sorry that I missed this until now. You said previously:
But this is exactly my issue. In this case, I can't reliably pin on an upper bound because features in two different subsystems can change independently and in potentially breaking changes. This increases the likelihood of forks if someone needs the fixes to the Note that several of the major OS vendors take in subsystem patches at different rates so there is a relatively good chance that the module will end up in this scenario. It's irritating, but |
@trevor-vaughan so we are testing against a fixed list operating systems, and it is pretty unlikely that for example RHEL 7.6 gets an update to 7.7 that pulls in a breaking change within the journald config. We do not even care about breaking changes within journald, right? As long as it still eats the config we provide. We have support for timesyncd/resolved and it is pretty generic and opt in. I think this pattern would be fine for journald as well. And a breaking change within this module for either the init part or any of the other components would result in another major release, so pinning to an upper version boundary works. Overall I think this would be fine? @elfchief it cannot be merged because it has merge conflicts (and there is still a little debate going on). If you are interested in this PR, you can checkout the feature branch, rebase it, add a switch to enable/disable the management, like we do it here: Afterwards we can review it again. |
@bastelfreak I have no concerns about EL7 updates but I do worry about the same module trying to take care of EL and Ubuntu since they tend to pull in different changes over time. I suppose that it can always be split in the future if necessary. |
As a side note: We (Vox Pupuli) are currently working on beaker tests no AWS. That will allow us to do acceptance tests within real virtual machines and not only docker instances on travis. My plan is to implement the same for this module, so we know it actually works. If anybody is familiar with the beaker-aws module and wants to help please reach out to me or @dhollinger. |
2a7b238
to
4733e42
Compare
I rebased it once again. |
4733e42
to
d4944c0
Compare
So I rebased again. |
/me dancing. thx! |
Correct format of fixtures file.
Make it possible to manage journald settings