Facter show inventpory data not present within foreman

Hi all,

I did add external facts (a shell script within /etc/facter/facts.d) but it
seems that some facts are not showing within foreman interface / database.
I connect on the client and launch the command 'facter' directly and all
information shows properly.

Do you have an idea why it doesn't appear on Foreman ?
Result of facter command :

lun_size_ibm_ds8x000_0006 => 79.92g
lun_size_ibm_ds8x000_0008 => 29.91g
lun_status_ibm_ds8x000_0006 => imported
lun_status_ibm_ds8x000_0008 => imported

but no fact_values appear in interface / database for facts with such names

I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 / facter 1.7.1

Regards

My bad, the scritp did return its keys in UPPER case.
facter return them in lower case, so I suppose there is an incompatibility
with UPPER.

I changed the facts name to use lower in the scrript and all value do
appear correctly now.

Thanks

··· On Tuesday, March 18, 2014 3:18:46 PM UTC+1, yannig rousseau wrote: > > Hi all, > > I did add external facts (a shell script within /etc/facter/facts.d) but > it seems that some facts are not showing within foreman interface / > database. > I connect on the client and launch the command 'facter' directly and all > information shows properly. > > Do you have an idea why it doesn't appear on Foreman ? > Result of facter command : > *...* > *lun_size_ibm_ds8x000_0006 => 79.92g* > *lun_size_ibm_ds8x000_0008 => 29.91g* > *lun_status_ibm_ds8x000_0006 => imported* > *lun_status_ibm_ds8x000_0008 => imported* > *....* > but no fact_values appear in interface / database for facts with such > names > > I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 / facter 1.7.1 > > Regards >

Hum, after some time, the facts disappear again…
A few clients managed to upload facts (visible in database and interface)
but after a few minute all values for this facts did disappear.

The entry within fact_names is still present, but no entry within
fact_values ???

Any idea ???

··· On Tuesday, March 18, 2014 3:30:18 PM UTC+1, yannig rousseau wrote: > > My bad, the scritp did return its keys in UPPER case. > facter return them in lower case, so I suppose there is an incompatibility > with UPPER. > > I changed the facts name to use lower in the scrript and all value do > appear correctly now. > > Thanks > > On Tuesday, March 18, 2014 3:18:46 PM UTC+1, yannig rousseau wrote: >> >> Hi all, >> >> I did add external facts (a shell script within /etc/facter/facts.d) but >> it seems that some facts are not showing within foreman interface / >> database. >> I connect on the client and launch the command 'facter' directly and all >> information shows properly. >> >> Do you have an idea why it doesn't appear on Foreman ? >> Result of facter command : >> *...* >> *lun_size_ibm_ds8x000_0006 => 79.92g* >> *lun_size_ibm_ds8x000_0008 => 29.91g* >> *lun_status_ibm_ds8x000_0006 => imported* >> *lun_status_ibm_ds8x000_0008 => imported* >> *....* >> but no fact_values appear in interface / database for facts with such >> names >> >> I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 / facter 1.7.1 >> >> Regards >> >

There were some fixes in Foreman 1.3.1 (you don't see which version
you're on) and another refactor in Foreman 1.4.0, so I'd suggest trying
a more recent release.

··· -- Dominic Cleal Red Hat Engineering

On 18/03/14 15:53, yannig rousseau wrote:

Hum, after some time, the facts disappear again…
A few clients managed to upload facts (visible in database and
interface) but after a few minute all values for this facts did disappear.

The entry within fact_names is still present, but no entry within
fact_values ???

Any idea ???

On Tuesday, March 18, 2014 3:30:18 PM UTC+1, yannig rousseau wrote:

My bad, the scritp did return its keys in UPPER case.
facter return them in lower case, so I suppose there is an
incompatibility with UPPER.

I changed the facts name to use lower in the scrript and all value
do appear correctly now.

Thanks

On Tuesday, March 18, 2014 3:18:46 PM UTC+1, yannig rousseau wrote:

    Hi all,

    I did add external facts (a shell script within
    /etc/facter/facts.d) but it seems that some facts are not
    showing within foreman interface / database.
    I connect on the client and launch the command 'facter' directly
    and all  information shows properly.

    Do you have an idea why it doesn't appear on Foreman ?
    Result of facter command :
    /.../
    /lun_size_ibm_ds8x000_0006 => 79.92g/
    /lun_size_ibm_ds8x000_0008 => 29.91g/
    /lun_status_ibm_ds8x000_0006 => imported/
    /lun_status_ibm_ds8x000_0008 => imported/
    /..../
    but no fact_values appear in interface / database  for facts
    with such names

    I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 / facter 1.7.1

    Regards


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thanks Dominic for your answer
I'm scheduling an upgrade to 1.4.1 for next tuesday. I'll test at this time
and let you know the result.

Regards

··· On Tuesday, March 18, 2014 5:00:17 PM UTC+1, Dominic Cleal wrote: > > There were some fixes in Foreman 1.3.1 (you don't see which version > you're on) and another refactor in Foreman 1.4.0, so I'd suggest trying > a more recent release. > > -- > Dominic Cleal > Red Hat Engineering > > On 18/03/14 15:53, yannig rousseau wrote: > > Hum, after some time, the facts disappear again... > > A few clients managed to upload facts (visible in database and > > interface) but after a few minute all values for this facts did > disappear. > > > > The entry within fact_names is still present, but no entry within > > fact_values ??? > > > > Any idea ??? > > > > > > On Tuesday, March 18, 2014 3:30:18 PM UTC+1, yannig rousseau wrote: > > > > My bad, the scritp did return its keys in UPPER case. > > facter return them in lower case, so I suppose there is an > > incompatibility with UPPER. > > > > I changed the facts name to use lower in the scrript and all value > > do appear correctly now. > > > > Thanks > > > > On Tuesday, March 18, 2014 3:18:46 PM UTC+1, yannig rousseau wrote: > > > > Hi all, > > > > I did add external facts (a shell script within > > /etc/facter/facts.d) but it seems that some facts are not > > showing within foreman interface / database. > > I connect on the client and launch the command 'facter' directly > > and all information shows properly. > > > > Do you have an idea why it doesn't appear on Foreman ? > > Result of facter command : > > /.../ > > /lun_size_ibm_ds8x000_0006 => 79.92g/ > > /lun_size_ibm_ds8x000_0008 => 29.91g/ > > /lun_status_ibm_ds8x000_0006 => imported/ > > /lun_status_ibm_ds8x000_0008 => imported/ > > /..../ > > but no fact_values appear in interface / database for facts > > with such names > > > > I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 / facter 1.7.1 > > > > Regards > > > > -- > > >

Hi all,

We did upgrade our server to foreman 1.4.2, the issue is still present.

Some more investigation show that :

  • Command "puppet agent -t" inventory those external facts correctly and
    send them to foreman
  • The puppet service itself when running every 30 minutes doesn't
    inventory those external facts and the facts disappear from foreman.

I just have to understand now why puppet agent doesn't get the same content
as the command "puppet agent -t"

Regards

··· On Wednesday, March 19, 2014 4:53:05 PM UTC+1, yannig rousseau wrote: > > Thanks Dominic for your answer > I'm scheduling an upgrade to 1.4.1 for next tuesday. I'll test at this > time and let you know the result. > > Regards > > On Tuesday, March 18, 2014 5:00:17 PM UTC+1, Dominic Cleal wrote: >> >> There were some fixes in Foreman 1.3.1 (you don't see which version >> you're on) and another refactor in Foreman 1.4.0, so I'd suggest trying >> a more recent release. >> >> -- >> Dominic Cleal >> Red Hat Engineering >> >> On 18/03/14 15:53, yannig rousseau wrote: >> > Hum, after some time, the facts disappear again... >> > A few clients managed to upload facts (visible in database and >> > interface) but after a few minute all values for this facts did >> disappear. >> > >> > The entry within fact_names is still present, but no entry within >> > fact_values ??? >> > >> > Any idea ??? >> > >> > >> > On Tuesday, March 18, 2014 3:30:18 PM UTC+1, yannig rousseau wrote: >> > >> > My bad, the scritp did return its keys in UPPER case. >> > facter return them in lower case, so I suppose there is an >> > incompatibility with UPPER. >> > >> > I changed the facts name to use lower in the scrript and all value >> > do appear correctly now. >> > >> > Thanks >> > >> > On Tuesday, March 18, 2014 3:18:46 PM UTC+1, yannig rousseau wrote: >> > >> > Hi all, >> > >> > I did add external facts (a shell script within >> > /etc/facter/facts.d) but it seems that some facts are not >> > showing within foreman interface / database. >> > I connect on the client and launch the command 'facter' >> directly >> > and all information shows properly. >> > >> > Do you have an idea why it doesn't appear on Foreman ? >> > Result of facter command : >> > /.../ >> > /lun_size_ibm_ds8x000_0006 => 79.92g/ >> > /lun_size_ibm_ds8x000_0008 => 29.91g/ >> > /lun_status_ibm_ds8x000_0006 => imported/ >> > /lun_status_ibm_ds8x000_0008 => imported/ >> > /..../ >> > but no fact_values appear in interface / database for facts >> > with such names >> > >> > I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 / facter 1.7.1 >> > >> > Regards >> > >> > -- >> >> >>

Hi All,

I didn't manage to investigate this issue.
Do you have any idea how I could check why some data isn't present in the
puppet service output while it is present in the puppet agent command ?

regards
Yannig

··· On Tuesday, March 25, 2014 3:34:32 PM UTC+1, yannig rousseau wrote: > > Hi all, > > We did upgrade our server to foreman 1.4.2, the issue is still present. > > Some more investigation show that : > - Command "puppet agent -t" inventory those external facts correctly and > send them to foreman > - The puppet service itself when running every 30 minutes doesn't > inventory those external facts and the facts disappear from foreman. > > I just have to understand now why puppet agent doesn't get the same > content as the command "puppet agent -t" > > Regards > > On Wednesday, March 19, 2014 4:53:05 PM UTC+1, yannig rousseau wrote: >> >> Thanks Dominic for your answer >> I'm scheduling an upgrade to 1.4.1 for next tuesday. I'll test at this >> time and let you know the result. >> >> Regards >> >> On Tuesday, March 18, 2014 5:00:17 PM UTC+1, Dominic Cleal wrote: >>> >>> There were some fixes in Foreman 1.3.1 (you don't see which version >>> you're on) and another refactor in Foreman 1.4.0, so I'd suggest trying >>> a more recent release. >>> >>> -- >>> Dominic Cleal >>> Red Hat Engineering >>> >>> On 18/03/14 15:53, yannig rousseau wrote: >>> > Hum, after some time, the facts disappear again... >>> > A few clients managed to upload facts (visible in database and >>> > interface) but after a few minute all values for this facts did >>> disappear. >>> > >>> > The entry within fact_names is still present, but no entry within >>> > fact_values ??? >>> > >>> > Any idea ??? >>> > >>> > >>> > On Tuesday, March 18, 2014 3:30:18 PM UTC+1, yannig rousseau wrote: >>> > >>> > My bad, the scritp did return its keys in UPPER case. >>> > facter return them in lower case, so I suppose there is an >>> > incompatibility with UPPER. >>> > >>> > I changed the facts name to use lower in the scrript and all value >>> > do appear correctly now. >>> > >>> > Thanks >>> > >>> > On Tuesday, March 18, 2014 3:18:46 PM UTC+1, yannig rousseau >>> wrote: >>> > >>> > Hi all, >>> > >>> > I did add external facts (a shell script within >>> > /etc/facter/facts.d) but it seems that some facts are not >>> > showing within foreman interface / database. >>> > I connect on the client and launch the command 'facter' >>> directly >>> > and all information shows properly. >>> > >>> > Do you have an idea why it doesn't appear on Foreman ? >>> > Result of facter command : >>> > /.../ >>> > /lun_size_ibm_ds8x000_0006 => 79.92g/ >>> > /lun_size_ibm_ds8x000_0008 => 29.91g/ >>> > /lun_status_ibm_ds8x000_0006 => imported/ >>> > /lun_status_ibm_ds8x000_0008 => imported/ >>> > /..../ >>> > but no fact_values appear in interface / database for facts >>> > with such names >>> > >>> > I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 / facter 1.7.1 >>> > >>> > Regards >>> > >>> > -- >>> >>> >>>

The most likely reason to me is the environment. When you're running
"puppet agent -t" from your shell, it'll inherit lots of environment
variables from locale through to PATH, usernames and home directories.
When running as a service, it'll typically have a very small set of
environment variables.

I'd probably check your facts don't assume a certain PATH or presence of
other environment variables. If you're running other programs,
especially third party utilities (e.g. to iterate over your LUNs), you
might find they need additional environment variables to function.

··· -- Dominic Cleal Red Hat Engineering

On 27/03/14 16:24, yannig rousseau wrote:

Hi All,

I didn’t manage to investigate this issue.
Do you have any idea how I could check why some data isn’t present in
the puppet service output while it is present in the puppet agent command ?

regards
Yannig

On Tuesday, March 25, 2014 3:34:32 PM UTC+1, yannig rousseau wrote:

Hi all,

We did upgrade our server to foreman 1.4.2, the issue is still present.

Some more investigation show that :
 - Command "puppet agent -t" inventory those external facts
correctly and send them to foreman
 - The puppet service itself when running every 30 minutes doesn't
inventory those external facts and the facts disappear from foreman.

I just have to understand now why puppet agent doesn't get the same
content as the command "puppet agent -t"

Regards

On Wednesday, March 19, 2014 4:53:05 PM UTC+1, yannig rousseau wrote:

    Thanks Dominic for your answer
    I'm scheduling an upgrade to 1.4.1 for next tuesday. I'll test
    at this time and let you know the result.

    Regards

    On Tuesday, March 18, 2014 5:00:17 PM UTC+1, Dominic Cleal wrote:

        There were some fixes in Foreman 1.3.1 (you don't see which
        version
        you're on) and another refactor in Foreman 1.4.0, so I'd
        suggest trying
        a more recent release.

        -- 
        Dominic Cleal
        Red Hat Engineering

        On 18/03/14 15:53, yannig rousseau wrote:
        > Hum, after some time, the facts disappear again...
        > A few clients managed to upload facts (visible in database
        and
        > interface) but after a few minute all values for this
        facts did disappear.
        >
        > The entry within fact_names is still present, but no entry
        within
        > fact_values ???
        >
        > Any idea ???
        >
        >
        > On Tuesday, March 18, 2014 3:30:18 PM UTC+1, yannig >             rousseau wrote:
        >
        >     My bad, the scritp did return its keys in UPPER case.
        >     facter return them in lower case, so I suppose there
        is an
        >     incompatibility with UPPER.
        >
        >     I changed the facts name to use lower in the scrript
        and all value
        >     do appear correctly now.
        >
        >     Thanks
        >
        >     On Tuesday, March 18, 2014 3:18:46 PM UTC+1, yannig >             rousseau wrote:
        >
        >         Hi all,
        >
        >         I did add external facts (a shell script within
        >         /etc/facter/facts.d) but it seems that some facts
        are not
        >         showing within foreman interface / database.
        >         I connect on the client and launch the command
        'facter' directly
        >         and all  information shows properly.
        >
        >         Do you have an idea why it doesn't appear on
        Foreman ?
        >         Result of facter command :
        >         /.../
        >         /lun_size_ibm_ds8x000_0006 => 79.92g/
        >         /lun_size_ibm_ds8x000_0008 => 29.91g/
        >         /lun_status_ibm_ds8x000_0006 => imported/
        >         /lun_status_ibm_ds8x000_0008 => imported/
        >         /..../
        >         but no fact_values appear in interface / database
         for facts
        >         with such names
        >
        >         I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 /
        facter 1.7.1
        >
        >         Regards
        >
        > --


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thanks a lot, you are perfectly right !
There is a PATH issue (it was localized in my profile.d) on my script :frowning:

If other people have the same kind of issue, the best way to look
interactively the puppet comand run by the script is t restart the service
while on console (there is an explicit error).
What I find surprising is that the error message visible when restarting
script doesn't appear in puppet log…

Thanks again

··· On Thu, Mar 27, 2014 at 6:52 PM, Dominic Cleal wrote:

The most likely reason to me is the environment. When you’re running
"puppet agent -t" from your shell, it’ll inherit lots of environment
variables from locale through to PATH, usernames and home directories.
When running as a service, it’ll typically have a very small set of
environment variables.

I’d probably check your facts don’t assume a certain PATH or presence of
other environment variables. If you’re running other programs,
especially third party utilities (e.g. to iterate over your LUNs), you
might find they need additional environment variables to function.


Dominic Cleal
Red Hat Engineering

On 27/03/14 16:24, yannig rousseau wrote:

Hi All,

I didn’t manage to investigate this issue.
Do you have any idea how I could check why some data isn’t present in
the puppet service output while it is present in the puppet agent
command ?

regards
Yannig

On Tuesday, March 25, 2014 3:34:32 PM UTC+1, yannig rousseau wrote:

Hi all,

We did upgrade our server to foreman 1.4.2, the issue is still

present.

Some more investigation show that :
 - Command "puppet agent -t" inventory those external facts
correctly and send them to foreman
 - The puppet service itself when running every 30 minutes doesn't
inventory those external facts and the facts disappear from foreman.

I just have to understand now why puppet agent doesn't get the same
content as the command "puppet agent -t"

Regards

On Wednesday, March 19, 2014 4:53:05 PM UTC+1, yannig rousseau wrote:

    Thanks Dominic for your answer
    I'm scheduling an upgrade to 1.4.1 for next tuesday. I'll test
    at this time and let you know the result.

    Regards

    On Tuesday, March 18, 2014 5:00:17 PM UTC+1, Dominic Cleal wrote:

        There were some fixes in Foreman 1.3.1 (you don't see which
        version
        you're on) and another refactor in Foreman 1.4.0, so I'd
        suggest trying
        a more recent release.

        --
        Dominic Cleal
        Red Hat Engineering

        On 18/03/14 15:53, yannig rousseau wrote:
        > Hum, after some time, the facts disappear again...
        > A few clients managed to upload facts (visible in database
        and
        > interface) but after a few minute all values for this
        facts did disappear.
        >
        > The entry within fact_names is still present, but no entry
        within
        > fact_values ???
        >
        > Any idea ???
        >
        >
        > On Tuesday, March 18, 2014 3:30:18 PM UTC+1, yannig > >             rousseau wrote:
        >
        >     My bad, the scritp did return its keys in UPPER case.
        >     facter return them in lower case, so I suppose there
        is an
        >     incompatibility with UPPER.
        >
        >     I changed the facts name to use lower in the scrript
        and all value
        >     do appear correctly now.
        >
        >     Thanks
        >
        >     On Tuesday, March 18, 2014 3:18:46 PM UTC+1, yannig > >             rousseau wrote:
        >
        >         Hi all,
        >
        >         I did add external facts (a shell script within
        >         /etc/facter/facts.d) but it seems that some facts
        are not
        >         showing within foreman interface / database.
        >         I connect on the client and launch the command
        'facter' directly
        >         and all  information shows properly.
        >
        >         Do you have an idea why it doesn't appear on
        Foreman ?
        >         Result of facter command :
        >         /.../
        >         /lun_size_ibm_ds8x000_0006 => 79.92g/
        >         /lun_size_ibm_ds8x000_0008 => 29.91g/
        >         /lun_status_ibm_ds8x000_0006 => imported/
        >         /lun_status_ibm_ds8x000_0008 => imported/
        >         /..../
        >         but no fact_values appear in interface / database
         for facts
        >         with such names
        >
        >         I use : Rhel6.4 / Foreman 1.3 / puppet 3.2.2 /
        facter 1.7.1
        >
        >         Regards
        >
        > --


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/ExtnkFsuHzs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.