Issue #11799 has been updated by Gavin Williams.

Hi All

I've just hit the same issue when attempting to use a define wrapping a number 
of device resources. 

Any workarounds? 

Cheers
Gavin 
----------------------------------------
Bug #11799: apply_to_all does not work
https://projects.puppetlabs.com/issues/11799#change-79249

Author: Nan Liu
Status: Needs More Information
Priority: Normal
Assignee: Nan Liu
Category: device
Target version: 
Affected Puppet version: 2.7.0
Keywords: device, tags
Branch: 


Types are supposed to support a method called apply_to_all.

If types specify apply_to_all they actually do not work on host applications. 
This ticket explains one problem that is a symptom of this.

Any issue with this method not working correctly is that resources cannot be 
used by puppet device and puppet apply.



In Puppet 2.7 resources have a distinction between host vs. device resource. 
Certain resources such as notify are very useful, but are skipped. Seems 
helpful to log events to proxy servers on behalf of the network device so 
modifying the notify resource to support devices.

Also defines and classes that contain resources are all treated as host 
resources and not device resources, so they are skipped when running puppet 
device command. 

    class f5_a {
      f5_file { '/tmp/a':
        ensure => present,
        content => 'a' 
      }
    }
    class f5_b {
      f5_file { '/tmp/b':
        ensure => present,
        content => 'b',
      }
    }
    node 'f5.puppetlabs.lan' {
      class {['f5_a', 'f5_b']: }
      Class['f5_a'] -> Class['f5_b']
      f5_notify { 'welcome_f5': }
    }

When this is applied the f5 network resources are applied. However defines and 
classes are skipped:

    ...
    debug: Class[F5_a]: Skipping host resources because running on a device
    ...

This doesn't seem critical as relationship are still working as expected, but 
may have some unexpected side effects that I have yet to uncover.



-- 
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 puppet-bugs@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-bugs+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to