Jira (PUP-5109) Puppet::Resource::Catalog::Compiler#set_server_facts always produces a warning on ipv6 only systems

24 views
Skip to first unread message

Igor Galić (JIRA)

unread,
Aug 29, 2015, 7:35:03 AM8/29/15
to puppe...@googlegroups.com
Igor Galić created an issue
 
Puppet / Bug PUP-5109
Puppet::Resource::Catalog::Compiler#set_server_facts always produces a warning on ipv6 only systems
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2015/08/29 4:34 AM
Priority: Normal Normal
Reporter: Igor Galić

When compiling a catalogue for an IPv6-only system such as

igalic@mydb02 ~> ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:ba:b8:17 brd ff:ff:ff:ff:ff:ff
    inet6 2a01:4f8:211:9d6::14/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:feba:b817/64 scope link 
       valid_lft forever preferred_lft forever
igalic@mydb02 ~>

puppet will throw the warning: Warning: Could not retrieve fact ipaddress

Given that the code that produces this warning has a fallback for some nil? values, perhaps it's not necessary to issue a warning at all, and instead just add another .nil? case:

  # Initialize our server fact hash; we add these to each client, and they
  # won't change while we're running, so it's safe to cache the values.
  def set_server_facts
    @server_facts = {}
 
    # Add our server version to the fact list
    @server_facts["serverversion"] = Puppet.version.to_s
 
    # And then add the server name and IP
    {"servername" => "fqdn",
      "serverip" => "ipaddress"
    }.each do |var, fact|
      @server_facts[var] = value if value = Facter.value(fact)
    end
 
    if @server_facts["servername"].nil?
      host = Facter.value(:hostname)
      if domain = Facter.value(:domain)
        @server_facts["servername"] = [host, domain].join(".")
      else
        @server_facts["servername"] = host
      end
    end
    if @server_facts["serverip"].nil?
      @server_facts["serverip"] = Facter.value(:ipaddress6)
    end
  end

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
Atlassian logo

Branan Riley (JIRA)

unread,
May 15, 2017, 2:56:04 PM5/15/17
to puppe...@googlegroups.com
Branan Riley commented on Bug PUP-5109
 
Re: Puppet::Resource::Catalog::Compiler#set_server_facts always produces a warning on ipv6 only systems

This is a valid issue, but not a high priority for us. I'm flagging it help_wanted so someone can pick it up in the future

This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Jacob Helwig (JIRA)

unread,
Dec 5, 2017, 11:49:03 AM12/5/17
to puppe...@googlegroups.com
Jacob Helwig updated an issue
 
Change By: Jacob Helwig
Sub-team: Coremunity
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Josh Cooper (JIRA)

unread,
May 17, 2019, 12:24:03 AM5/17/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: IPv6 help_wanted
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Rob Braden (JIRA)

unread,
Jun 10, 2019, 2:35:05 PM6/10/19
to puppe...@googlegroups.com

Jorie Tappa (JIRA)

unread,
Jun 12, 2019, 5:02:04 PM6/12/19
to puppe...@googlegroups.com
Jorie Tappa updated an issue
Change By: Jorie Tappa
Acceptance Criteria: Should not throw warning on IPv6/behavior should be identical to IPv4.

Jorie Tappa (JIRA)

unread,
Jul 8, 2019, 2:44:03 PM7/8/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Aug 6, 2019, 5:59:04 PM8/6/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Aug 6, 2019, 5:59:04 PM8/6/19
to puppe...@googlegroups.com

Kris Bosland (JIRA)

unread,
Aug 7, 2019, 1:46:03 PM8/7/19
to puppe...@googlegroups.com
Kris Bosland commented on Bug PUP-5109
 
Re: Puppet::Resource::Catalog::Compiler#set_server_facts always produces a warning on ipv6 only systems

Igor Galić, we have a PR up to fix this issue, but it has raised some questions.  How is the serverip fact used?  If it is used to compose URLs, then the user will now need to add logic to handle the IPv4 vs IPv6 case.  For more detail, see the PR: https://github.com/puppetlabs/puppet/pull/7656.

Thanks for any insight on this.

Igor Galić

unread,
Aug 12, 2019, 7:35:02 AM8/12/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Aug 16, 2019, 5:54:04 PM8/16/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Aug 16, 2019, 5:55:02 PM8/16/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Aug 20, 2019, 2:22:03 PM8/20/19
to puppe...@googlegroups.com

Kris Bosland (JIRA)

unread,
Aug 20, 2019, 2:27:04 PM8/20/19
to puppe...@googlegroups.com
Kris Bosland updated an issue
 
Change By: Kris Bosland
Release Notes Summary: This adds the serverip6 fact holding the servers IPv6 address.  The user will receive a warning if puppet cannot find either serverip or serverip6 facts, but not if one or both are found.
Release Notes: Enhancement

Josh Cooper (JIRA)

unread,
Aug 22, 2019, 4:27:03 PM8/22/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Aug 23, 2019, 11:31:03 AM8/23/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Sep 16, 2019, 2:59:05 PM9/16/19
to puppe...@googlegroups.com

Jean Bond (JIRA)

unread,
Sep 16, 2019, 5:46:03 PM9/16/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages