instance type questions for Virtual interfaces

27 views
Skip to first unread message

Jeff Leggett

unread,
Jun 25, 2008, 5:02:27 PM6/25/08
to Puppet Users
I am trying to use the stand alone puppet command to excute a manifest
to setup the netowrking interface of a container within openVZ:

interface {"venet0:0":
ensure => present,
ifnum => "0",
interface => "venet0",
interface_type => normal,
name => "192.168.0.2"
netmask => "255.255.255.0",
onboot => true,
target => "/etc/sysconfig/network",
}

I am missing somehting as I get:

[root@localhost jleggett]# puppet test.pp
warning: Could not retrieve fact ipaddress
Could not parse for environment development: Syntax error at
'netmask'; expected '}' at /home/jleggett/test.pp:7

I was *hoping* I could define the interface, the hosts file,
resolv.conf, etc with puppet ending with a service call to restart the
network service and it would all work... But I keep getting this
syntax error. Am i completely off track here?

AJ

unread,
Jun 25, 2008, 5:49:39 PM6/25/08
to puppet...@googlegroups.com
Jeff Leggett wrote:
> interface {"venet0:0":
> ensure => present,
> ifnum => "0",
> interface => "venet0",
> interface_type => normal,
> name => "192.168.0.2"
>
>

You're missing a comma, there ^

Regards,

AJ

Jeff Leggett

unread,
Jun 25, 2008, 7:20:49 PM6/25/08
to Puppet Users
DOH - looked at over and over and missed it.

Thanks

Jeff Leggett

unread,
Jun 25, 2008, 7:23:05 PM6/25/08
to Puppet Users
OK, what abou thtis error:


[root@localhost jleggett]# puppet test.pp
warning: Could not retrieve fact ipaddress
warning: Interface targets are deprecated and no longer have any
function
err: Could not prefetch interface provider 'redhat': undefined method
`bootproto=' for #<Puppet::Type::Interface::ProviderRedhat:0xb7910b10>
err: //Interface[venet0:0]: Failed to retrieve current state of
resource: undefined method `[]' for
#<Puppet::Type::Interface::ProviderRedhat:0xb78fb5d0>


On Jun 25, 5:49 pm, AJ <a...@junglist.gen.nz> wrote:

Luke Kanies

unread,
Jun 25, 2008, 7:44:04 PM6/25/08
to puppet...@googlegroups.com
On Jun 25, 2008, at 4:23 PM, Jeff Leggett wrote:

> OK, what abou thtis error:
>
>
> [root@localhost jleggett]# puppet test.pp
> warning: Could not retrieve fact ipaddress
> warning: Interface targets are deprecated and no longer have any
> function
> err: Could not prefetch interface provider 'redhat': undefined method
> `bootproto=' for #<Puppet::Type::Interface::ProviderRedhat:0xb7910b10>
> err: //Interface[venet0:0]: Failed to retrieve current state of
> resource: undefined method `[]' for
> #<Puppet::Type::Interface::ProviderRedhat:0xb78fb5d0>


The interface type unfortunately doesn't work for many (any?) people.

Dunno how this happened, but I guess I should just disable it until it
can be fixed.

What do others think? Disable it?

--
If you make people think they're thinking, they'll love you; But if
you really make them think, they'll hate you. -- Don Marquis
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Ashley Penney

unread,
Jun 25, 2008, 9:15:29 PM6/25/08
to puppet...@googlegroups.com
I would support disabling it,  I never managed to get it working despite hacking away at it every so often.  I think what happened is the Linux one branched off the Solaris one and it just barely seems to work.  It needs a ground up rewrite from scratch.

Jeff Leggett

unread,
Jun 26, 2008, 3:17:39 AM6/26/08
to Puppet Users
Awww... man... so how are others configuring net interfaces for
virtual svrs?


On Jun 25, 9:15 pm, "Ashley Penney" <apen...@gmail.com> wrote:
> I would support disabling it,  I never managed to get it working despite
> hacking away at it every so often.  I think what happened is the Linux one
> branched off the Solaris one and it just barely seems to work.  It needs a
> ground up rewrite from scratch.
>

Jeff Leggett

unread,
Jun 26, 2008, 3:39:32 AM6/26/08
to Puppet Users
Awww man... I thought replacing the OpenVZ instance setup shell
scripts would be easy with puppet, but that makes it kinda hard:

http://forum.openvz.org/index.php?t=tree&th=6349&mid=31322&&rev=&reveal=

see, I was planning to replace these shell scripts for all these diff
distro's with puppet manifests... theres a .conf for all the various
distros and shell scripts for all the various distros too - puppet
could streamline all this is what we hoped...

I need to noodle this now

Peter Meier

unread,
Jun 26, 2008, 6:38:04 AM6/26/08
to puppet...@googlegroups.com
Hi

> The interface type unfortunately doesn't work for many (any?) people.
>
> Dunno how this happened, but I guess I should just disable it until it
> can be fixed.
>
> What do others think? Disable it?

actually I would support to fix it rather than disabling it, but leaving
it at the current state is _no_ solution. So disabling it, would be ok
as well.
However i looked once for an hour or so at it and couldn't get my mind
around it. It was too automagically for me. I dunno who have written it,
if anybody could give me some hints, I would like to try to fix it,
because it would really be nice to have it!
In the list archive you find several people telling, that they wrote
wrappers or other types from scratch. Would it be possible to share them?

greets Pete

Reply all
Reply to author
Forward
0 new messages