Conversation
|
@ShimShtein @ares any thoughts on this? |
It's quite painful to look back for changed settings, so I think it would be OK to duplicate the current setting value here.
Having mixed
Agreed, at least theoretically it should add cardinality, which is not desired. |
|
@ShimShtein ready for another round |
definitions/reports/networking.rb
Outdated
| def subnet_counts_by_type | ||
| %w[ipv4 ipv6].each do |type| | ||
| data_field("subnet_#{type}_count") do | ||
| sql_count("subnets where type = 'Subnet::Ipv#{type}'") |
There was a problem hiding this comment.
This will generate Subnet::Ipvipv6
| INNER JOIN nics on nics.host_id = hosts.id | ||
| WHERE #{condition} | ||
| SQL | ||
| data_field("hosts_with_#{kind}_interface_count") { sql_count(query) } |
There was a problem hiding this comment.
If I am not mistaken, for host with two nics, you will get 2 records in the joined table.
There was a problem hiding this comment.
Yeah, you're right, fixed
Rather than trying to answer the loosely defined "are we running ipv4-only, ipv6-only or dualstack?" question directly, the aim here is to collect enough data to be able to answer the question later, depending on how exactly we define it.
I was also thinking about further scoping the
hosts_with_{ipv4-only,ipv6-only,dualstack}_interace_countby the flag of the interface (primary,provisionand so on), but that would probably be too granular.I also though about including the ipv4 vs ipv6 preference settings (
remote_execution_connect_by_ip_prefer_ipv6,discovery_prefer_ipv6), but we can already infer that from the list of modified settings.