Ask Your Question

resource ordering synchronization issue "->" doesn't work?

asked 2014-02-12 11:10:06 -0600

jaksky gravatar image

updated 2014-02-12 11:54:34 -0600


I have encounter really weird behaviour which goes against what I have learned, tutorial says etc. So I would be glad if someone could explain why that is happening. I have a role module which is made up of composition of profiles (role-profile pattern). My role consists:

   class role::lab_prg_c2_dn inherits lab_prg_c2 {
    class { 'profile::cluster_data_node':
      namenode_fqdn          => $role::lab_prg_c2::namenode_fqdn,
      secondarynamenode_fqdn => $role::lab_prg_c2::secondarynamenode_fqdn,          

First class installs technology and second one installs our components and items which are build on top of technology. Hence the technology need to be installed first, thats the reason for "->" dependency. However this ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-02-12 15:49:44 -0600

nanliu gravatar image

Class declaration looks like resources, but they are not resources, so I don't believe you can use the relationship shorthand. However the reference syntax should work, try:

Class['profile::cluster_data_node'] -> Class['bigdatasolution']

If this is always going to be the case, you can just put the line above in the bigdatasolution class.

edit flag offensive delete link more


Shouldn't that be solved by adding: class{'bigdatasolution': reqire => Class['profile::cluster_data_node'] } as I tried this one as well with no expected result. That should specify the ordering as well, right?

jaksky gravatar imagejaksky ( 2014-02-12 16:46:28 -0600 )edit

I think your issue is more likely a problem with class containment, than class ordering. The classes are in order, but they do not offer automatic containment of other classes ...(more)

nanliu gravatar imagenanliu ( 2014-02-12 17:41:47 -0600 )edit

Reference syntax didn't fix the issue. Still for some reason resources from bigdata solution are synchronized first

jaksky gravatar imagejaksky ( 2014-02-14 03:35:47 -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


Asked: 2014-02-12 11:10:06 -0600

Seen: 70 times

Last updated: Feb 12 '14