Hmm... It seems that all that was needed was a Puppetmaster restart :s Now happily creating volumes...
Cheers Gavin On Wednesday, 7 November 2012 10:46:55 UTC, Gavin Williams wrote: > > Hi All > > As per my various other Posts, I'm writing a customer type and provider > set for NetApp support.. > > My current problem is that the 'puppet device -v' run keeps failing with: > > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: >> Invalid parameter aggregate at /etc/puppet/manifests/site.pp:30 on node >> actint-star-nactl01 >> > > Now as far as I can see, the parameter is defined correctly in the > manifest and the type: > Manifest: > >> # Test NetApp volume provider >> netapp_volume { 'v_puppet_test': >> ensure => present, >> initsize => "1g", >> aggregate => "aggr01", >> spaceres => "none", >> } >> > > Type: > >> Puppet::Type.newtype(:netapp_volume) do >> @doc = "Manage Netapp Volume creation, modification and deletion." >> >> apply_to_device >> >> ensurable do >> desc "Netapp Volume resource state. Valid values are: present, >> absent." >> >> defaultto(:present) >> >> newvalue(:present) do >> provider.create >> end >> >> newvalue(:absent) do >> provider.destroy >> end >> end >> >> newparam(:name) do >> desc "The volume name." >> isnamevar >> end >> >> newparam(:initsize) do >> desc "The initial volume size." >> defaultto "1g" >> end >> >> newparam(:aggregate) do >> desc "The aggregate this volume should be created in." >> end >> >> newparam(:spaceres) do >> desc "The space reservation mode." >> end >> end >> > > Provider does some debugging logging within the create and exists? as > follows: > >> ... > > def create >> Puppet.debug("Puppet::Provider::Netapp_volume: creating Netapp Volume >> #{@resource[:name]} of initial size #{@resource[:initsize]} in Aggregate >> #{@resource[:aggregate]} using space reserve of #{@resource[:spaceres]}.") >> .. >> > def exists? >> Puppet.debug("Puppet::Provider::Netapp_volume: checking existance of >> Netapp Volume #{@resource[:name]}") >> result = transport.invoke("volume-list-info", "volume", >> @resource[:name]) >> Puppet.debug("Puppet::Provider::Netapp_volume: Vol Info: " + >> result.sprintf() + "\n") >> if(result.results_status == "failed") >> Puppet.debug("Puppet::Provider::Netapp_volume: Volume doesn't >> currently exist. \n") >> return false >> else >> Puppet.debug("Puppet::Provider::Netapp_volume: Volume already >> exists. \n") >> return true >> end >> >> end >> ... >> > > When running puppet device in debug mode, get the following log entries: > > ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance of >> Netapp Volume v_puppet_test >> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info: <results >> status="failed" reason="No volume named 'v_puppet_test' exists" >> errno="13040"></results> >> >> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't >> currently exist. >> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp >> Volume v_puppet_test of initial size 1g in Aggregate using space reserve >> of . >> > > So I'm seeing values against name and initsize params, but not against > aggregate or spaceres... > > Any ideas??? > > Cheers > Gavin > > PS: Full Git code is available here: > https://github.com/fatmcgav/fatmcgav-netapp > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/LOBOFAEmNugJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.