Jira (PUP-4188) Agent incorrectly applies cached catalog when puppetserver dies mid-run

2015-03-12 Thread Christopher Bills (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Christopher Bills created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-4188 
 
 
 
  Agent incorrectly applies cached catalog when puppetserver dies mid-run  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 PUP 3.7.4 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2015/03/11 2:17 PM 
 
 
 

Environment:
 
 
CentOS 6.5 running Puppet 3.7.4 with puppetserver 1.0.2 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Christopher Bills 
 
 
 
 
 
 
 
 
 
 
It seems puppetserver died or was restarted while some agents were updating. The result was the agent created a file as a directory, which broke further runs of the agent, as the file resource did not have 'force' set. 
Thanks to the advice of Volcane on #puppet (freenode), I have added usecacheonfailure = false to puppet.conf, which I hope will prevent this in the future. 
current state: 
[root@failed_machine ~]# puppet agent --test Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for failed_machine.domain Info: Applying configuration version '1426086826' Notice: /Stage[main]/Base/File[/etc/motd]: Not removing directory; use 'force' to override Notice: /Stage[main]/Base/File[/etc/motd]: Not removing directory; use 'force' to override Error: Could not set 'file' on ensure: Is a directory - /etc/motd20150311-15261-25upe

Jira (PUP-4188) Agent applies broken cached catalog when puppetserver dies mid-run

2015-03-11 Thread Christopher Bills (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Christopher Bills updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-4188 
 
 
 
  Agent applies broken cached catalog when puppetserver dies mid-run  
 
 
 
 
 
 
 
 
 

Change By:
 
 Christopher Bills 
 
 
 

Summary:
 
 Agent  incorrectly  applies  broken  cached catalog when puppetserver dies mid-run 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-4188) Agent incorrectly applies cached catalog when puppetserver dies mid-run

2015-03-11 Thread Christopher Bills (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Christopher Bills updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-4188 
 
 
 
  Agent incorrectly applies cached catalog when puppetserver dies mid-run  
 
 
 
 
 
 
 
 
 

Change By:
 
 Christopher Bills 
 
 
 
 
 
 
 
 
 
 It seems puppetserver died or was restarted while some agents were updating. The result was the agent created a file as a directory, which broke further runs of the agent, as the file resource did not have 'force' set.Thanks to the advice of Volcane on #puppet (freenode), I have added {{usecacheonfailure = false}} to puppet.conf, which I hope will prevent this in the future.current state: {code} [root@failed_machine ~]# puppet agent --testInfo: Retrieving pluginfactsInfo: Retrieving pluginInfo: Loading factsInfo: Caching catalog for failed_machine.domainInfo: Applying configuration version '1426086826'Notice: /Stage[main]/Base/File[/etc/motd]: Not removing directory; use 'force' to overrideNotice: /Stage[main]/Base/File[/etc/motd]: Not removing directory; use 'force' to overrideError: Could not set 'file' on ensure: Is a directory - /etc/motd20150311-15261-25upep or /etc/motd at 39:/etc/puppet/environments/mcs/modules/base/manifests/init.ppError: Could not set 'file' on ensure: Is a directory - /etc/motd20150311-15261-25upep or /etc/motd at 39:/etc/puppet/environments/mcs/modules/base/manifests/init.ppWrapped exception:Is a directory - /etc/motd20150311-15261-25upep or /etc/motdError: /Stage[main]/Base/File[/etc/motd]/ensure: change from directory to file failed: Could not set 'file' on ensure: Is a directory - /etc/motd20150311-15261-25upep or /etc/motd at 39:/etc/puppet/environments/mcs/modules/base/manifests/init.ppNotice: /Stage[main]/Base/File[/var/run/motd]: Dependency File[/etc/motd] has failures: trueWarning: /Stage[main]/Base/File[/var/run/motd]: Skipping because of failed dependenciesNotice: Finished catalog run in 5.00 seconds {code} class base: {code} class base {$config = hiera_hash('base','')$classes= hiera_hash('classes','')File {# Username instead of UID creates a dependency cycle since user/group# 'require' /etc/passwd, which has 'owner => 'root''...owner   => '0',group   => '0',mode=> '0644',}package { $config[packages]:ensure  => latest,}user { 'root':ensure  => present,comment => 'root',password=> $config[root_password],shell   => '/bin/bash',uid => 0,gid => 0,require => Group['root'],}group { 'root':ensure   => present,gid  => 0,system   => true,}file { '/etc/nsswitch.conf':ensure  => file,content => template('base/nsswitch.conf.erb'),notify  => Service['nscd'],}file { '/etc/motd':ensure  => file,source  => 'puppet:///modules/base/motd',}# For Debian-based systems, doesn't harm RH systemsfile { '/var/run/motd':ensure  => link,target  => '/etc/motd',}file { '/etc/profile.d':ensure  => directory,recurse => true,source  => 'puppet:///modules/base/profile.d',}} {code} Log from mishap: {code} 2015-03-11T11:11:46.305405-05:00 failed_machine.domain puppet-agent[10158]: