)]}'
{"manifests/pacemaker/haproxy_with_vip.pp":[{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"1812a60ee5ad156faf82b519c259517dae673db6","unresolved":false,"context_lines":[{"line_number":62,"context_line":"      $netmask \u003d \u002732\u0027"},{"line_number":63,"context_line":"    }"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    if $require \u003d\u003d undef {"},{"line_number":66,"context_line":"      $real_require \u003d [Pacemaker::Resource::Service[\u0027haproxy\u0027],"},{"line_number":67,"context_line":"                      Pacemaker::Resource::Ip[\"${vip_name}_vip\"]]"},{"line_number":68,"context_line":"    } else {"}],"source_content_type":"text/x-puppet","patch_set":23,"id":"7a3c09a3_334f8a6c","line":65,"updated":"2017-01-16 21:36:22.000000000","message":"So if i recall we\u0027ve had a few cases where this magic $require (same for $subscribe) switched in puppet versions so that they were no longer defined. Is it better to actually declare these and have it passed in to this resource to prevent a breakage later?","commit_id":"39e1b01d9a1601073835b4e2d5c4921d5e1fdd3b"},{"author":{"_account_id":20172,"name":"Michele Baldessari","email":"michele@acksyn.org","username":"michele"},"change_message_id":"73847fe0252f4c3514b389b2663cb736fa1e4c43","unresolved":false,"context_lines":[{"line_number":62,"context_line":"      $netmask \u003d \u002732\u0027"},{"line_number":63,"context_line":"    }"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    if $require \u003d\u003d undef {"},{"line_number":66,"context_line":"      $real_require \u003d [Pacemaker::Resource::Service[\u0027haproxy\u0027],"},{"line_number":67,"context_line":"                      Pacemaker::Resource::Ip[\"${vip_name}_vip\"]]"},{"line_number":68,"context_line":"    } else {"}],"source_content_type":"text/x-puppet","patch_set":23,"id":"7a3c09a3_b367e94b","line":65,"in_reply_to":"7a3c09a3_334f8a6c","updated":"2017-01-17 08:42:41.000000000","message":"Ack I will take a look at doing this","commit_id":"39e1b01d9a1601073835b4e2d5c4921d5e1fdd3b"},{"author":{"_account_id":20172,"name":"Michele Baldessari","email":"michele@acksyn.org","username":"michele"},"change_message_id":"53000b824ede1f9288238c085122920f7fe0e0a4","unresolved":false,"context_lines":[{"line_number":62,"context_line":"      $netmask \u003d \u002732\u0027"},{"line_number":63,"context_line":"    }"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    if $require \u003d\u003d undef {"},{"line_number":66,"context_line":"      $real_require \u003d [Pacemaker::Resource::Service[\u0027haproxy\u0027],"},{"line_number":67,"context_line":"                      Pacemaker::Resource::Ip[\"${vip_name}_vip\"]]"},{"line_number":68,"context_line":"    } else {"}],"source_content_type":"text/x-puppet","patch_set":23,"id":"7a3c09a3_7a60d401","line":65,"in_reply_to":"7a3c09a3_b367e94b","updated":"2017-01-17 17:58:41.000000000","message":"So lint now complains about require is a metaparam; this value will inherit to all contained resources in the tripleo::pacemaker::haproxy_with_vip definition. I can do either of:\na) remove it as a parameter as it was in a previous review\nb) rename it to something like \"require_extra\"\n\nI\u0027d tend to go for b). Thoughts?","commit_id":"39e1b01d9a1601073835b4e2d5c4921d5e1fdd3b"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"2e62e6622c5364720ae5f1b92faba50eefc007bb","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  $ip_address,"},{"line_number":60,"context_line":"  $location_rule \u003d undef,"},{"line_number":61,"context_line":"  $pcs_tries     \u003d 1,"},{"line_number":62,"context_line":"  $require       \u003d undef,"},{"line_number":63,"context_line":"  $ensure        \u003d true)"},{"line_number":64,"context_line":"{"},{"line_number":65,"context_line":"  if($ensure) {"}],"source_content_type":"text/x-puppet","patch_set":24,"id":"7a3c09a3_5c0eb03b","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":25},"updated":"2017-01-17 19:38:54.000000000","message":"So in thinking about this I don\u0027t think you actually need this.  Basically this part should apply to this resource so it should ensure that the order/collocation occur after whatever require is specified for tripleo::pacemaker::haproxy_with_vip.","commit_id":"365313f0771e3ba1bf5b1b737d6b3a4a4435cfbb"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"2e62e6622c5364720ae5f1b92faba50eefc007bb","unresolved":false,"context_lines":[{"line_number":69,"context_line":"      $netmask \u003d \u002732\u0027"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if $require \u003d\u003d undef {"},{"line_number":73,"context_line":"      $real_require \u003d [Pacemaker::Resource::Service[\u0027haproxy\u0027],"},{"line_number":74,"context_line":"                      Pacemaker::Resource::Ip[\"${vip_name}_vip\"]]"},{"line_number":75,"context_line":"    } else {"},{"line_number":76,"context_line":"      $real_require \u003d [Pacemaker::Resource::Service[\u0027haproxy\u0027],"},{"line_number":77,"context_line":"                      Pacemaker::Resource::Ip[\"${vip_name}_vip\"],"},{"line_number":78,"context_line":"                      $require]"},{"line_number":79,"context_line":"    }"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    pacemaker::resource::ip { \"${vip_name}_vip\":"},{"line_number":82,"context_line":"      ip_address    \u003d\u003e $ip_address,"}],"source_content_type":"text/x-puppet","patch_set":24,"id":"7a3c09a3_7c0b6c2a","line":79,"range":{"start_line":72,"start_character":0,"end_line":79,"end_character":5},"updated":"2017-01-17 19:38:54.000000000","message":"I wouldn\u0027t do these, and i\u0027d just add these to the individual resources or see my last comment about just summarizing the ordering in a specific block.","commit_id":"365313f0771e3ba1bf5b1b737d6b3a4a4435cfbb"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"2e62e6622c5364720ae5f1b92faba50eefc007bb","unresolved":false,"context_lines":[{"line_number":100,"context_line":"      score   \u003d\u003e \u0027INFINITY\u0027,"},{"line_number":101,"context_line":"      tries   \u003d\u003e $pcs_tries,"},{"line_number":102,"context_line":"      require \u003d\u003e $real_require,"},{"line_number":103,"context_line":"    }"},{"line_number":104,"context_line":"  }"},{"line_number":105,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":24,"id":"7a3c09a3_965714c9","line":103,"updated":"2017-01-17 19:38:54.000000000","message":"A simpler thing to do would be to just define all the relationships outside of the resources so it\u0027s more clear about the nature of how things need to be ordered. It seems like all the requires on the previous pacemaker::* resources could be summed up as...\n\nPacemaker::Resource::Ip[\"${vip_name}_vip\"] -\u003e\nPacemaker::Resource::Service[\u0027haproxy\u0027] -\u003e\nPacemaker::Constraint::Order[\"${vip_name}_vip-then-haproxy\"] -\u003e\nPacemaker::Constraint::Colocation[\"${vip_name}_vip-with-haproxy\"]\n\nIf you defined it as this, it\u0027s much clearer as to the order in which things need to occur and you\u0027re less likely to get a race condition between order/colocation.  Additionally all of the resources should be contained to this resource so you don\u0027t really need to pass down the $require. See https://docs.puppet.com/puppet/latest/lang_containment.html#containing-resources","commit_id":"365313f0771e3ba1bf5b1b737d6b3a4a4435cfbb"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"a4bb6bd226edb5ed4dd75b2c78e3b65f0cf98635","unresolved":false,"context_lines":[{"line_number":100,"context_line":"      score   \u003d\u003e \u0027INFINITY\u0027,"},{"line_number":101,"context_line":"      tries   \u003d\u003e $pcs_tries,"},{"line_number":102,"context_line":"      require \u003d\u003e $real_require,"},{"line_number":103,"context_line":"    }"},{"line_number":104,"context_line":"  }"},{"line_number":105,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":24,"id":"7a3c09a3_b0a94926","line":103,"in_reply_to":"7a3c09a3_1908a1d9","updated":"2017-01-18 14:07:59.000000000","message":"I\u0027m not saying change your approach as I think it\u0027s valid. I\u0027m saying do the requires different based on how puppet handles them.  \n\n      tripleo::pacemaker::haproxy_with_vip { \u0027haproxy_and_control_vip\u0027:\n        vip_name      \u003d\u003e \u0027control\u0027,\n        ip_address    \u003d\u003e $control_vip,\n        location_rule \u003d\u003e $haproxy_location_rule,\n        pcs_tries     \u003d\u003e $pcs_tries,\n        require       \u003d\u003e Pacemaker::Property[\u0027haproxy-role-node-property\u0027],\n      }\n\nThis will ensure all the resource in this module are done after Pacemaker::Property[\u0027haproxy-role-node-property\u0027] due to the doc I mentioned previously. There\u0027s no need to pass this into this module.  Then from there, remove the requires on the resources that you currently have and just use the ordering statements to line them up.\n\n    Pacemaker::Resource::Ip[\"${vip_name}_vip\"] -\u003e\n      Pacemaker::Resource::Service[\u0027haproxy\u0027] -\u003e\n        Pacemaker::Constraint::Order[\"${vip_name}_vip-then-haproxy\"] -\u003e\n          Pacemaker::Constraint::Colocation[\"${vip_name}_vip-with-haproxy\"]\n\nThis should be what you have today, with the exception that the Colocation being explicitly ordered after the Order.","commit_id":"365313f0771e3ba1bf5b1b737d6b3a4a4435cfbb"},{"author":{"_account_id":20172,"name":"Michele Baldessari","email":"michele@acksyn.org","username":"michele"},"change_message_id":"a183aada4be4d119396ec4ea819d1d0548c7c243","unresolved":false,"context_lines":[{"line_number":100,"context_line":"      score   \u003d\u003e \u0027INFINITY\u0027,"},{"line_number":101,"context_line":"      tries   \u003d\u003e $pcs_tries,"},{"line_number":102,"context_line":"      require \u003d\u003e $real_require,"},{"line_number":103,"context_line":"    }"},{"line_number":104,"context_line":"  }"},{"line_number":105,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":24,"id":"7a3c09a3_1908a1d9","line":103,"in_reply_to":"7a3c09a3_965714c9","updated":"2017-01-18 07:25:22.000000000","message":"Thanks Alex. I agree it would make things clearer, but I don\u0027t think I can define all the resources in this function because I actually pass down a specific require on a property which is created outside of this function (and has to be unfortunately). Namely I do this:\n      tripleo::pacemaker::haproxy_with_vip { \u0027haproxy_and_control_vip\u0027:\n        vip_name      \u003d\u003e \u0027control\u0027,\n        ip_address    \u003d\u003e $control_vip,\n        location_rule \u003d\u003e $haproxy_location_rule,\n        pcs_tries     \u003d\u003e $pcs_tries,\n        require       \u003d\u003e Pacemaker::Property[\u0027haproxy-role-node-property\u0027],\n      }\n\nThat\u0027s the reason I took this approach. Am not sure I can do it other ways? Note that I cannot shove the pacemaker::property creation within this function because that happens on all nodes on a different step. Thanks, Michele","commit_id":"365313f0771e3ba1bf5b1b737d6b3a4a4435cfbb"},{"author":{"_account_id":20172,"name":"Michele Baldessari","email":"michele@acksyn.org","username":"michele"},"change_message_id":"b787b12c84f5a95edeead7162f9b3525a37eab74","unresolved":false,"context_lines":[{"line_number":100,"context_line":"      score   \u003d\u003e \u0027INFINITY\u0027,"},{"line_number":101,"context_line":"      tries   \u003d\u003e $pcs_tries,"},{"line_number":102,"context_line":"      require \u003d\u003e $real_require,"},{"line_number":103,"context_line":"    }"},{"line_number":104,"context_line":"  }"},{"line_number":105,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":24,"id":"7a3c09a3_37de28dd","line":103,"in_reply_to":"7a3c09a3_b0a94926","updated":"2017-01-18 15:55:39.000000000","message":"Ok, I think I understood what you mean. Am submitting a new review that I just tested locally with a composable ha deploy. thanks","commit_id":"365313f0771e3ba1bf5b1b737d6b3a4a4435cfbb"}],"manifests/profile/pacemaker/cinder/volume.pp":[{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"7f05491a44da2587516279b535559ae17a3a474b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    pacemaker::property { \u0027cinder-volume-role-node-property\u0027:"},{"line_number":51,"context_line":"      property \u003d\u003e \u0027cinder-volume-role\u0027,"},{"line_number":52,"context_line":"      value    \u003d\u003e true,"},{"line_number":53,"context_line":"      node     \u003d\u003e $::hostname,"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"  }"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":11,"id":"3a71b18c_8a273fc9","line":53,"updated":"2016-12-05 02:03:42.000000000","message":"if we add this unconditionally though, what would be the point for the user to specify a list of nodes for a service?\n\nI guess we need to parse the list of nodes where the service can go and if we find our hostname in there, then add the property?","commit_id":"b34a87fc17d5b2055dbd92891817df45a24c068e"},{"author":{"_account_id":20172,"name":"Michele Baldessari","email":"michele@acksyn.org","username":"michele"},"change_message_id":"99492945ea946d2e687c5a5f436f9d8a699edb1d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    pacemaker::property { \u0027cinder-volume-role-node-property\u0027:"},{"line_number":51,"context_line":"      property \u003d\u003e \u0027cinder-volume-role\u0027,"},{"line_number":52,"context_line":"      value    \u003d\u003e true,"},{"line_number":53,"context_line":"      node     \u003d\u003e $::hostname,"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"  }"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":11,"id":"3a71b18c_d91e6fba","line":53,"in_reply_to":"3a71b18c_8a273fc9","updated":"2016-12-05 06:29:46.000000000","message":"So we set the property on each node where the operator includes this profile. This translates to \"the service is allowed to run on such a node\". So an operator can create something like this:\n- name: GaleraNode\n  ServicesDefault:\n    - OS::TripleO::Services::CACerts\n    - OS::TripleO::Services::Kernel\n    - OS::TripleO::Services::Ntp\n    - OS::TripleO::Services::Timezone\n    - OS::TripleO::Services::Snmp\n    - OS::TripleO::Services::TripleoPackages\n    - OS::TripleO::Services::TripleoFirewall\n    - OS::TripleO::Services::SensuClient\n    - OS::TripleO::Services::FluentdClient\n    - OS::TripleO::Services::MySQL\n\nAnd every GaleraNode will have the property set. Thanks to the location rule, galera will run *only* on these nodes","commit_id":"b34a87fc17d5b2055dbd92891817df45a24c068e"}]}
