From b6dab2e9bb08401507d95715734f5841663ae055 Mon Sep 17 00:00:00 2001 From: Numan Siddique Date: Tue, 28 Aug 2018 14:02:13 +0530 Subject: [PATCH] Fix the undefined method 'chomp' for nil:NilClass error seen with ovs 2.10 puppet-ovn uses puppet-vswitch to configure the OVN params. When OVS binaries are compiled with dpdk support and when vs_config provider runs the command 'ovs-vsctl list Open_vSwitch .', the below warning messages are seen and are part of the command output. ---- PMD: net_mlx5: cannot load glue library: libibverbs.so.1: cannot open shared object file: No such file or directory PMD: net_mlx5: cannot initialize PMD due to missing run-time dependency on rdma-core libraries (libibverbs, libmlx5) ---- We see the error 'undefined method 'chomp' for nil:NilClass' when the result is extracted. This patch fixes this issue by checking if the 'value' var is nil or not before 'parse_column_value' is called. Tripleo deployment with OVN is failing because of this issue. Change-Id: I415a6229a0fbc1b55451e3738539735afdc6f8f4 Closes-bug: #1789236 --- lib/puppet/provider/vs_config/ovs.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/puppet/provider/vs_config/ovs.rb b/lib/puppet/provider/vs_config/ovs.rb index 25ca7a8d..4ccb5ddc 100644 --- a/lib/puppet/provider/vs_config/ovs.rb +++ b/lib/puppet/provider/vs_config/ovs.rb @@ -39,6 +39,9 @@ Puppet::Type.type(:vs_config).provide(:ovs) do configs = [] open_vs.each do |line| key, value = line.split(' : ').map(&:strip) + if value.nil? + next + end parsed_value = parse_column_value(value) if parsed_value[:type] == "hash" parsed_value[:value].each do |k, v|