Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Anchor pattern to client.pp #343

Merged
merged 2 commits into from Nov 4, 2013
Merged

Add Anchor pattern to client.pp #343

merged 2 commits into from Nov 4, 2013

Conversation

Bit-Doctor
Copy link
Contributor

The class mysql::client::install should be "contained" in the mysql::client to avoid floating, like it's the case for mysql::server.

The class mysql::client::install is "contained" in the mysql::client to avoid floating.
@igalic
Copy link
Contributor

igalic commented Oct 29, 2013

I'm confused what this is supposed to do. Usually, when you anchor, you have more than one thing to order. Can you explain this?

@Bit-Doctor
Copy link
Contributor Author

According to this http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues
classes do not get contained by the class that declares them.
In this case mysql::client::install will not be contained by mysql::client, and this break any ordering like
before => Class['mysql::client'], one solution is to use 'mysql::client::install' in the ordering but I find it not convenient. This workaround seems to work with me, i'm quite new using puppet so maybe i'm just doing something plain wrong.

@igalic
Copy link
Contributor

igalic commented Oct 30, 2013

Okay, thanks for clarifying, now if you could clarify that in your code, that would reduce the need for stupid questions from me ;)

anchor { 'mysql::client::start': }
anchor { 'mysql::client::end': }

Anchor['mysql::client::start'] ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add

Class['mysql::client'] ->

here.

Add a step to the anchor pattern and add comment to clarify the need of this workaround.
Ref : http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues
apenney pushed a commit that referenced this pull request Nov 4, 2013
Add Anchor pattern to client.pp
@apenney apenney merged commit ae32cdf into puppetlabs:master Nov 4, 2013
@apenney
Copy link
Contributor

apenney commented Nov 4, 2013

I cannot wait for the anchor fix to be finally done. :)

@Bit-Doctor Bit-Doctor deleted the patch-1 branch November 4, 2013 17:10
@igalic igalic mentioned this pull request Nov 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants