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

Add Suse 12 support #57

Merged
merged 1 commit into from
Feb 3, 2015
Merged

Conversation

anders-larsson
Copy link
Contributor

File 'sysconfig.suse12.erb' is the stock version of /etc/sysconfig/syslog with the comment (#) removed from the 'RSYSLOGD_PARAMS' line. rsyslog is started with '-n' as argument in either case.

@anders-larsson
Copy link
Contributor Author

Please don't merge it yet. When rsyslog is started the following error occurs:

Nov  5 10:16:32 eselivm2v523l rsyslogd-2207: error during parsing file /etc/rsyslog.conf, on or before line 49: warnings occured in file '/etc/rsyslog.conf' around line 49 [try http://www.rsyslog.com/e/2207 ]

@anders-larsson
Copy link
Contributor Author

Previous version SLES11.3 uses version rsyslog-5.10 while SLES12 uses rsyslog-8.10. Setting to compatibility mode to version 4 (like it's done for RHEL7) fixes this issue.

Since compatibility mode is used for RHEL7 I guess it should be used on SLES12 as well.

@anders-larsson
Copy link
Contributor Author

Nevermind. Compatibility mode seems to have been removed in version 8 or earlier.
From the man-page:

       -c version
              This option has been obsoleted and has no function any longer. It is still accepted in  order  not  to
              break existing scripts. However, future versions may not support it.

@anders-larsson
Copy link
Contributor Author

@ghoneycutt It seems like it's not an acceptable syntax to send messages to everyone logged in. Previously it was ok to say output is '' now it needs to be ':omusrmsg:' instead.

How do you want this implemented? Do you want a new configuration version added (rsyslog_conf_version). However it would be quite a jump from configuration version 2 and 3 to 8.

@anders-larsson
Copy link
Contributor Author

Hello again.

I'll be adding version 5 of the rsyslog config. Module ":omusrmsg:*" was implemented in rsyslog 5 and will be used instead of * for emergency messages. This will require a few changes to the module however.

Please don't merge the pull request in its current state. A new revision will be available as soon as I'm ready. Thank you.

@anders-larsson anders-larsson force-pushed the suse12_support branch 2 times, most recently from 7ba3e70 to 1fe0c6f Compare November 5, 2014 14:18
@anders-larsson
Copy link
Contributor Author

Please have a look now :)

@anders-larsson
Copy link
Contributor Author

I've tested this commit on the versions mentioned below. Rsyslog config version will be bumped to v5 on systems which are >= 5. These systems will also use ':omusrmsg:' instead of ''.
I didn't see any changes to any other version.

3.18.3
3.22.1
4.2.0
4.6.2
5.10.1
5.8.10
5.8.6
5.8.7
7.4.2
7.4.7
8.4.0

@ghoneycutt
Copy link
Owner

@Phil-Friderici In light of PR #58 do you mind rebasing this one after #58 is rebased?

@anders-larsson
Copy link
Contributor Author

@ghoneycutt What's needed for this request to be merged? Are we waiting for a rebase?

@ghoneycutt
Copy link
Owner

This was waiting on #61 to be merged, which I just did and released as v0.14.0. It now needs to be rebased and tested.

@anders-larsson
Copy link
Contributor Author

@ghoneycutt I've rebased the changes and verified it on the following versions:

2.0.6
3.18.3
3.22.1
4.2.0
4.6.2
5.10.1
5.8.10
5.8.6
5.8.7
7.4.7
8.4.0

@ghoneycutt
Copy link
Owner

Hi @anders-larsson

The code shows that it supports rsyslog v2, 3 and 5, though your testing shows it also work with v4, 7 and 8. Shouldn't we change the code around here[1] to show that?

I think it is safe to safe we support rsyslog v2-8, would you agree?

[1] - https://github.com/ghoneycutt/puppet-module-rsyslog/pull/57/files#diff-60ae41fd0a31977447947f59940ee9a4L65

@ghoneycutt
Copy link
Owner

Oh and thanks again for taking the time to rebase and see this through, I appreciate it!

@anders-larsson
Copy link
Contributor Author

Agreed. We should be able change that line to all versions between version 2 and 8. I found an issue with logrotate and SLES12 (or actually systemd) since /etc/init.d/rsyslog doesn't exist anymore with systemd. We could change '/etc/init.d/syslog reload > /dev/null' with 'service syslog reload > /dev/null'. I've verified that it works on SLES 10.{2,3,4} and SLES 11.{0.1.2.3} and finally SLES12. Otherwise we'll need to add a specific code path for SLES 12.

@Phil-Friderici
Copy link
Contributor

@anders-larsson good point. I would also prefer to switch to 'service syslog reload'.

@anders-larsson anders-larsson force-pushed the suse12_support branch 2 times, most recently from 639a02a to b2f5a47 Compare January 21, 2015 10:41
@anders-larsson
Copy link
Contributor Author

I've amended my previous change with the changes we've mentioned. Please verify it looks OK. Would be awesome if someone could test it as well since it actually does quite a few changes to the module.

However it doesn't work to define rsyslog_conf_version as an integera in hiera at the moment. It can only be sent to the module as an string. I'm not really a fan of converting everything to strings just to convert it back to an integer in the class. What's your suggestion?

@ghoneycutt
Copy link
Owner

Ugh.. we have to support strings in Hiera. On the brighter side, I think that the way strings work in Puppet/Ruby, it should just work. :)

@anders-larsson
Copy link
Contributor Author

Ugh.. we have to support strings in Hiera. On the brighter side, I think that the way strings work in Puppet/Ruby, it should just work. :)

Strings does work. However giving an integer input in hiera does not. Is it supported to supply integers to classes in hiera?

@ghoneycutt
Copy link
Owner

I meant that you have to assume people will use strings in Hiera

@ghoneycutt
Copy link
Owner

@anders-larsson how's it coming with this?

@Phil-Friderici
Copy link
Contributor

@ghoneycutt the code support strings. It expect the user to pass the strings 'USE_DEFAULTS' or '2' to '8' into $rsyslog_conf_version. What did we miss here ?

@ghoneycutt
Copy link
Owner

Looks good, just needs a rebase

@Phil-Friderici
Copy link
Contributor

feasible ;)

@anders-larsson
Copy link
Contributor Author

Rebased! :)

ghoneycutt added a commit that referenced this pull request Feb 3, 2015
@ghoneycutt ghoneycutt merged commit 9225d67 into ghoneycutt:master Feb 3, 2015
@ghoneycutt
Copy link
Owner

Released in v0.16.0

@anders-larsson anders-larsson deleted the suse12_support branch July 28, 2015 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants