summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/fuel-nailgun-agent/0001-ohai-Support-reading-L1-info-from-ethtool.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/patches/fuel-nailgun-agent/0001-ohai-Support-reading-L1-info-from-ethtool.patch b/patches/fuel-nailgun-agent/0001-ohai-Support-reading-L1-info-from-ethtool.patch
new file mode 100644
index 00000000..911001f4
--- /dev/null
+++ b/patches/fuel-nailgun-agent/0001-ohai-Support-reading-L1-info-from-ethtool.patch
@@ -0,0 +1,69 @@
+From: Enea Armband Devops Team <armband@enea.com>
+Date: Sat, 2 Apr 2016 22:57:59 +0200
+Subject: [PATCH] ohai: Support reading L1 info from ethtool.
+
+Traditional methods of reading the ethernet card speed rely on the
+drivers populating the advertised and/or supported link speed lists.
+
+This is not true for all drivers, especially for some Fibers
+that only report the speed via ethtool when the link is up.
+
+This patch adds support for reading L1 info from ohai, which
+supports parsing ethtool speed starting with version amos2 [1].
+
+[1] https://linux.enea.com/mos-repos/ubuntu/8.0/pool/main/o/
+ ohai/ohai_6.14.0-2~u14.04+mos1+mos8.0+amos2_all.deb
+---
+ ...ohai-Support-reading-L1-info-from-ethtool.patch | 34 ++++++++++++++++++++++
+ debian/patches/series | 1 +
+ 2 files changed, 35 insertions(+)
+ create mode 100644 debian/patches/0001-ohai-Support-reading-L1-info-from-ethtool.patch
+ create mode 100644 debian/patches/series
+
+diff --git a/debian/patches/0001-ohai-Support-reading-L1-info-from-ethtool.patch b/debian/patches/0001-ohai-Support-reading-L1-info-from-ethtool.patch
+new file mode 100644
+index 0000000..aa50ea4
+--- /dev/null
++++ b/debian/patches/0001-ohai-Support-reading-L1-info-from-ethtool.patch
+@@ -0,0 +1,34 @@
++From 942c67f74c00b1097d1ad27ece79fe91b475190c Mon Sep 17 00:00:00 2001
++From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
++Date: Sat, 2 Apr 2016 22:54:27 +0200
++Subject: [PATCH] ohai: Support reading L1 info from ethtool.
++
++Upstream ohai [1] introduces support for reading layer one information
++from ethtool. Allow nailgun-agent to use that info if present.
++
++[1] https://github.com/chef/ohai/commit/
++ afd42e9122f057ab00dd24357c28dc2ad6806434
++---
++ agent | 6 +++++-
++ 1 file changed, 5 insertions(+), 1 deletion(-)
++
++diff --git a/agent b/agent
++index c764a68..978131f 100755
++--- a/agent
+++++ b/agent
++@@ -316,7 +316,11 @@ class NodeAgent
++ int_meta[:current_speed] = int_info.current_mode.speed
++ end
++ rescue
++- int_meta[:current_speed] = nil
+++ if intinfo.has_key?(:link_speed) && 0 < intinfo[:link_speed]
+++ int_meta[:current_speed] = intinfo[:link_speed]
+++ else
+++ int_meta[:current_speed] = nil
+++ end
++ end
++ elsif (addrinfo[:family] rescue nil) =~ /^inet$/
++ int_meta[:ip] = addr
++--
++1.9.1
++
+diff --git a/debian/patches/series b/debian/patches/series
+new file mode 100644
+index 0000000..b221a98
+--- /dev/null
++++ b/debian/patches/series
+@@ -0,0 +1 @@
++0001-ohai-Support-reading-L1-info-from-ethtool.patch