Issue #4978 has been updated by Nigel Kersten.

Status changed from Unreviewed to Needs more information


----------------------------------------
Bug #4978: If directory exists puppet doesn't respect the require
https://projects.puppetlabs.com/issues/4978

Author: Chris Ferry
Status: Needs more information
Priority: Normal
Assignee: 
Category: file
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


I thought this was an order dependency issue, but that doesn't seem to be the 
case
<pre>
basenode:
node 'mgmt' {
include yum_slave
include user_roles
include base
}

user_roles:
 if ( defined( Class["yum-server"] ) or defined( Class["yum-slave"] ) ) {
  # Repo-Syncer
      group { "repo-syncer":
        ensure => present,
        gid    => "804" ,
      }
      user { "repo-syncer" :
        uid     => "804",
        gid     => "804",
        home    => "/home/repo-syncer",
        require => Group [ "repo-syncer" ],
      }
}

yum_slave:
class yum-slave {

  file { "/mnt/repo/":
        ensure  => directory,
        mode    => "755",
        owner   => repo-syncer,
        group   => repo-syncer,
        require => User["repo-syncer"],
  }

   #Cron task
   cron { "sync-centos-repo":
      command => "/bin/nice /usr/bin/rsync -qalH --delete 
10.244.1.1:/mnt/repo/centos /mnt/repo/",
      user    => repo-syncer,
      hour    => '4',
      minute  => 1,
      require => User["repo-syncer"],
   }
}


/mnt/repo exists.  When run with the above config:
err: Could not run Puppet configuration client: Could not find user repo-syncer
</pre>

When I comment out only the file resource, but leave the cron, there's no 
problem.
So it's not a dependency issue caused by the define.  It looks like the file 
resource ignores the "require => User["repo-syncer"]" because /mnt/repo already 
exists.




-- 
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.

Reply via email to