diff options
author | sawanoboly <sawanoboriyu@higanworks.com> | 2018-11-08 22:00:41 +0900 |
---|---|---|
committer | sawanoboly <sawanoboriyu@higanworks.com> | 2018-11-08 22:01:45 +0900 |
commit | 3888e9258157e545fc0ad5564186622d22f343fd (patch) | |
tree | 18894debe56d856c5864a57ce3d6e44a561fff02 | |
parent | 5236aff74b8f2a2e9244cff4d325ccb4f73b3d69 (diff) | |
download | ohai-3888e9258157e545fc0ad5564186622d22f343fd.tar.gz |
ignore empty value to avoid crash of cloud plugin
Signed-off-by: sawanoboly <sawanoboriyu@higanworks.com>
-rw-r--r-- | lib/ohai/plugins/openstack.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/openstack.rb b/lib/ohai/plugins/openstack.rb index e050362b..22d4db57 100644 --- a/lib/ohai/plugins/openstack.rb +++ b/lib/ohai/plugins/openstack.rb @@ -69,7 +69,7 @@ Ohai.plugin(:Openstack) do # fetch the metadata if we can do a simple socket connect first if can_socket_connect?(Ohai::Mixin::Ec2Metadata::EC2_METADATA_ADDR, 80, timeout) fetch_metadata.each do |k, v| - openstack[k] = v + openstack[k] = v unless v.empty? end logger.trace("Plugin Openstack: Successfully fetched Openstack metadata from the metadata endpoint") else |