Ask Your Question
1

How to export resource B, which depends on resource A?

asked 2013-12-05 03:21:56 -0600

videre gravatar image

I have the exported resource @@Exec B which should be run on agent B, after agent A has completed Exec A.

I have tried placing a 'before'-relationship in Exec A, which results in : "Invalid relationship: Exec[A] { before => Exec[B] }, because Exec[B] is exported but not collected"

I have also tried to place a 'require'-relationship in @@Exec B, but this fails because Exec A is not in Agent B's catalog.

Both errors make sense, but since neither of those approaches work, how do you specify a relationship between Exec A and @@Exec B, when @@Exec B ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-12-05 05:07:57 -0600

Stefan gravatar image

You can't because both steps happen individually. When node A requests a catalog the parser on your puppet master will compile the catalog for node A and during the compilation will put exported resources in your storedconfig backend (e.g. PuppetDB).

After the catalog is compiled (and exported resources are in the database) the catalog is handed down to Node A which will then try to apply the catalog with Exec['A'] inside.

So depending on when node B will request its catalog, you might end up with Exec['B'] beeing applied before Exec['A'] is applied.

If e ... (more)

edit flag offensive delete link more

Comments

Not the solution I wanted to hear, but a solution none-the-less. Thank you.

videre gravatar imagevidere ( 2013-12-05 05:25:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-12-05 03:21:56 -0600

Seen: 288 times

Last updated: Dec 05 '13