Fixes after live cloud run
- ping, proper handling of multiple IPs on one interface
- node skips accounted on gathering linux versions
- '--force-tag' option for package report
- '--exclude-keywords' option for package report
- 'versions' foldereincluded on 'setup.py install'
Change-Id: I5e1b84f187270789223d50887d9d5d5cb78ee5ba
Related-PROD: PROD-28199
diff --git a/cfg_checker/modules/network/pinger.py b/cfg_checker/modules/network/pinger.py
index 351c05a..e5fa614 100644
--- a/cfg_checker/modules/network/pinger.py
+++ b/cfg_checker/modules/network/pinger.py
@@ -70,13 +70,15 @@
}
for tgt_host, tgt_data in nodes.iteritems():
+ _t = _packets[src_host]["targets"]
for tgt_if in tgt_data:
tgt_if_name = tgt_if['name']
_ip_index = 0
for tgt_ip in tgt_if['ifs']:
_ip = str(tgt_ip.ip)
if _ip not in src_ips:
- _packets[src_host]["targets"][tgt_host] = []
+ if tgt_host not in _t:
+ _t[tgt_host] = []
_tgt = {
"ip": _ip,
"tgt_host": tgt_host,
@@ -85,7 +87,7 @@
"mtu": self.target_mtu,
"size": self.packet_size
}
- _packets[src_host]["targets"][tgt_host].append(
+ _t[tgt_host].append(
_tgt
)
_count += 1
@@ -135,7 +137,14 @@
)
# Parse salt output
_result = _results[src]
- _result = json.loads(_result)
+ try:
+ _result = json.loads(_result)
+ except ValueError:
+ _progress.clearline()
+ logger_cli.error(
+ "# ERROR: Unexpected salt return: '{}'\n".format(_result)
+ )
+ continue
# Handle return codes
for tgt_node, _tgt_ips in _result.iteritems():
for _params in _tgt_ips: