I'm uncertain which differences between the two logs you find significant. They do appear to have been recorded at different log levels -- that explains why one has "Updated:" entries and the other does not. The various packages are managed in different order in the two runs, but Puppet resource ordering is not guaranteed to be consistent (subject to several caveats). The two runs show somewhat different sets of resources being updated, but even if the nodes receive identical catalogs, which resources are updated will vary depending on which resources need to be updated.
Anyway, you cannot parallelize catalog runs. The agent employs a lock file to ensure that you do not do so. This is because multiple concurrent runs can conflict with each other. Even if Puppet wanted to parallelize internally -- and in principle it could do so to some extent -- it is far trickier than just arbitrarily splitting resources among threads. Moreover, the gain achievable that way is unclear, but likely to be variable and small, as most of the time-consuming operations the agent performs are I/O bound.
Thanks for the answer, but the main question is why puppet need to have 2 puppet runs instead of one in the 2 nd example?
I believe what Marcin is asking is how it would be possible to make puppet only run once a.k.a. if puppet is already running make the second run wait.Is there some kind of option/flag that can enable a global lock that would prevent a second run of puppet not start if puppet is already running?
On Oct 20, 2014 6:46 AM, <artur.da...@ammeon.com> wrote:
>
> The issue that i don't fully understand is why the puppet run seems to finish:
>
> Oct 8 19:58:07 node2 puppet-agent[18912]: (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper4/Package[EXTR-lsbwrapper4]/ensure) ensure changed '1.0.0-1' to '2.0.0-1'
> Oct 8 19:58:12 node2 puppet-agent[18912]: (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper8/Package[EXTR-lsbwrapper8]/ensure) ensure changed '1.0.0-1' to '0:3.0.0-1'
> Oct 8 19:58:15 node2 puppet-agent[18912]: (/File[/etc/mcollective/facts.yaml]/content) content changed '{md5}cf91bdba62cbaa5149af42b81febbbf4' to '{md5}994da216388be7020bade56907c701ed'
> Oct 8 19:58:19 node2 puppet-agent[18912]: (/File[maincf]/seltype) seltype changed 'etc_runtime_t' to 'etc_t'
> Oct 8 19:58:22 node2 puppet-agent[18912]: Finished catalog run in 47.16 seconds
>
> Yet after that the puppet seems to continue where it left off:
>
> Oct 8 19:58:57 node2 puppet-agent[20580]: (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper28/Package[EXTR-lsbwrapper28]/ensure) ensure changed '1.0.0-1' to '0:2.0.0-1'
> Oct 8 19:58:58 node2 puppet-agent[20580]: (/File[/etc/mcollective/facts.yaml]/content) content changed '{md5}994da216388be7020bade56907c701ed' to '{md5}d8c1cb23e367c830bc34a564d49e8353'
> Oct 8 19:59:03 node2 puppet-agent[20580]: (/File[maincf]/seltype) seltype changed 'etc_runtime_t' to 'etc_t'
> Oct 8 19:59:05 node2 puppet-agent[20580]: Finished catalog run in 16.30 seconds
>
> Not sure about this but my understanding is that a catalog run should be sequential if there is a global lock in place?
>
Yes, the catalog application is sequential but I see nothing to suggest otherwise in these logs (I could be missing it, reading on my phone).
What I see is: The File facts.yaml is changed from cf9* to 994* in the first run, then 994* to d8c* in the second. The Packages lsbwrapper4 & lsbwrapper8 are installed in the first run, lsbwrapper28 in the second.
Without seeing the manifests, we cannot know why these happen in two runs instead of one, but the facts.yaml changing is probably a clue.
> This looks like a bug IMO. Is there any tracking done of this?
What is the antecedent of your final "this"? Bugs (there's Jira for that) or catalog runs (logs and reports for that) or something else?
Wil
The issue that i don't fully understand is why the puppet run seems to finish:Oct 8 19:58:07 node2 puppet-agent[18912]: (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper4/Package[EXTR-lsbwrapper4]/ensure) ensure changed '1.0.0-1' to '2.0.0-1'Oct 8 19:58:12 node2 puppet-agent[18912]: (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper8/Package[EXTR-lsbwrapper8]/ensure) ensure changed '1.0.0-1' to '0:3.0.0-1'Oct 8 19:58:15 node2 puppet-agent[18912]: (/File[/etc/mcollective/facts.yaml]/content) content changed '{md5}cf91bdba62cbaa5149af42b81febbbf4' to '{md5}994da216388be7020bade56907c701ed'Oct 8 19:58:19 node2 puppet-agent[18912]: (/File[maincf]/seltype) seltype changed 'etc_runtime_t' to 'etc_t'Oct 8 19:58:22 node2 puppet-agent[18912]: Finished catalog run in 47.16 secondsYet after that the puppet seems to continue where it left off:Oct 8 19:58:57 node2 puppet-agent[20580]: (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper28/Package[EXTR-lsbwrapper28]/ensure) ensure changed '1.0.0-1' to '0:2.0.0-1'
Oct 8 19:58:58 node2 puppet-agent[20580]: (/File[/etc/mcollective/facts.yaml]/content) content changed '{md5}994da216388be7020bade56907c701ed' to '{md5}d8c1cb23e367c830bc34a564d49e8353'Oct 8 19:59:03 node2 puppet-agent[20580]: (/File[maincf]/seltype) seltype changed 'etc_runtime_t' to 'etc_t'Oct 8 19:59:05 node2 puppet-agent[20580]: Finished catalog run in 16.30 secondsNot sure about this but my understanding is that a catalog run should be sequential if there is a global lock in place?