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

    Slackbot

    07/27/2022, 11:07 PM
    This message was deleted.
    v
    • 2
    • 1
  • v

    vchepkov

    07/27/2022, 11:07 PM
    6.27.0, @natemccurdy
  • v

    vchepkov

    07/27/2022, 11:12 PM
    I won't argue about Windows, I know very little about it, but
    Copy code
    puppet query "facts[value,count()]{name='operatingsystemrelease' group by value}"
    shows
    Copy code
    {
        "count": 1,
        "value": "6.3.9600"
      },
    And that can't be right
  • v

    vchepkov

    07/27/2022, 11:12 PM
    the rest are acceptable
    20xx
  • h

    hbui

    07/27/2022, 11:24 PM
    I believe the numbering internally goes forward from the old windows 3.1.1 and then nt 4, etc. (https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions#Server_versions) Does the operatingsystemrelease fact differ from os.release.full fact on windows?
  • v

    vchepkov

    07/27/2022, 11:25 PM
    nope, it matches
  • v

    vchepkov

    07/27/2022, 11:25 PM
    but is wrong
  • n

    n3snah

    07/27/2022, 11:25 PM
    on Puppet 6.25.1 I am getting
    operatingsystemrelease
    showing as 2012.. Interesting
  • v

    vchepkov

    07/27/2022, 11:26 PM
    as expected, I have
    Copy code
    {
        "count": 31,
        "value": "2012"
      },
      {
        "count": 89,
        "value": "2012 R2"
      },
  • n

    n3snah

    07/27/2022, 11:26 PM
    on Puppet 6.25.1 I am getting
    operatingsystemrelease
    showing as 2012.. Interesting
  • n

    n3snah

    07/27/2022, 11:26 PM
    I have seen this with a couple other Windows systems where some weird reports of OS happen... I think this is more a MS issue though
  • v

    vchepkov

    07/27/2022, 11:32 PM
    Well, I'll ask to 🔌 it, see if it cures DID
  • h

    hbui

    07/27/2022, 11:32 PM
    I'd look at
    /opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/facter-ng-4.2.8/lib/facter/util/facts/windows_release_finder.rb
    on the afflicted system
  • h

    hbui

    07/27/2022, 11:32 PM
    I'm just seeing a case statement that seems to map into the 2xxx stuff that we'd expect
  • v

    vchepkov

    07/27/2022, 11:33 PM
    Doesn't Puppet 6 use compiled facter?
  • s

    smortex

    07/27/2022, 11:36 PM
    By default yes but I think you can opt-in for facter 4
  • v

    vchepkov

    07/27/2022, 11:36 PM
    Let me flip facterng and see what happens
    👍 1
  • d

    drobinson

    07/27/2022, 11:36 PM
    I think operatingsystemrelease is a legacy fact
  • v

    vchepkov

    07/27/2022, 11:38 PM
    right, but different code base line evaluates it
  • v

    vchepkov

    07/27/2022, 11:40 PM
    well, facterng throughs a lovely error, but returns proper value
  • v

    vchepkov

    07/27/2022, 11:40 PM
    Copy code
    "os": {
          "windows": {
            "product_name": "Windows Server 2012 R2 Standard",
            "system32": "C:\\Windows\\system32",
            "edition_id": "ServerStandard",
            "installation_type": "Server"
          },
          "family": "windows",
          "hardware": "x86_64",
          "name": "windows",
          "release": {
            "full": "2012 R2",
            "major": "2012 R2"
          },
          "architecture": "x64"
        },
  • v

    vchepkov

    07/27/2022, 11:43 PM
    yeah, that helped, thanks for the idea, @hbui and @smortex. I guess cfacter has issue for whatever reason
  • v

    vchepkov

    07/27/2022, 11:45 PM
    but ng facter throughs error
    Copy code
    E, [2022-07-27T19:44:06.189503 #23712] ERROR -- : Facter::InternalFactManager -
    undefined method `include?' for nil:NilClass
    so either way I get an error, damn it
  • h

    hbui

    07/27/2022, 11:46 PM
    my google-fu is failing me for finding the cfacter source
  • v

    vchepkov

    07/27/2022, 11:47 PM
    https://github.com/puppetlabs/facter,
  • v

    vchepkov

    07/27/2022, 11:47 PM
    https://github.com/puppetlabs/facter,
  • v

    vchepkov

    07/27/2022, 11:48 PM
    branch 3
  • v

    vchepkov

    07/27/2022, 11:49 PM
    Our friend @smortex contributed to it, it seems
  • s

    smortex

    07/27/2022, 11:51 PM
    In the old days I would have said that if facter 4 returns different from facter 3 it's an issue at least in facter 4 (supposed to be backward compatible)
    😁 1
  • v

    vchepkov

    07/27/2022, 11:51 PM
    https://github.com/puppetlabs/facter/blob/3.x/lib/src/facts/windows/operating_system_resolver.cc#L208-L209
1...109110111...428Latest