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

Search Discussions

  • Gavin Williams at Nov 7, 2012 at 12:04 pm
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Jakov Sosic at Dec 19, 2012 at 1:28 am

    On 11/07/2012 01:04 PM, Gavin Williams wrote:
    Hmm... It seems that all that was needed was a Puppetmaster restart :s

    Now happily creating volumes...
    Yeah you should restart puppetmaster every time you change your custom
    type. I'm not sure though if it's necessary after making changes to
    provider.



    --
    Jakov Sosic
    www.srce.unizg.hr

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedNov 7, '12 at 10:46a
activeDec 19, '12 at 1:28a
posts3
users2
websitepuppetlabs.com

2 users in discussion

Gavin Williams: 2 posts Jakov Sosic: 1 post

People

Translate

site design / logo © 2022 Grokbase