Issue #2437 has been updated by Sven Mueller.
Ludovic LANGE wrote: > 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. The example I stated in the original bug was working with Nagios as best I can tell, with the single exception that puppet kept saying that it updated the line when it actually rewrote the very same line. However, I don't have access to the puppet/nagios codebase in question anymore (switched jobs since reporting the bug), so I can't really tell if your change fixes things for my previous employer and if escaping the ; is acceptable to them or not. I will try and contact an ex-colleague to get them into the loop though. ---------------------------------------- Bug #2437: nagios commands containing a semicolon (in quoted string) cause rewriting of config on each run https://projects.puppetlabs.com/issues/2437#change-76072 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.
