Bug #762

interface method errors

Added by Chris MacLeod almost 5 years ago. Updated over 4 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Luke Kanies % Done:

0%

Category:-
Target version:0.24.0
Affected Puppet version:0.25.4 Branch:
Keywords:
Votes: 0

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 #
notice: Finished configuration run in 0.56 seconds

History

Updated by Chris MacLeod almost 5 years ago

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

Updated by Marcin Owsiany over 4 years ago

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

Got an uncaught exception of type NoMethodError: undefined method @netmask' for #<Puppet::Type::Interface::ProviderRedhat:0xb763993c>

Updated by David Schmitt over 4 years ago

A fix is available in the

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

Updated by Luke Kanies over 4 years ago

  • Status changed from 1 to Closed
  • 7 set to fixed

This was caused by accepting #744. I’ve reverted that and added tests for this provider in commit:3d31dc8e2a91f599fc31e1f89c66cf1cca94e137.

Also available in: Atom PDF