Jira (FACT-3069) Facter 4.x on MS Azure: wrong domain is used in FQDN

3 views
Skip to first unread message

Sanjay Tripathi (Jira)

unread,
Aug 31, 2021, 12:51:02 PM8/31/21
to puppe...@googlegroups.com
Sanjay Tripathi created an issue
 
Facter / Bug FACT-3069
Facter 4.x on MS Azure: wrong domain is used in FQDN
Issue Type: Bug Bug
Affects Versions: FACT 4.0.44
Assignee: Unassigned
Components: Facter 4
Created: 2021/08/31 9:50 AM
Priority: Blocker Blocker
Reporter: Sanjay Tripathi

Facter 4.x on MS Azure: wrong domain is used in FQDN
When running Facter 4.0.49 on MicroSoft Azure, instead of using the actual DNS domain, the Azure's default DNS suffix: reddog.microsoft.com is being used:
Facter: fact "domain" has resolved to: reddog.microsoft.com
Facter: fact "networking.fqdn" has resolved to: myhost.reddog.microsoft.com
Facter: fact "fqdn" has resolved to: myhost.reddog.microsoft.com

The actual DNS domain is: mydomain.mytld

The DNS does not have myhost.reddog.microsoft.com, so any network request to the bad FQDN fails.

Whereas Facter 3.x has the correct domain on the same Azure environment:
Facter: fact "domain" has resolved to "mydomain.mytld"
Facter: fact "fqdn" has resolved to "myhost.mydomain.mytld".

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Sep 2, 2021, 7:19:03 AM9/2/21
to puppe...@googlegroups.com

Sanjay Tripathi (Jira)

unread,
Sep 3, 2021, 3:44:03 PM9/3/21
to puppe...@googlegroups.com

Sanjay Tripathi (Jira)

unread,
Sep 10, 2021, 5:23:03 PM9/10/21
to puppe...@googlegroups.com

Facter 4.x's domain and FQDN are incorrect on Windows 2016 DataCenter running on AWS:

In one AWS environment on Windows 2016 DataCenter:

Facter logs the correct hostname and domain in the "Managed to read" debug line:
Facter: Managed to read hostname: myhost and domain: mydomain.mytld

But the following are incorrect:

Facter: fact "networking.domain" has resolved to: ec2.internal
Facter: fact "domain" has resolved to: ec2.internal
Facter: fact "networking.fqdn" has resolved to: myhost.ec2.internal
Facter: fact "fqdn" has resolved to: myhost.ec2.internal

--------------------

In another AWS environment on Windows 2016 DataCenter:
In this environment, too, Facter logs the correct hostname and domain in the "Managed to read" debug line:
Facter: Managed to read hostname: myhost and domain: mydomain.mytld

But the following are incorrect:
Facter: fact "networking.domain" has resolved to: mydomain1.mytld1 mysubdomain1.mydomain2.mytld2 mysubdomain2.mydomain1.mytld1
Facter: fact "domain" has resolved to: mydomain1.mytld1 mysubdomain1.mydomain2.mytld2 mysubdomain2.mydomain1.mytld1
Facter: fact "networking.fqdn" has resolved to: myhost.mydomain1.mytld1 mysubdomain1.mydomain2.mytld2 mysubdomain2.mydomain1.mytld1
Facter: fact "fqdn" has resolved to: myhost.mydomain1.mytld1 mysubdomain1.mydomain2.mytld2 mysubdomain2.mydomain1.mytld1

(Note that the output has multiple domain suffixes, separated by spaces)

Should a separate ticket be logged for AWS?

 

Sanjay Tripathi (Jira)

unread,
Sep 10, 2021, 5:26:02 PM9/10/21
to puppe...@googlegroups.com

Is there an ETA for fixing these Facter 4.x issues with discovering domain and FQDN on Azure and AWS?

Sanjay Tripathi (Jira)

unread,
Sep 15, 2021, 2:23:03 PM9/15/21
to puppe...@googlegroups.com

Hello, Is there any update about this ticket? It affects all Azure and AWS environments.

Ciprian Badescu (Jira)

unread,
Sep 17, 2021, 3:43:02 AM9/17/21
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Sep 17, 2021, 7:33:04 AM9/17/21
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug FACT-3069
 
Re: Facter 4.x on MS Azure: wrong domain is used in FQDN

Hi Sanjay Tripathi, we're going to start looking over this.

This happening on both Azure and AWS might be linked to the fact that the Windows flavor is DataCenter, so there shouldn't be a separate ticket for that.

Gabriel Nagy (Jira)

unread,
Sep 17, 2021, 8:37:02 AM9/17/21
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug FACT-3069

Sanjay Tripathi it's likely that you are hitting the same issue fixed in https://tickets.puppetlabs.com/browse/FACT-2923.

Is this error reproducible with the latest puppet-agent/facter?

Sanjay Tripathi (Jira)

unread,
Sep 17, 2021, 1:38:04 PM9/17/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 17, 2021, 2:04:03 PM9/17/21
to puppe...@googlegroups.com

I'm not sure that you can simply update the gem. Can you try puppet 6.21.1 or newer?

Sanjay Tripathi (Jira)

unread,
Sep 17, 2021, 2:14:04 PM9/17/21
to puppe...@googlegroups.com

We use open-source Puppet Agent 6.16.0 with Facter 4.0.49. In our setup, we can update just the Facter gem. If this issue is resolved in higher Facter 4.x versions (actually, looks like FACT-2923 was fixed in 4.0.50), we can try https://rubygems.org/gems/facter/versions/4.2.4 . Please confirm. 

Ciprian Badescu (Jira)

unread,
Sep 20, 2021, 6:43:03 AM9/20/21
to puppe...@googlegroups.com

Hi Sanjay Tripathi,

You can try to manually update the facter gem, but this is not something that we tested or support.
We recommend you to upgrade to latest open-source puppet-agent version or at least 6.21.1.

Since the problem is known and already addressed in newer versions, I will close this ticket.

Reply all
Reply to author
Forward
0 new messages