diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-04-17 20:07:42 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-04-17 20:10:31 +0200 |
commit | 20f60bd215bc73f4fd9d8c0c08598fb4e6a28b77 (patch) | |
tree | 4284c38796c40597e0ed4b9f9fb42708e374e340 | |
parent | f9b8d557900a105483168e75344059cba5435e6e (diff) |
fuel-nailgun-agent: ohai: Read L1 info w/ ethtool.
fuel-nailgun-agent uses ohai and rethtool for reading eth info,
including ethernet card speed. However, current methods 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
Change-Id: Ic8c252e411a680af32cc68574c572434147a7e78
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | patches/fuel-nailgun-agent/0001-ohai-Support-reading-L1-info-from-ethtool.patch | 69 | ||||
m--------- | upstream/fuel-nailgun-agent | 0 |
4 files changed, 75 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules index d5ab1033..4f159866 100644 --- a/.gitmodules +++ b/.gitmodules @@ -34,3 +34,7 @@ path = upstream/fuel-plugin-opendaylight url = https://github.com/openstack/fuel-plugin-opendaylight.git branch = brahmaputra-release +[submodule "fuel-nailgun-agent"] + path = upstream/fuel-nailgun-agent + url = https://github.com/openstack/fuel-nailgun-agent + branch = stable/8.0 @@ -58,6 +58,7 @@ build: FUELLIB_REPO=${root}/upstream/fuel-library \ NAILGUN_REPO=${root}/upstream/fuel-web \ FUEL_AGENT_REPO=${root}/upstream/fuel-agent \ + FUEL_NAILGUN_AGENT_REPO=${root}/upstream/fuel-nailgun-agent \ FUEL_MIRROR_REPO=${root}/upstream/fuel-mirror \ QEMU_REPO=${root}/upstream/fuel-plugin-qemu \ OVSNFV_DPDK_REPO=${root}/upstream/fuel-plugin-ovsnfv \ @@ -66,6 +67,7 @@ build: FUELLIB_COMMIT=HEAD \ NAILGUN_COMMIT=HEAD \ FUEL_AGENT_COMMIT=HEAD \ + FUEL_NAILGUN_AGENT_COMMIT=HEAD \ FUEL_MIRROR_COMMIT=HEAD \ QEMU_BRANCH=HEAD \ OVSNFV_DPDK_BRANCH=armband-workbench \ 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 diff --git a/upstream/fuel-nailgun-agent b/upstream/fuel-nailgun-agent new file mode 160000 +Subproject b2bb466fd5bd92da614cdbd819d6999c510ebfb |