Jira (PUP-8489) inifile no longer manages existing lines in puppet post 5.4.0

2018-02-26 Thread Jacob Helwig (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jacob Helwig commented on  PUP-8489  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: inifile no longer manages existing lines in puppet post 5.4.0   
 

  
 
 
 
 

 
 This looks like it's actually a problem with the inifile module itself. If you set "refreshonly => false" in the manifest for the resource, we get the exact same behavior with or without c98bb6787f. insync? in the type should be checking if :refreshonly is present, and that it's not the symbol :false. The issue c98bb6787f introduced is that now both the default false value, and an explicit false value cause :refreshonly to be present as the symbol :false instead of just an explicit false value.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-8489) inifile no longer manages existing lines in puppet post 5.4.0

2018-02-23 Thread Past Haus (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Past Haus commented on  PUP-8489  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: inifile no longer manages existing lines in puppet post 5.4.0   
 

  
 
 
 
 

 
 These are the modules where it seems to work with: {{accounts apache archive chocolatey concat dotnet epel gitlab graphite_powershell hiera iis inifile java_ks logstash memcached ntp pe_metric_curl_cron_jobs powershell reboot registry sensu stdlib vcsrepo windows_env windowsfeature wsus_client acl apt aws chocolatey_server docker elasticsearch firewall grafana haproxy hocon influxdb java jenkins logstashforwarder nginx openldap postgresql puppetserver_gem redis rsyslog staging tomcat windows_autoupdate windows_eventlog windows_firewall yum}}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-8489) inifile no longer manages existing lines in puppet post 5.4.0

2018-02-23 Thread Past Haus (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Past Haus commented on  PUP-8489  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: inifile no longer manages existing lines in puppet post 5.4.0   
 

  
 
 
 
 

 
 A bisect showed this commit as the culprit: https://github.com/puppetlabs/puppet/commit/c98bb6787fa2ec04842a92924dd4eb8e41bddd78 Also I can't explain why having multiple modules in codedir made the problem go away but having only the one module in codedir doesn't work.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-8489) inifile no longer manages existing lines in puppet post 5.4.0

2018-02-23 Thread Past Haus (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Past Haus updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8489  
 
 
  inifile no longer manages existing lines in puppet post 5.4.0   
 

  
 
 
 
 

 
Change By: 
 Past Haus  
 

  
 
 
 
 

 
 .comm *Puppet Version: f77e9e00efcf9bd8dac66c6622f35cbe16c8eb7a (5.5.0)* *Puppet Server Version: (5.2.0)* *OS Name/Version: Rhel 7*Describe your issue in as much detail as possible… Describe steps to reproduce…*Desired Behavior:*Even when using a codedir with only the inifile module installed, it should work.In this example, {{/tmp/configure_inifile.aPkO3n}} is a tmpdir with just the inifile module installed.An inifile resource such as the following should modify the existing java_args line: {code}[root@b3wa4ws5mg41efr ~]# puppet apply --codedir /tmp/configure_inifile.aPkO3n -e 'ini_setting { "JAVA_ARGS": ensure => present, path => "/etc/sysconfig/puppetserver", section => "", setting => "JAVA_ARGS", key_val_separator => "=", value => "\"-Xmx2g -Xms2g -XX:+PrintTenuringDistribution -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/var/log/puppetlabs/puppetserver/gc.log\"",}'{code}In this case the value of JAVA_ARGS in the file is {{JAVA_ARGS="-Xms2g -Xmx2g -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"}}*Actual Behavior:*It does not. inifile seems to be able to remove lines and add lines that don't already exist, but modifying existing lines does not work. Unfortunately even with --trace, --verbose and --debug there isn't anything useful coming out of the module. Note: this seems to only be the case when inifile is installed in its own codedir and {{puppet apply --codedir $codedir}} is used. When inifile is present in {{/etc/puppetlabs/code/environments/production/modules/inifile}} with other modules the resource behaves as expected.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 
   

Jira (PUP-8489) inifile no longer manages existing lines in puppet post 5.4.0

2018-02-23 Thread Past Haus (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Past Haus commented on  PUP-8489  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: inifile no longer manages existing lines in puppet post 5.4.0   
 

  
 
 
 
 

 
 Minimal reproducer: 
 
Make a tmpdir ($tmpdir) 
Install inifile module to $tmpdir puppet module install puppetlabs-inifile --codedir $tmpdir 
Make a file with SETTING="foo" in it (call it temp-file) 
Make the following puppet manifest (call it test-resource.pp):  
 
 
 
 
 ini_setting { "JAVA_ARGS":  
 
 
ensure=> present,  
 
 
 path => "/path/to/temp-file",  
 
 
  section => "",  
 
 
   setting=> "SETTING",  
 
 
key_val_separator => "=",  
 
 
 value=> "BAR",  
 
 
 }  
 
 
 
  
Run the following puppet code puppet apply --codedir $tmpdir test-resource.pp 
Watch nothing happen when it should (then try it with 5.4.0 and watch it work) 
  
 
   

Jira (PUP-8489) inifile no longer manages existing lines in puppet post 5.4.0

2018-02-23 Thread Past Haus (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Past Haus updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8489  
 
 
  inifile no longer manages existing lines in puppet post 5.4.0   
 

  
 
 
 
 

 
Change By: 
 Past Haus  
 

  
 
 
 
 

 
 *Puppet Version: f77e9e00efcf9bd8dac66c6622f35cbe16c8eb7a (5.5.0)* *Puppet Server Version: (5.2.0)* *OS Name/Version: Rhel 7*Describe your issue in as much detail as possible… Describe steps to reproduce…*Desired Behavior:*Even when using a codedir with only the inifile module installed, it should work.In this example, {{/tmp/configure_inifile.aPkO3n}} is a tmpdir with just the inifile module installed.An inifile resource such as the following should modify the existing java_args line: {code}[root@b3wa4ws5mg41efr ~]# puppet apply --codedir /tmp/configure_inifile.aPkO3n -e 'ini_setting  \ { "JAVA_ARGS": ensure => present, path => "/etc/sysconfig/puppetserver", section => "", setting => "JAVA_ARGS", key_val_separator => "=", value => "\"-Xmx2g -Xms2g -XX:+PrintTenuringDistribution -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/var/log/puppetlabs/puppetserver/gc.log\"",}'{code}In this case the value of JAVA_ARGS in the file is {{JAVA_ARGS="-Xms2g -Xmx2g -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"}}*Actual Behavior:*It does not. inifile seems to be able to remove lines and add lines that don't already exist, but modifying existing lines does not work. Unfortunately even with --trace, --verbose and --debug there isn't anything useful coming out of the module. Note: this seems to only be the case when inifile is installed in its own codedir and {{puppet apply --codedir $codedir}} is used. When inifile is present in {{/etc/puppetlabs/code/environments/production/modules/inifile}} with other modules the resource behaves as expected.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 
  

Jira (PUP-8489) inifile no longer manages existing lines in puppet post 5.4.0

2018-02-23 Thread Past Haus (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Past Haus updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8489  
 
 
  inifile no longer manages existing lines in puppet post 5.4.0   
 

  
 
 
 
 

 
Change By: 
 Past Haus  
 

  
 
 
 
 

 
 *Puppet Version: f77e9e00efcf9bd8dac66c6622f35cbe16c8eb7a (5.5.0)* *Puppet Server Version: (5.2.0)* *OS Name/Version: Rhel 7*Describe your issue in as much detail as possible… Describe steps to reproduce…*Desired Behavior:*Even when using a codedir with only the inifile module installed, it should work.In this example, {{/tmp/configure_inifile.aPkO3n}} is a tmpdir with just the inifile module installed.An inifile resource such as the following should modify the existing java_args line: {code}[root@b3wa4ws5mg41efr ~]# puppet apply --codedir /tmp/configure_inifile.aPkO3n -e 'ini_setting \{ "JAVA_ARGS": ensure => present, path => "/etc/sysconfig/puppetserver", section => "", setting => "JAVA_ARGS", key_val_separator => "=", value => "\"-Xmx2g -Xms2g -XX:+PrintTenuringDistribution -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/var/log/puppetlabs/puppetserver/gc.log\"",}'{code}In this case the value of JAVA_ARGS in the file is {{JAVA_ARGS="-Xms2g -Xmx2g -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"}}*Actual Behavior:*It does not. inifile seems to be able to remove lines and add lines that don't already exist, but modifying existing lines does not work. Unfortunately even with --trace, --verbose and --debug there isn't anything useful coming out of the module. Note: this seems to only be the case when inifile is installed in its own codedir and {{puppet apply --codedir $codedir}} is used. When inifile is present in {{/etc/puppetlabs/code/environments/production/modules/inifile}}  with other modules  the resource behaves as expected.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 
  

Jira (PUP-8489) inifile no longer manages existing lines in puppet post 5.4.0

2018-02-23 Thread Past Haus (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Past Haus created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8489  
 
 
  inifile no longer manages existing lines in puppet post 5.4.0   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Affects Versions: 
 PUP 5.5.0  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2018/02/23 3:15 PM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Past Haus  
 

  
 
 
 
 

 
 Puppet Version: f77e9e00efcf9bd8dac66c6622f35cbe16c8eb7a (5.5.0) Puppet Server Version: (5.2.0) OS Name/Version: Rhel 7 Describe your issue in as much detail as possible… Describe steps to reproduce… Desired Behavior: Even when using a codedir with only the inifile module installed, it should work. In this example, /tmp/configure_inifile.aPkO3n is a tmpdir with just the inifile module installed. An inifile resource such as the following should modify the existing java_args line:   
 
 
 
 
 [root@b3wa4ws5mg41efr ~]# puppet apply --codedir /tmp/configure_inifile.aPkO3n -e 'ini_setting \{ "JAVA_ARGS":  
 
 
  ensure => present,  
 
 
  path => "/etc/sysconfig/puppetserver",  
 
 
  section => "",