Issue #5393 has been updated by derek olsen. File 0001-5393-Add-dataset-parameter-to-the-zone-provider.patch added
Nigel. I have attached my initial go at a patch (which is pulled from this branch https://github.com/someword/puppet/tree/feature/master/5393). The patch does what I want on the first pass of puppet. Then on subsequent passes of puppet their is a failure when it's comparing the current zone state against what is specified in the zone resource. The error traces back to some sorting that is occurring as this was captured from running with debug and trace /opt/sfw/lib/ruby/site_ruby/1.8/puppet/type/zone.rb:63:in `sort' /opt/sfw/lib/ruby/site_ruby/1.8/puppet/type/zone.rb:63:in `insync? The actual error messages is err: /Stage[main]//Zone[zone_multiple_dataset]: Could not evaluate: undefined method `<=>' for nil:NilClass The dataset parameter looks like this dataset => [ "rpool/datasets/dataset1", "rpool/datasets/dataset2" ], And the compared output from zonecfg is dataset: name: rpool/datasets/dataset1 dataset: name: rpool/datasets/dataset2 The error makes me think I've setup a situation where two unlike objects are attempting to be compared (eg: string and array). I'll keep hammering on this but if you have any tips that would be appreciated. Thanks. Derek. ---------------------------------------- Feature #5393: include support for adding dataset(s) to solaris zone provider https://projects.puppetlabs.com/issues/5393 Author: derek olsen Status: Accepted Priority: Normal Assignee: Nigel Kersten Category: Solaris Target version: Statler Affected Puppet version: Keywords: solaris zone dataset Branch: We use the zone type pretty frequently and have created an define as a wrapper around the zone type. Upon reviewing the define recently it's clear that all it really does for us is include a dataset(s) if requested. For example this call to the define zones::create { "sample": ip => [ "e1000g0:10.1.16.47" ], zfs_parent => "localdisks/zones", datasets => "localdisks/zones/datasets", mountpoint => "/site/sample", } ends up calling the following exec if $datasets != "false" { zones::dataset { "$name": datasets => "$datasets", mountpoint => "$mountpoint", } } exec { "${datasets}/${name}": command => "/usr/sbin/zonecfg -z $name 'add dataset; set name=${datasets}/${name} ; end ; verify ; commit'", unless => "/usr/sbin/zonecfg -z $name info | /usr/bin/grep -i dataset", require => [ Zone["$name"], Zfs["${datasets}/${name}"] ], } We would like to get rid of the define and have puppet natively support the ability to add an dataset to a zone configuration. Thanks. Derek. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
