Issue #2020 has been updated by Mikael Fridh.

ouch, I think i got bit by this today.

True, it will get fixed on subsequent runs but in my case, packages are 
installed before certain virtual users are realized before the package 
installation, thus users are created with wrong UIDs etc, causing blocking UIDs 
one some runs, and of course, subsequently I'm left with permissions problems 
(albeit small).

I've tried to change my dependencies from require => Class["user::account"] to 
require => User["username"] instead for now but I'd prefer the real fix. Thanks 
for looking into it.

----------------------------------------
Bug #2020: Realizing a resource should create a dependency on that resource
https://projects.puppetlabs.com/issues/2020

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: language
Target version: Telly
Affected Puppet version: 0.25.4
Keywords: 
Branch: 


puppet 0.24.6

Typically I have modules laid out like this:

apache::install, apache::config, apache::service

inside apache::config resources will require Class["apache::install"] making 
sure all the installation tasks gets done first.

Using simple package{..} resources in the apache::install class all works as 
you'd hope, but on moving to virtual packages I am seeing configuration files 
get created before the packages gets installed, below simple manifest 
demonstrates the problem:

<pre>
class virt {
        @file{"/tmp/file1":
                content => "file 1\n"
        }

        @file{"/tmp/file2":
                require => File["/tmp/file1"],
                content => "file 2\n"
        }
}

class prereq {
        realize(File["/tmp/file1"])
        realize(File["/tmp/file2"])
}

include virt
include prereq

file{"/tmp/file3":
        content => "file 3\n",
        require => Class["prereq"]
}
</pre>

When I run this I'd expect all the resources in Class["prereq"] to be realized, 
files created etc, before /tmp/file3, on running it though I get:

<pre>
notice: //File[/tmp/file3]/content: created file with contents 
{md5}9c38e8324dbf031557c89d53a39f0b26
notice: //virt/File[/tmp/file1]/content: created file with contents 
{md5}e243bb39c844b3543a7726576c869caf
notice: //virt/File[/tmp/file2]/content: created file with contents 
{md5}4349cfeff8e2eb74dffc369bb5fd084e
</pre>




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