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

    csharpsteen

    08/04/2023, 2:36 PM
    I think it's actually
    $(hostname -s).$(hostname -d)
    with
    hostname -f
    as a fallback if one of those is empty.
    βœ”οΈ 1
  • m

    matt

    08/04/2023, 2:37 PM
    oooooooh
  • m

    matt

    08/04/2023, 2:37 PM
    hostname -d is empty
  • m

    matt

    08/04/2023, 2:38 PM
    (not sure why yet) so it again should fall back to hostname -f
  • c

    csharpsteen

    08/04/2023, 2:38 PM
    Or, to put it differently, the default is what DNS says. Local settings, like
    hostnamectl set-hostname
    are used as a fallback if DNS is not providing an answer.
  • m

    matt

    08/04/2023, 2:39 PM
    I'll do some research why these two nodes seem to be failing that dns check (the whole lab estate has certname in the wrong place, so that's interesting)
  • v

    vchepkov

    08/04/2023, 2:40 PM
    is OS the same?
  • m

    matt

    08/04/2023, 2:40 PM
    thank you for that though, I'll correct the real problem, but clearly these 2 nodes have something a bit odd on the DNS
  • m

    matt

    08/04/2023, 2:41 PM
    OS on the test hosts is RHEL 9 or Debian 11, they are all working apart from 2 Debian 11 nodes
  • m

    matt

    08/04/2023, 2:41 PM
    I'll sort that out once I fix the puppet.conf user error
  • v

    vchepkov

    08/04/2023, 2:41 PM
    check PTR records maybe?
  • m

    matt

    08/04/2023, 2:42 PM
    the actual DNS resolution is working 100% fine, already checked that, it's something about these 2 nodes local setup when they resolve themselves from the hostname command (hostname -d is empty on these 2, despite being able to resolve them with the fqdn)
  • b

    bastelfreak

    08/04/2023, 2:42 PM
    checking /etc/hostname and /etc/hosts is also worth a shot
    this 1
  • m

    matt

    08/04/2023, 2:43 PM
    great suggestion
  • m

    matt

    08/04/2023, 2:43 PM
    and than you for fixing my user error
  • b

    bastelfreak

    08/04/2023, 2:43 PM
    some dns libs read those, others don't. because of that: always cert certname
  • m

    matt

    08/04/2023, 2:43 PM
    found it
  • m

    matt

    08/04/2023, 2:43 PM
    what silly problem
  • m

    matt

    08/04/2023, 2:44 PM
    127.0.1.1 maps to hostname
  • m

    matt

    08/04/2023, 2:44 PM
    no idea why on these 2 nodes
  • m

    matt

    08/04/2023, 2:44 PM
    set that to hostname.fqdn and it works
  • b

    bastelfreak

    08/04/2023, 2:44 PM
    πŸ™‚
  • b

    bastelfreak

    08/04/2023, 2:44 PM
    I recommend purging those with puppet.
    βœ… 1
  • v

    vchepkov

    08/04/2023, 2:45 PM
    that's Debian's thing πŸ™‚
  • c

    csharpsteen

    08/04/2023, 2:46 PM
    Actually, I was wrong about
    hostname -f
    . It's
    $(hostname -s).$(hostname -d)
    or just
    hostname -s
    if domain is empty: https://github.com/puppetlabs/puppet/blob/7.25.0/lib/puppet/settings.rb#L69-L78
  • m

    matt

    08/04/2023, 2:49 PM
    useful education, thank you
  • v

    vchepkov

    08/04/2023, 2:50 PM
    hostname_fact is probably derived from
    hostname -f
    ?
  • v

    vchepkov

    08/04/2023, 2:50 PM
    it gotta be used somewhere πŸ™‚
  • s

    Slackbot

    08/04/2023, 3:02 PM
    This message was deleted.
    πŸ‘ 1
    y
    b
    k
    • 4
    • 8
  • m

    Moe

    08/04/2023, 5:01 PM
    I'm stuck on a logic. I want to iterate over elements in an array and add one element after another to a new variable and for sake of simplicity print it out each step at a time. For example:
    Copy code
    $path = '/my/path/is/here'
    $array = split($path, '/')
    $blub = ''
    $array.each |$i| {
     $blub = "$blub/$i"
     notice($blub)
    }
    This is obviously the wrong syntax but I hope it's getting my point across.
1...402403404...428Latest