Puppet: System Administration Automated

Support

Ticket #762 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

interface method errors

Reported by: stick Assigned to: luke
Priority: normal Milestone: misspiggy
Component: library Version:
Severity: normal Keywords: interface bootproto netmask
Cc: Triage Stage: Accepted
Attached Patches: Code Complexity: Unknown

Description

using this class definition:

class dummyinterface {
    interface { "10.0.0.1":
        onboot  => true,
        interface_type => alias,
        interface => 'eth0:0',
    }
}

gives an error of:

notice: Ignoring cache
info: Caching configuration at /var/lib/puppet/localconfig.yaml
notice: Starting configuration run
err: Could not prefetch interface provider 'redhat': undefined method `downcase' for nil:NilClass
notice: //dummyinterface/Interface[test]/ensure: created
err: Got an uncaught exception of type NoMethodError: undefined method `bootproto' for #<Puppet::Type::Interface::ProviderRedhat:0xb709f1e8>
notice: Finished configuration run in 0.56 seconds

Change History

08/08/07 20:13:17 changed by stick

adding the bootproto option to the interface type:

class dummyinterface {
    interface { "10.0.0.1":
        onboot  => true,
        interface_type => alias,
        interface => 'eth0:0',
        bootproto => 'static',
    }
}

results in the following:

notice: Ignoring cache
err: Could not retrieve configuration: Could not evaluate classes for laptux.rdu.redhat.com: Invalid parameter '"bootproto"' for type 'interface' at /etc/puppet/manifests/classes/alias.pp:7
warning: Not using cache on failed configuration

09/06/07 19:59:11 changed by michael

  • milestone set to misspiggy.

09/06/07 19:59:22 changed by michael

  • stage changed from Unreviewed to Accepted.

09/17/07 16:44:10 changed by porridge

  • keywords set to interface bootproto netmask.

Guess what happens when you amend the template not to include "bootproto".

Got an uncaught exception of type No Method Error?: undefined method `netmask' for #<Puppet::Type::Interface::ProviderRedhat:0xb763993c>

11/06/07 10:33:11 changed by DavidS

  • patch changed from None to Code.

A fix is available in the misspiggy/fix-762 branch of the repo at git://git.black.co.at/puppet-bugfixes

11/20/07 21:02:50 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

This was caused by accepting #744. I've reverted that and added tests for this provider in [3d31dc8e2a91f599fc31e1f89c66cf1cca94e137].