Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Mac address based identifier for Rackspace falsely identifies systems on... #122

Closed
wants to merge 1 commit into from

2 participants

@tas50

... Cisco

This causes a lot of problems in cookbooks that try to use the private
IP if the equipment is on rackspace. They end up failing if there is
no eth1 on your hardware/VMs connected to Cisco networking equipment.

@tas50 tas50 Mac address based identifier for Rackspace falsely identifies systems…
… on Cisco

This causes a lot of problems in cookbooks that try to use the private
IP if the equipment is on rackspace.  They end up failing if there is
no eth1 on your hardware/VMs connected to Cisco networking equipment.
cb77f4a
@tas50 tas50 closed this
@btm
Owner

I think this was a dupe of #152

@tas50 tas50 deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 24, 2013
  1. @tas50

    Mac address based identifier for Rackspace falsely identifies systems…

    tas50 authored
    … on Cisco
    
    This causes a lot of problems in cookbooks that try to use the private
    IP if the equipment is on rackspace.  They end up failing if there is
    no eth1 on your hardware/VMs connected to Cisco networking equipment.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 17 deletions.
  1. +3 −17 lib/ohai/plugins/rackspace.rb
View
20 lib/ohai/plugins/rackspace.rb
@@ -28,27 +28,13 @@ def has_rackspace_kernel?
kernel[:release].split('-').last.eql?("rscloud")
end
-# Checks for matching rackspace arp mac
-#
-# === Return
-# true:: If mac address matches
-# false:: Otherwise
-def has_rackspace_mac?
- network[:interfaces].values.each do |iface|
- unless iface[:arp].nil?
- return true if iface[:arp].value?("00:00:0c:07:ac:01") or iface[:arp].value?("00:00:0c:9f:f0:01")
- end
- end
- false
-end
-
# Identifies the rackspace cloud
#
# === Return
# true:: If the rackspace cloud can be identified
# false:: Otherwise
def looks_like_rackspace?
- hint?('rackspace') || has_rackspace_mac? || has_rackspace_kernel?
+ hint?('rackspace') || has_rackspace_kernel?
end
# Names rackspace ip address
@@ -59,7 +45,7 @@ def looks_like_rackspace?
def get_ip_address(name, eth)
network[:interfaces][eth][:addresses].each do |key, info|
if info['family'] == 'inet'
- rackspace[name] = key
+ rackspace[name] = key
break # break when we found an address
end
end
@@ -74,7 +60,7 @@ def get_global_ipv6_address(name, eth)
network[:interfaces][eth][:addresses].each do |key, info|
# check if we got an ipv6 address and if its in global scope
if info['family'] == 'inet6' && info['scope'] == 'Global'
- rackspace[name] = key
+ rackspace[name] = key
break # break when we found an address
end
end
Something went wrong with that request. Please try again.