)]}'
{"mariadb/templates/bin/_start.py.tpl":[{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"8cfc185060be92ef3ce1818c75e70dde507244fd","unresolved":true,"context_lines":[{"line_number":941,"context_line":"        launch_cluster_monitor()"},{"line_number":942,"context_line":"        while not check_for_active_nodes():"},{"line_number":943,"context_line":"            time.sleep(default_sleep)"},{"line_number":944,"context_line":"        set_configmap_annotation("},{"line_number":945,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027live\u0027)"},{"line_number":946,"context_line":"        run_mysqld()"},{"line_number":947,"context_line":"else:"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"af907cae_f486e812","side":"PARENT","line":944,"updated":"2021-04-30 18:57:10.000000000","message":"why remove this?","commit_id":"3435a3a82a42022167d105eb01fb36074b887a31"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"6065cd6dc27481f1ca055c0c2dd934261888899f","unresolved":true,"context_lines":[{"line_number":941,"context_line":"        launch_cluster_monitor()"},{"line_number":942,"context_line":"        while not check_for_active_nodes():"},{"line_number":943,"context_line":"            time.sleep(default_sleep)"},{"line_number":944,"context_line":"        set_configmap_annotation("},{"line_number":945,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027live\u0027)"},{"line_number":946,"context_line":"        run_mysqld()"},{"line_number":947,"context_line":"else:"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"274d2963_9149410d","side":"PARENT","line":944,"in_reply_to":"af907cae_f486e812","updated":"2021-05-01 06:31:12.000000000","message":"I waffle between keeping it and removing it, but ultimately decided that it makes more logical sense to have the leader node set the cluster state to live, instead of relying on the member node(s) to set it.  Keeping it here may be a good failsafe but seems overly duplicate for me, but I can be persuaded otherwise if others have strong sentiment about this.","commit_id":"3435a3a82a42022167d105eb01fb36074b887a31"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"8689c783982d9d1071f5b51c8dd2a3f696eeed81","unresolved":true,"context_lines":[{"line_number":327,"context_line":"        \u0027metadata\u0027][\u0027resource_version\u0027]"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    # Do a couple of retry in case of 409 only"},{"line_number":330,"context_line":"    for i in range(3):"},{"line_number":331,"context_line":"        try:"},{"line_number":332,"context_line":"            api_response \u003d k8s_api_instance.patch_namespaced_config_map("},{"line_number":333,"context_line":"                name\u003dstate_configmap_name,"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"d405cf02_679ce49c","line":330,"range":{"start_line":330,"start_character":4,"end_line":330,"end_character":22},"updated":"2021-04-30 18:53:24.000000000","message":"id prefer to see this retry until success on 409","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"6065cd6dc27481f1ca055c0c2dd934261888899f","unresolved":true,"context_lines":[{"line_number":327,"context_line":"        \u0027metadata\u0027][\u0027resource_version\u0027]"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    # Do a couple of retry in case of 409 only"},{"line_number":330,"context_line":"    for i in range(3):"},{"line_number":331,"context_line":"        try:"},{"line_number":332,"context_line":"            api_response \u003d k8s_api_instance.patch_namespaced_config_map("},{"line_number":333,"context_line":"                name\u003dstate_configmap_name,"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"4ccca9dd_c6f5d75b","line":330,"range":{"start_line":330,"start_character":4,"end_line":330,"end_character":22},"in_reply_to":"121f9172_559849cf","updated":"2021-05-01 06:31:12.000000000","message":"Each node updates the configmap about every 10s anyway, so infinite retry would actually turn this into another unintentional blocker, seeing that it is already putting it to sleep for 1s before every retry.  I can bump this from 3 to 8, and add some jitter as discussed so in the case of multi-node write collision, it will help to stagger them a little better.","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"947f139f2cb429d8dee9ad470a806f84121a03cc","unresolved":true,"context_lines":[{"line_number":327,"context_line":"        \u0027metadata\u0027][\u0027resource_version\u0027]"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    # Do a couple of retry in case of 409 only"},{"line_number":330,"context_line":"    for i in range(3):"},{"line_number":331,"context_line":"        try:"},{"line_number":332,"context_line":"            api_response \u003d k8s_api_instance.patch_namespaced_config_map("},{"line_number":333,"context_line":"                name\u003dstate_configmap_name,"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"121f9172_559849cf","line":330,"range":{"start_line":330,"start_character":4,"end_line":330,"end_character":22},"in_reply_to":"d405cf02_679ce49c","updated":"2021-04-30 19:15:12.000000000","message":"++","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":28025,"name":"Randeep Jalli","email":"rj2083@att.com","username":"randeep.jalli"},"change_message_id":"bbfdfa37701ea47df1ceb26851e25ae4a05507de","unresolved":true,"context_lines":[{"line_number":335,"context_line":"                body\u003dconfigmap_patch)"},{"line_number":336,"context_line":"            return True"},{"line_number":337,"context_line":"        except kubernetes.client.rest.ApiException as error:"},{"line_number":338,"context_line":"            if error.status \u003d\u003d 409:"},{"line_number":339,"context_line":"                # This status code indicates a collision trying to write to the"},{"line_number":340,"context_line":"                # config map while another instance is also trying the same."},{"line_number":341,"context_line":"                logger.warning(\"Collision writing configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"9c8e30e3_b5826883","line":338,"updated":"2021-04-30 15:37:01.000000000","message":"you might want to also add 503 and 500 to this, and maybe a separate one for sslexception.","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"6065cd6dc27481f1ca055c0c2dd934261888899f","unresolved":true,"context_lines":[{"line_number":335,"context_line":"                body\u003dconfigmap_patch)"},{"line_number":336,"context_line":"            return True"},{"line_number":337,"context_line":"        except kubernetes.client.rest.ApiException as error:"},{"line_number":338,"context_line":"            if error.status \u003d\u003d 409:"},{"line_number":339,"context_line":"                # This status code indicates a collision trying to write to the"},{"line_number":340,"context_line":"                # config map while another instance is also trying the same."},{"line_number":341,"context_line":"                logger.warning(\"Collision writing configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"e3688d65_89bd20db","line":338,"in_reply_to":"9c8e30e3_b5826883","updated":"2021-05-01 06:31:12.000000000","message":"In the case of 503 and 500, letting it simply return error seems appropriate, the retry should remain narrow target on writing collision (409).","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"8cfc185060be92ef3ce1818c75e70dde507244fd","unresolved":true,"context_lines":[{"line_number":728,"context_line":"            \"{1}\".format(counter, count))"},{"line_number":729,"context_line":"    max_seqno_nodes \u003d get_nodes_with_highest_seqno()"},{"line_number":730,"context_line":"    leader_node \u003d resolve_leader_node(max_seqno_nodes)"},{"line_number":731,"context_line":"    if (local_hostname \u003d\u003d leader_node and not check_for_active_nodes()"},{"line_number":732,"context_line":"            and get_cluster_state() \u003d\u003d \u0027live\u0027):"},{"line_number":733,"context_line":"        logger.info(\"I lead the cluster. Setting cluster state to reboot.\")"},{"line_number":734,"context_line":"        set_configmap_annotation("},{"line_number":735,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027reboot\u0027)"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"6d7ad0cd_c37e6514","line":732,"range":{"start_line":731,"start_character":0,"end_line":732,"end_character":45},"updated":"2021-04-30 18:57:10.000000000","message":"nit: this hair trigger worries me, fixing will be a longer task, but I\u0027d call it out in the commit message.","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"6065cd6dc27481f1ca055c0c2dd934261888899f","unresolved":true,"context_lines":[{"line_number":728,"context_line":"            \"{1}\".format(counter, count))"},{"line_number":729,"context_line":"    max_seqno_nodes \u003d get_nodes_with_highest_seqno()"},{"line_number":730,"context_line":"    leader_node \u003d resolve_leader_node(max_seqno_nodes)"},{"line_number":731,"context_line":"    if (local_hostname \u003d\u003d leader_node and not check_for_active_nodes()"},{"line_number":732,"context_line":"            and get_cluster_state() \u003d\u003d \u0027live\u0027):"},{"line_number":733,"context_line":"        logger.info(\"I lead the cluster. Setting cluster state to reboot.\")"},{"line_number":734,"context_line":"        set_configmap_annotation("},{"line_number":735,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027reboot\u0027)"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"ceff383c_13a1c7c7","line":732,"range":{"start_line":731,"start_character":0,"end_line":732,"end_character":45},"in_reply_to":"6d7ad0cd_c37e6514","updated":"2021-05-01 06:31:12.000000000","message":"will update commit message","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"8cfc185060be92ef3ce1818c75e70dde507244fd","unresolved":true,"context_lines":[{"line_number":849,"context_line":"    # Node ready to start MariaDB, update cluster state to live and remove"},{"line_number":850,"context_line":"    # reboot node info, if set previously."},{"line_number":851,"context_line":"    if cluster \u003d\u003d \u0027new\u0027:"},{"line_number":852,"context_line":"        set_configmap_annotation("},{"line_number":853,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027live\u0027)"},{"line_number":854,"context_line":"        set_configmap_annotation("},{"line_number":855,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/reboot.node\u0027, value\u003d\u0027\u0027)"},{"line_number":856,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"4e4ddb13_a6974088","line":853,"range":{"start_line":852,"start_character":0,"end_line":853,"end_character":74},"updated":"2021-04-30 18:57:10.000000000","message":"at this point, its not live?","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"6065cd6dc27481f1ca055c0c2dd934261888899f","unresolved":true,"context_lines":[{"line_number":849,"context_line":"    # Node ready to start MariaDB, update cluster state to live and remove"},{"line_number":850,"context_line":"    # reboot node info, if set previously."},{"line_number":851,"context_line":"    if cluster \u003d\u003d \u0027new\u0027:"},{"line_number":852,"context_line":"        set_configmap_annotation("},{"line_number":853,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027live\u0027)"},{"line_number":854,"context_line":"        set_configmap_annotation("},{"line_number":855,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/reboot.node\u0027, value\u003d\u0027\u0027)"},{"line_number":856,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"ed1f8a45_0a4e9e2e","line":853,"range":{"start_line":852,"start_character":0,"end_line":853,"end_character":74},"in_reply_to":"4e4ddb13_a6974088","updated":"2021-05-01 06:31:12.000000000","message":"technically not yet, but it\u0027s the very last step before it is ready to go live (start mariadb).  It\u0027s the probably the best place for the leader to set it to live, else we have to default back to letting the member nodes to set it, which we already know is not as ideal.","commit_id":"500207db49fb0dcb7f6b4b67f034c292ac5643e3"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"3cc0535e1ff211a1875190c038eba2119b659dfe","unresolved":true,"context_lines":[{"line_number":344,"context_line":"                # This status code indicates a collision trying to write to the"},{"line_number":345,"context_line":"                # config map while another instance is also trying the same."},{"line_number":346,"context_line":"                logger.warning(\"Collision writing configmap: {0}\".format(error))"},{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"e7c5dbe1_bf6c3e4a","line":347,"range":{"start_line":347,"start_character":0,"end_line":347,"end_character":3},"updated":"2021-05-03 14:17:33.000000000","message":"Empty line above this comment may make logging line above more readable.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"720e7c3e24673f7e59970fc80496b5961d118faa","unresolved":true,"context_lines":[{"line_number":344,"context_line":"                # This status code indicates a collision trying to write to the"},{"line_number":345,"context_line":"                # config map while another instance is also trying the same."},{"line_number":346,"context_line":"                logger.warning(\"Collision writing configmap: {0}\".format(error))"},{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"060533e9_a042f930","line":347,"range":{"start_line":347,"start_character":0,"end_line":347,"end_character":3},"in_reply_to":"4f4648e6_0c683f44","updated":"2021-05-03 15:40:37.000000000","message":"Its fine. I missed if was pre-existing.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"7932ac99f7e1226f696c70fe9b56bee18616bcd3","unresolved":true,"context_lines":[{"line_number":344,"context_line":"                # This status code indicates a collision trying to write to the"},{"line_number":345,"context_line":"                # config map while another instance is also trying the same."},{"line_number":346,"context_line":"                logger.warning(\"Collision writing configmap: {0}\".format(error))"},{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"4f4648e6_0c683f44","line":347,"range":{"start_line":347,"start_character":0,"end_line":347,"end_character":3},"in_reply_to":"e7c5dbe1_bf6c3e4a","updated":"2021-05-03 15:35:15.000000000","message":"The comment block was pre-existing, but sure if update is needed I can consider adding an empty line.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},"change_message_id":"07543ac0edff7c65716c1bad27f0c307fefb9c41","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"45b39ba2_d2d3491e","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"updated":"2021-05-03 14:25:29.000000000","message":"There is a lot of info on random vs urandom on internet. Hope this statement ie better compared to random. I see random is a blocking call now.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"d20f84f0915ce820420388e4e2b2e6ff770cf74e","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"5d66624c_8ffe522c","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"327287b1_69ebc16e","updated":"2021-05-03 18:58:34.000000000","message":"Depending on the scenario, might be better to just stick with the random I guess, seconds might be too similar if 2 replicas are trying at once.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"7932ac99f7e1226f696c70fe9b56bee18616bcd3","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"66e9d6e8_92090062","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"45b39ba2_d2d3491e","updated":"2021-05-03 15:35:15.000000000","message":"I don\u0027t disagree and I am not here to say 1 is \"better\" than the other.  I can say that I am already annoyed by the fact bandit flag my original simple random call (https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b311-random) and I am just afraid that going to the \"least safe\" non-blocking\" urandom call would trigger other security alerts.  So if we are being blocked, just consider that part of the jitter  😊","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"70a93dec976792d6c5a68a8a9a5583f9da1b6719","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"e2e8e0ab_96ea72e3","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"4a09a3fd_ee7f671c","updated":"2021-05-03 16:59:13.000000000","message":"maybe 3 then, I just dislike random generators.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"5e41a2f23ddb529758fc624b01677150f8455377","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"fc2d79a7_86beb600","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"5d66624c_8ffe522c","updated":"2021-05-03 19:22:49.000000000","message":"I believe the desire here is to introduce some minor jitter in sleep time (instead of 1 second, something in the range of 0.8 to 1.2 second, although this range is not hard and fast obviously and is up for debate) and at the same time, also increase the number of retries from 3 to 8 (basically somewhere less than 10 seconds (8*1.2\u003d9.6 second)) so I would like to keep the random function in there along with the extra retries for this purpose.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"3320b7e43655ec02996ce7f5bad5f785f7bbfaa5","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"f04bfb6d_86352c58","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"66e9d6e8_92090062","updated":"2021-05-03 15:39:27.000000000","message":"What is the reason for using a random sleep anyway? Why not just set it to 2 seconds?","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"5bdc26b1ed292fd063e4fa02cce6dbb579f46e49","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"4a09a3fd_ee7f671c","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"799e4e8f_a3471a01","updated":"2021-05-03 16:53:07.000000000","message":"time.sleep(time.time_ns() % 10) will make you sleep between 0 - 9 seconds instead of 0.8 to 1.2 seconds though","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"6a8a11694dacd9e7b2a0f403bccbc0f0cc69eebe","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"799e4e8f_a3471a01","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"b3cd1780_89f9dfea","updated":"2021-05-03 16:41:08.000000000","message":"Could also do something like:\n\ntime.sleep(time.time_ns() % 10)\n\nand avoid all the random-ness generation.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"d8e6db99abb3373844a1990e3e713b8956f7c5ec","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"327287b1_69ebc16e","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"e2e8e0ab_96ea72e3","updated":"2021-05-03 18:52:41.000000000","message":"Can do time.time() % 2 or 3 as well for decimal waits.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"cd4711a83dcaf5b590889af1bad06bcf42cac2c1","unresolved":true,"context_lines":[{"line_number":347,"context_line":"                # This often happens when the replicas were started at the same"},{"line_number":348,"context_line":"                # time, and tends to be persistent. Sleep with some random"},{"line_number":349,"context_line":"                # jitter value briefly to break the synchronization."},{"line_number":350,"context_line":"                naptime \u003d secretsGen.uniform(0.8,1.2)"},{"line_number":351,"context_line":"                time.sleep(naptime)"},{"line_number":352,"context_line":"            else:"},{"line_number":353,"context_line":"                logger.error(\"Failed to set configmap: {0}\".format(error))"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"b3cd1780_89f9dfea","line":350,"range":{"start_line":350,"start_character":16,"end_line":350,"end_character":53},"in_reply_to":"f04bfb6d_86352c58","updated":"2021-05-03 16:32:35.000000000","message":"it was originally set at 1 second, the idea here is to use random as a way to inject some minor jitter into the sleep pattern to ensure the pods that are colliding will be sleeping for a slightly different amount of time, so they won\u0027t all be continuous sleeping and waking up at the same time to better avoid further collision.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"8e9055ff87435ec6b33626b338d5542b121b1448","unresolved":true,"context_lines":[{"line_number":856,"context_line":"    # Node ready to start MariaDB, update cluster state to live and remove"},{"line_number":857,"context_line":"    # reboot node info, if set previously."},{"line_number":858,"context_line":"    if cluster \u003d\u003d \u0027new\u0027:"},{"line_number":859,"context_line":"        set_configmap_annotation("},{"line_number":860,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027live\u0027)"},{"line_number":861,"context_line":"        set_configmap_annotation("},{"line_number":862,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/reboot.node\u0027, value\u003d\u0027\u0027)"},{"line_number":863,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ead5ec9e_d15bc75b","line":860,"range":{"start_line":859,"start_character":0,"end_line":860,"end_character":74},"updated":"2021-05-05 13:47:14.000000000","message":"what happens if the launch of mariadb fails?","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"30e0d12ccafa3460f816e14e8ebbbf277ad6eaf7","unresolved":true,"context_lines":[{"line_number":856,"context_line":"    # Node ready to start MariaDB, update cluster state to live and remove"},{"line_number":857,"context_line":"    # reboot node info, if set previously."},{"line_number":858,"context_line":"    if cluster \u003d\u003d \u0027new\u0027:"},{"line_number":859,"context_line":"        set_configmap_annotation("},{"line_number":860,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027live\u0027)"},{"line_number":861,"context_line":"        set_configmap_annotation("},{"line_number":862,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/reboot.node\u0027, value\u003d\u0027\u0027)"},{"line_number":863,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"f76a9373_379f4344","line":860,"range":{"start_line":859,"start_character":0,"end_line":860,"end_character":74},"in_reply_to":"71e42746_d78a36bf","updated":"2021-05-05 19:59:08.000000000","message":"im still uncomfortable with moving this from l944","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"010815c70c1bc5beae7866982705efe48a1936ed","unresolved":true,"context_lines":[{"line_number":856,"context_line":"    # Node ready to start MariaDB, update cluster state to live and remove"},{"line_number":857,"context_line":"    # reboot node info, if set previously."},{"line_number":858,"context_line":"    if cluster \u003d\u003d \u0027new\u0027:"},{"line_number":859,"context_line":"        set_configmap_annotation("},{"line_number":860,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027live\u0027)"},{"line_number":861,"context_line":"        set_configmap_annotation("},{"line_number":862,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/reboot.node\u0027, value\u003d\u0027\u0027)"},{"line_number":863,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"71e42746_d78a36bf","line":860,"range":{"start_line":859,"start_character":0,"end_line":860,"end_character":74},"in_reply_to":"ead5ec9e_d15bc75b","updated":"2021-05-05 14:49:36.000000000","message":"The pod would exit and restarts, and it will hit the code block in L914-942 like before, and it would be the same scenario as if the leader node went down, so the code should be able to handle that hopefully.","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"66a7eec63c0599fb316c88e737304e21af7831be","unresolved":true,"context_lines":[{"line_number":856,"context_line":"    # Node ready to start MariaDB, update cluster state to live and remove"},{"line_number":857,"context_line":"    # reboot node info, if set previously."},{"line_number":858,"context_line":"    if cluster \u003d\u003d \u0027new\u0027:"},{"line_number":859,"context_line":"        set_configmap_annotation("},{"line_number":860,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/cluster.state\u0027, value\u003d\u0027live\u0027)"},{"line_number":861,"context_line":"        set_configmap_annotation("},{"line_number":862,"context_line":"            key\u003d\u0027openstackhelm.openstack.org/reboot.node\u0027, value\u003d\u0027\u0027)"},{"line_number":863,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"33bf51f6_78a1634a","line":860,"range":{"start_line":859,"start_character":0,"end_line":860,"end_character":74},"in_reply_to":"f76a9373_379f4344","updated":"2021-05-05 21:31:00.000000000","message":"Fair enough, I don\u0027t have a problem putting L944 back as an extra safeguard","commit_id":"391ad93969f7d0fb45d2ac58fde06790376af9c2"}]}
