Bug #8358
ec2 fact runs incorrectly on some xen setups
| Status: | Accepted | Start date: | 07/11/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | library | |||
| Target version: | 1.6.x | |||
| Keywords: | ec2 | Affected Facter version: | 1.6.0 | |
| Branch: | ||||
| Votes: | 0 |
Description
When a xen dom0 is setup in bridging mode the xen scripts will create a bridge and a bunch of virtual interfaces all with the MAC address FE:FF:FF:FF:FF:FF, this results in domU with the arp fact set to this which triggers the ec2 facts incorrectly.
% facter arp fe:ff:ff:ff:ff:ff
From the ec2.rb:
def can_connect?(wait_sec=2)
url = "http://169.254.169.254:80/"
Timeout::timeout(wait_sec) {open(url)}
return true
rescue Timeout::Error
return false
rescue
return false
end
def has_ec2_arp?
!!(Facter.value(:arp) == "fe:ff:ff:ff:ff:ff")
end
if (has_euca_mac? || has_ec2_arp?) && can_connect?
.
.
.
So since on this specific setup the has_ec2_arp? method returns true the can_connect? method gets run which has a 2 second timeout and it will fail to connect. This fact runs twice resulting in a 4 second slow down.
This is on CentOS 5.6
Related issues
History
Updated by Ben Hughes 11 months ago
- Status changed from Unreviewed to Accepted
Updated by James Turnbull 9 months ago
- Category set to library
Updated by Ken Barber 6 months ago
- Target version set to 1.6.x
- Keywords set to ec2