Facter doesnt resolve ipaddress or ipaddress_eth0

298 views
Skip to first unread message

Joao Morais

unread,
Jun 26, 2014, 1:25:27 PM6/26/14
to puppet...@googlegroups.com

Hello list. I am trying to read the IP address of the eth0 interface from a CentOS 6.5 VM (XenServer).

Running the manifest gives empty values to all of the following vars: $ipaddress, $ipaddress_eth0, and its $::<name> version. $interfaces has "eth0,lo".

Running facter from the VM I get:

# facter -v
2.0.1

# facter | grep virtual
is_virtual => true
virtual => xenu

# facter | grep eth
interfaces => eth0,lo
mtu_eth0 => 1500

# facter ipaddress_eth0

# facter ipaddress

ifconfig output:

# ifconfig eth0
eth0      Link encap:Ethernet  Endereço de HW 7E:81:CD:66:77:DF 
          inet end.: 10.200.118.83  Bcast:10.200.119.255  Masc:255.255.254.0
          UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1
          ...etc...

Any tip? Thanks!

Joao Morais

unread,
Jul 28, 2014, 2:19:38 PM7/28/14
to puppet...@googlegroups.com

List, just to document the solution. My CentOS was localized and facter couldn't parse de output properly. Changing the locale to en_US solves this issue.

Joao Morais

Robin Bowes

unread,
Jul 28, 2014, 3:34:27 PM7/28/14
to puppet...@googlegroups.com
Hmm, I find that hard to believe, ie. that's a pretty massive and fundamental bug in facter if that is indeed the case.

Can you reproduce on other boxes?

R.


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/96c60b30-8615-470d-a8cd-f45d944d39f2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Joao Morais

unread,
Jul 28, 2014, 8:46:50 PM7/28/14
to puppet...@googlegroups.com

Em 28/07/14 16:34, Robin Bowes escreveu:
> Hmm, I find that hard to believe, ie. that's a pretty massive and
> fundamental bug in facter if that is indeed the case.

Perhaps I have a not-so-common use case? I'm manually running (local
rundeck) puppet agent in my tests via ssh. Ssh was sending my local
LANG* stuff through the wire and messing ifconfig output.

> Can you reproduce on other boxes?

Yes.

Facter does some regex on ifconfig output. The regex just didn't match
and facter silently ignored ifconfig related facts. FYI the VM was using
pt_BR.UTF8 locale.

Joao Morais


>
>
> On 28 July 2014 19:19, Joao Morais <l...@joaomorais.com.br
> <mailto:puppet-users...@googlegroups.com>.
> <https://groups.google.com/d/msgid/puppet-users/96c60b30-8615-470d-a8cd-f45d944d39f2%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAJGKfwCyJt9B2xrbWe-0Wm8MMXeBdRFQphY5uOT6cDK29bcAVw%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAJGKfwCyJt9B2xrbWe-0Wm8MMXeBdRFQphY5uOT6cDK29bcAVw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages