Issue #2437 has been updated by Ludovic LANGE. Status changed from Accepted to In Topic Branch Pending Review
Hello, I tried to fix this, you can find the pull request here : [https://github.com/puppetlabs/puppet/pull/1263](https://github.com/puppetlabs/puppet/pull/1263) The examples given by Mike Watson (comment 5) and Gabriel Filion (comment 3) should now be fixed. However, the exemple by Sven Muller (original bug description) should be modified from `...TABLE_NAME=\"$ARG1$\";" --name2 ...` to `...TABLE_NAME=\"$ARG1$\"\;" --name2 ...` (escaping the semicolon) otherwise it will not work with Nagios (nor the parser) Please test and see if it fixes your issues and does not introduce regressions. On my side I tested with rspec tests and also on a real-life dataset, but of course it must be tested externally. ---------------------------------------- Bug #2437: nagios commands containing a semicolon (in quoted string) cause rewriting of config on each run https://projects.puppetlabs.com/issues/2437#change-75919 Author: Sven Mueller Status: In Topic Branch Pending Review Priority: High Assignee: Category: Target version: Keywords: Branch: When I have a nagios command defined in puppet like this: <pre> nagios_command { "nagios_table_size": command_line => '$USER3$/check_mysql_health --hostname localhost --username nagioschecks --password nagiosCheckPWD --mode sql --name "SELECT ROUND(Data_length/1024) as Data_kBytes from INFORMATION_SCHEMA.TABLES where TABLE_NAME=\"$ARG1$\";" --name2 "table size" --units kBytes -w $ARG2$ -c $ARG3$', } </pre> It causes the nagios config to be re-written (and thus nagios restarted) each time puppetd runs. It writes the configuration correctly, but it reads the command_line part of the nagios config back only up to the semicolon ";" before --name2 This is quite annoying when you get a notification about a changed nagios configuration every time puppetd runs ;-) I assume this is caused by the (too simple?) regexp that is searching for inline comments in nagios configuration lines, but I'm not sure. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
