https://www.puppet.com/community logo
Join Slack
Powered by
# voxpupuli
  • b

    bastelfreak

    05/30/2022, 1:03 PM
    maybe it's an issue because
    fact()
    is calling in the acceptance test and works different compared to actual puppet code 🤔
  • r

    root-expert

    05/30/2022, 1:14 PM
    Spinning up a local instance, facter resolves the fact correctly but tests still fail
  • r

    root-expert

    05/30/2022, 1:14 PM
    How is
    fact()
    different?
  • r

    root-expert

    05/30/2022, 1:14 PM
    How is
    fact()
    different?
  • b

    bastelfreak

    05/30/2022, 1:22 PM
    ah I think it's evaluated before the tests start. so also before lsb-release is installed
  • v

    VoxBot

    05/30/2022, 4:06 PM
    could anyone give me a bit of guidance advice, I'm trying to work out how to work around a problem with Raspbian with the vox prometheus module, the service_provider value taken as a fact from stdlib is 'empty' (although the puppet run itself gives a different error) which is stopping the puppet run from completing
  • v

    VoxBot

    05/30/2022, 4:07 PM
    I don't want to hack it in the module, as the module is fine and working, it seems to be a problem with Raspbian the easy solution is to somehow forge the local fact to be 'systemd'
  • v

    VoxBot

    05/30/2022, 4:07 PM
    but I'm not sure the best way to approach it
  • v

    VoxBot

    05/30/2022, 4:07 PM
    (or a better way to approach it)
  • v

    VoxBot

    05/30/2022, 4:08 PM
    using facter 4.2.10 from a puppet 7 deployment,
  • v

    VoxBot

    05/30/2022, 4:09 PM
    stdlib 8.1
  • v

    VoxBot

    05/30/2022, 4:16 PM
    could I trick it with something like /etc/puppetlabs/facter/facts.d/os.yaml ?
  • b

    bastelfreak

    05/30/2022, 4:27 PM
    you can set the correct value as a class parameter
  • v

    VoxBot

    05/30/2022, 4:37 PM
    I did think of that at the start, but if the prometheus class explicitly calls out the fact, so it seemed to me that no matter what I set it to, it will always query the fact
  • v

    VoxBot

    05/30/2022, 4:38 PM
    so even if I did initstyle = systemd the fact that class has initstyle = fact (service_provider) it always seems like it's querying the fact
  • v

    VoxBot

    05/30/2022, 4:38 PM
    which is why I was thinking I had to trick the fact/set the fact
  • v

    VoxBot

    05/30/2022, 4:38 PM
    (probably wrongly)
  • v

    VoxBot

    05/30/2022, 4:40 PM
    Prometheus:Initstyle 'systemd'
  • v

    VoxBot

    05/30/2022, 4:40 PM
    Prometheus:init style 'systemd'
  • v

    VoxBot

    05/30/2022, 4:41 PM
    I did try that in my heira mactched against Raspbian-11
  • v

    VoxBot

    05/30/2022, 4:41 PM
    os,major
  • b

    bastelfreak

    05/30/2022, 4:45 PM
    if you explicitly set the class parameter, that should overwrite the fact cal
  • b

    bastelfreak

    05/30/2022, 4:45 PM
    can you share the code and error you have, maybe in a gist?
  • b

    bastelfreak

    05/30/2022, 4:46 PM
    and did you raise a buf report for facter bevause it reports the wrong value?
  • v

    VoxBot

    05/30/2022, 4:51 PM
    looks like there is already a few bug reports, but because there is no official arm build it seems puppet just close them
  • v

    VoxBot

    05/30/2022, 4:51 PM
    hence why I didn't want to invest too much as it's not a problem with the prometheus class,
  • v

    VoxBot

    05/30/2022, 4:51 PM
    and of course I can share
  • b

    bastelfreak

    05/30/2022, 4:56 PM
    they won't notice that there is a demand for arm builds if people do not report it
  • v

    VoxBot

    05/30/2022, 4:57 PM
    agree, I hadn't reported it as other similar bugs had just been closed
  • v

    VoxBot

    05/30/2022, 4:57 PM
    but I'd be happy to report it again
1...525354...648Latest