Bug 221552 - [PATCH] sysutils/rubygem-facter runs extremely slow on non ec2 virtual machines
Summary: [PATCH] sysutils/rubygem-facter runs extremely slow on non ec2 virtual machines
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bartek Rutkowski
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-08-16 03:00 UTC by Jim Pirzyk
Modified: 2017-11-08 11:55 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (robak)


Attachments
Add make config option to remove ec2 facts (1023 bytes, patch)
2017-08-16 03:00 UTC, Jim Pirzyk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Pirzyk freebsd_committer 2017-08-16 03:00:35 UTC
Created attachment 185469 [details]
Add make config option to remove ec2 facts

the latest rubygem-facter (2.5.0) tries to communicate with a Amazon web page (169.254.169.254) for any virtual machine of type xen or kvm.

On my RootBSD VPS we see this timing:

pirzyk@stitch:~/tmp
2>time facter > /dev/null 

real	7m43.22s
user	0m0.25s
sys	0m0.11s

After the attached patch is applied the timings return to normal:

pirzyk@stitch:~/tmp
3>time facter > /dev/null

real	0m0.34s
user	0m0.21s
sys	0m0.12s

The patch add an option to remove the ec2 facts from the facter install, following the same steps available to remove the zfs/zpool facts.
Comment 1 Maciej Suszko 2017-11-02 17:42:17 UTC
I had the same problem on my bhyve virtual machines (all FreeBSD). Disabling EC2 facts solved the problem, facter show the facts within milliseconds instead of minutes.

IMHO EC2 facts should be disabled by default as well as ZFS facts.
Comment 2 commit-hook freebsd_committer 2017-11-08 11:54:23 UTC
A commit references this bug:

Author: robak
Date: Wed Nov  8 11:53:50 UTC 2017
New revision: 453731
URL: https://svnweb.freebsd.org/changeset/ports/453731

Log:
  sysutils/rubygem-facter: add AWS EC2 facts option

  On machines that are not running in AWS EC2 cloud running facter was
  taking very long time trying to gather information that wasn't there.
  This change adds an option allowing to disable such facts in similar manner
  to ZFS related facts.

  PR:		221552
  Submitted by:	pirzyk

Changes:
  head/sysutils/rubygem-facter/Makefile
Comment 3 Bartek Rutkowski freebsd_committer 2017-11-08 11:55:33 UTC
Committed, thanks!