IBM / network-config-analyzer

A semantic analyzer for resources that configure network connectivity (e.g., Kubernetes NetworkPolicy).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeyError: 198.23.120.0-208.43.117.255, while running with optimization + dot output format

shmfr opened this issue · comments

Running tests/fw_rules_tests/policies/calico-testcase20-scheme.yaml with dot output format (added in the scheme file) and -opt=true in the command line, resulting in KeyError: 198.23.120.0-208.43.117.255.

the command line parameters: --scheme C:\workplace\Projects\network-config-analyzer\tests/fw_rules_tests/policies/calico-testcase20-scheme.yaml -d -opt=true

here is the traceback:
Running query Eran_gnps
Error: 198.23.120.0-208.43.117.255
Traceback (most recent call last):
File "C:\workplace\Projects\network-config-analyzer\nca\nca_cli.py", line 349, in nca_main
ret_val = run_args(args)
File "C:\workplace\Projects\network-config-analyzer\nca\nca_cli.py", line 149, in run_args
return SchemeRunner(args.scheme, args.output_format, args.file_out, args.optimized_run).run_scheme()
File "C:\workplace\Projects\network-config-analyzer\nca\SchemeRunner.py", line 157, in run_scheme
self.run_queries(self.scheme.get('queries', []))
File "C:\workplace\Projects\network-config-analyzer\nca\SchemeRunner.py", line 210, in run_queries
NetworkConfigQueryRunner(query_key, query[query_key], expected_output, output_config_obj,
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQueryRunner.py", line 142, in run_query
res, query_output, not_executed = self._run_query_for_each_config()
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQueryRunner.py", line 177, in _run_query_for_each_config
query_result.update(self._execute_one_config_query(self.query_name, self._get_config(config)))
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQueryRunner.py", line 168, in _execute_one_config_query
return query_to_exec.execute_and_compute_output_in_required_format()
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQuery.py", line 79, in execute_and_compute_output_in_required_format
query_answer = self.execute(cmd_line_flag)
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQuery.py", line 162, in execute
return self.exec()
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQuery.py", line 849, in exec
self.compute_connectivity_output_optimized()
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQuery.py", line 823, in compute_connectivity_output_optimized
output_res, opt_fw_rules = self.get_props_output_full(all_conns_opt, opt_peers_to_compare)
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQuery.py", line 908, in get_props_output_full
dot_full = self.dot_format_from_props(props, peers_to_compare)
File "C:\workplace\Projects\network-config-analyzer\nca\NetworkConfig\NetworkConfigQuery.py", line 1048, in dot_format_from_props
return conn_graph.get_connectivity_dot_format_str(connectivity_restriction)
File "C:\workplace\Projects\network-config-analyzer\nca\FWRules\ConnectivityGraph.py", line 353, in get_connectivity_dot_format_str
peers_groups = self._get_equals_groups()
File "C:\workplace\Projects\network-config-analyzer\nca\FWRules\ConnectivityGraph.py", line 276, in _get_equals_groups
peers_edges[src_peer].append((dst_peer, connection, False))
KeyError: 198.23.120.0-208.43.117.255

commented

This issue is fixed by #524