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

Could not evaluate: Augeas didn't load /etc/rsyslog.conf with Rsyslog.lns #4

Open
aellert opened this issue Feb 17, 2016 · 4 comments

Comments

@aellert
Copy link

aellert commented Feb 17, 2016

I'm using Debian 7 and have this error with default augeas Debian packages :

Could not evaluate: Augeas didn't load /etc/rsyslog.conf with Rsyslog.lns

Package versions :
augeas-lenses 0.10.0-1
libaugeas-ruby 0.4.1-1.1
libaugeas-ruby1.9.1 0.4.1-1.1
libaugeas0 0.10.0-1

If I upgrade to wheezy-backports packages :
augeas-lenses 1.2.0-0.2+deb8u1bpo70+1
libaugeas-ruby 0.5.0-2
bpo70+1
libaugeas-ruby1.9.1 0.5.0-2bpo70+1
libaugeas0 1.2.0-0.2+deb8u1
bpo70+1
ruby-augeas 0.5.0-2~bpo70+1

I have this error message :

err: /Stage[main]/Syslog::Central_server/Syslog[central server]/ensure: change from absent to present failed: Could not set 'present on ensure: Failed to save Augeas tree to file. See debug logs for details. at /etc/puppet/environments/production/modules/syslog/manifests/central_server.pp:27

Also, I have other augeas errors related to other puppet modules.

Content of central_server.pp :

class syslog::central_server {

  syslog { "central server":
    ensure      => present,
    facility    => "local2",
    level       => "*",
    action_type => "hostname",
    action      => "myserver.local",
    provider    => "rsyslog",
  }

}

I don't know how to solve and if it's related to your code. Maybe just a Debian problem..
Any help would be greatly appreciated.

thank you.

@aellert
Copy link
Author

aellert commented Feb 17, 2016

Here is the puppet agent -t --debug
debug: Puppet::Type::Syslog::ProviderRsyslog: Save failure details: /augeas/files/etc/rsyslog.conf/error/path = /files/etc/rsyslog.conf/entry/action /augeas/files/etc/rsyslog.conf/error/lens = /usr/share/augeas/lenses/dist/rsyslog.aug:41.16-.39: /augeas/files/etc/rsyslog.conf/error/message = Failed to match { /no_sync/ }?{ /file/ = /\/[^\001-\004\t\n ]+/ } | { /protocol/ = /@{1,2}/ }{ /hostname/ = /[0-9A-Za-z]([0-9A-Za-z-]*[0-9A-Za-z])?(\\.[0-9A-Za-z]([0-9A-Za-z-]*[0-9A-Za-z])?)*/ }({ /port/ = /[0-9]+/ })? | { /user/ = /[0-9A-Za-z][.0-9A-Z_a-z-]*/ }({ /user/ = /[0-9A-Za-z][.0-9A-Z_a-z-]*/ })* | { /user/ = /\\*/ } | { /program/ = /[^\001-\004\t\n ][^\001-\004\n]+[^\001-\004\t\n ]/ } | { /omusrmsg/ = /[0-9A-Za-z][.0-9A-Z_a-z-]*/ }({ /omusrmsg/ = /[0-9A-Za-z][.0-9A-Z_a-z-]*/ })* | { /omusrmsg/ = /\\*/ } with tree { "hostname" = "myserver.local" }

@raphink
Copy link
Member

raphink commented Feb 17, 2016

Does augtool parse the file OK?

@aellert
Copy link
Author

aellert commented Feb 17, 2016

Hello,

Thanks for your prompt answer.
I assume these commands are telling us that augeas is able to parse
rsyslog.conf :

augtool print /augeas/files/etc/rsyslog.conf/error

augtool

augtool> ls /augeas/files/etc/rsyslog.conf/error/
augtool>

2016-02-17 12:49 GMT+01:00 Raphaël Pinson [email protected]:

Does augtool parse the file OK?


Reply to this email directly or view it on GitHub
#4 (comment)
.

@raphink
Copy link
Member

raphink commented Feb 17, 2016

That seems good indeed. Does print /files/etc/rsyslog.conf return something?

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

No branches or pull requests

2 participants