)]}'
{"lib/facter/permanent_macs_hash.rb":[{"author":{"_account_id":20172,"name":"Michele Baldessari","email":"michele@acksyn.org","username":"michele"},"change_message_id":"a600ca93cfc2dd190c4742701f4e19a9f9977c5c","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    interfaces_array \u003d Facter.value(:interfaces).split(\u0027,\u0027)"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    interfaces_array.each do |interface|"},{"line_number":23,"context_line":"      mac_raw \u003d Facter::Core::Execution.exec(\"ethtool -P #{interface} 2\u003e /dev/null\")"},{"line_number":24,"context_line":"      next if mac_raw.to_s.empty?"},{"line_number":25,"context_line":"      mac \u003d mac_raw.to_s[/((([0-9A-F]{2}:){5})|(([0-9A-F]{2}-){5})|([0-9A-F]{10}))([0-9A-F]{2})/i]"},{"line_number":26,"context_line":"      next if mac \u003d\u003d \u002700:00:00:00:00:00\u0027"}],"source_content_type":"text/x-ruby","patch_set":3,"id":"9fb8cfa7_79580f55","line":23,"range":{"start_line":23,"start_character":5,"end_line":23,"end_character":84},"updated":"2019-06-12 18:41:19.000000000","message":"so it seems .exec is deprecated and we should be using .execute https://www.rubydoc.info/gems/facter/Facter/Core/Execution. The problem with these functions is that it seems impossible to catch the exitstatus code, which is rather lame https://tickets.puppetlabs.com/browse/FACT-1284","commit_id":"de2c7de3bf5487a5dd364f7e903685b0166bfd70"},{"author":{"_account_id":20172,"name":"Michele Baldessari","email":"michele@acksyn.org","username":"michele"},"change_message_id":"a600ca93cfc2dd190c4742701f4e19a9f9977c5c","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    interfaces_array.each do |interface|"},{"line_number":23,"context_line":"      mac_raw \u003d Facter::Core::Execution.exec(\"ethtool -P #{interface} 2\u003e /dev/null\")"},{"line_number":24,"context_line":"      next if mac_raw.to_s.empty?"},{"line_number":25,"context_line":"      mac \u003d mac_raw.to_s[/((([0-9A-F]{2}:){5})|(([0-9A-F]{2}-){5})|([0-9A-F]{10}))([0-9A-F]{2})/i]"},{"line_number":26,"context_line":"      next if mac \u003d\u003d \u002700:00:00:00:00:00\u0027"},{"line_number":27,"context_line":"      macs_hash[interface] \u003d mac"},{"line_number":28,"context_line":"    end"}],"source_content_type":"text/x-ruby","patch_set":3,"id":"9fb8cfa7_394ff793","line":25,"range":{"start_line":25,"start_character":5,"end_line":25,"end_character":98},"updated":"2019-06-12 18:41:19.000000000","message":"also add a comment showing one or two examples of how the macaddress gets converted to string, so it is easier to grok from a quick read.","commit_id":"de2c7de3bf5487a5dd364f7e903685b0166bfd70"}],"manifests/fencing.pp":[{"author":{"_account_id":20172,"name":"Michele Baldessari","email":"michele@acksyn.org","username":"michele"},"change_message_id":"704b71e3d7439139a8b71127a5772f0ab59f9779","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    \u0027try_sleep\u0027 \u003d\u003e $try_sleep,"},{"line_number":59,"context_line":"  }"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"  $macs \u003d hiera(\u0027permanent_macs_hash\u0027)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  # check if instanceha is enabled"},{"line_number":64,"context_line":"  if member(hiera(\u0027compute_instanceha_short_node_names\u0027, []), downcase($::hostname)) {"}],"source_content_type":"text/x-puppet","patch_set":3,"id":"9fb8cfa7_74c71f14","line":61,"range":{"start_line":61,"start_character":0,"end_line":61,"end_character":38},"updated":"2019-06-06 13:52:38.000000000","message":"this is a new fact so you do not want to look it up via hiera but via facts. You can use $facts[\u0027permanent_macs_hash\u0027].\n\nCan we maybe think of a way so that we can actually put some sort of an error code in the permanent_macs_hash in case one of the ethtool -P calls failed and detect that here, so we fall back to the old way of doing things in case of a problem?","commit_id":"de2c7de3bf5487a5dd364f7e903685b0166bfd70"}]}
