)]}'
{"nova/conf/libvirt.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"6c295f7c5e04c5894776f9bcf9e357dd88964783","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"               default\u003d3,"},{"line_number":1006,"context_line":"               min\u003d0,"},{"line_number":1007,"context_line":"               help\u003d\"\"\""},{"line_number":1008,"context_line":"Specify number of attempts nova should try when creating initial connection"},{"line_number":1009,"context_line":"to libvirtd."},{"line_number":1010,"context_line":"\"\"\")"},{"line_number":1011,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_3c185384","line":1008,"range":{"start_line":1008,"start_character":57,"end_line":1008,"end_character":75},"updated":"2017-01-11 10:54:10.000000000","message":"It is used also for recreating connection, not only for creating initial connection.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"d92041141d6291476f6601b2565a1d8bc295dc75","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"               default\u003d3,"},{"line_number":1006,"context_line":"               min\u003d0,"},{"line_number":1007,"context_line":"               help\u003d\"\"\""},{"line_number":1008,"context_line":"Specify number of attempts nova should try when creating initial connection"},{"line_number":1009,"context_line":"to libvirtd."},{"line_number":1010,"context_line":"\"\"\")"},{"line_number":1011,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_7d157247","line":1008,"range":{"start_line":1008,"start_character":57,"end_line":1008,"end_character":75},"in_reply_to":"ba5201f7_3c185384","updated":"2017-01-11 12:31:44.000000000","message":"Please add here that the delay between each retry is 1 second.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"b5ed0f9892be674f0175064475a6c1e7c167938a","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"               default\u003d3,"},{"line_number":1006,"context_line":"               min\u003d0,"},{"line_number":1007,"context_line":"               help\u003d\"\"\""},{"line_number":1008,"context_line":"Specify number of attempts nova should try when creating initial connection"},{"line_number":1009,"context_line":"to libvirtd."},{"line_number":1010,"context_line":"\"\"\")"},{"line_number":1011,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_d3be4dfe","line":1008,"range":{"start_line":1008,"start_character":57,"end_line":1008,"end_character":75},"in_reply_to":"ba5201f7_3c185384","updated":"2017-01-11 12:49:12.000000000","message":"Right, should be rephrased.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"b5ed0f9892be674f0175064475a6c1e7c167938a","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"               default\u003d3,"},{"line_number":1006,"context_line":"               min\u003d0,"},{"line_number":1007,"context_line":"               help\u003d\"\"\""},{"line_number":1008,"context_line":"Specify number of attempts nova should try when creating initial connection"},{"line_number":1009,"context_line":"to libvirtd."},{"line_number":1010,"context_line":"\"\"\")"},{"line_number":1011,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_f3b99116","line":1008,"range":{"start_line":1008,"start_character":57,"end_line":1008,"end_character":75},"in_reply_to":"ba5201f7_7d157247","updated":"2017-01-11 12:49:12.000000000","message":"Good point.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"40bb61ec19d39bc88a17ba0271d8d3ef407bec83","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"               default\u003d3,"},{"line_number":1006,"context_line":"               min\u003d0,"},{"line_number":1007,"context_line":"               help\u003d\"\"\""},{"line_number":1008,"context_line":"Specify number of attempts nova should try when creating the connection"},{"line_number":1009,"context_line":"to libvirtd. Each connection attempt is retried after 1 second."},{"line_number":1010,"context_line":"\"\"\")"},{"line_number":1011,"context_line":"]"},{"line_number":1012,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_53ca9650","line":1009,"range":{"start_line":1008,"start_character":0,"end_line":1009,"end_character":63},"updated":"2017-02-02 21:32:59.000000000","message":"Help text could be more descriptive here. Can you tell me - is it the number of attempts of number of retries after the first failure? Name of the option suggests something different than the help text.\n\nAnd if this is the number of attempts then setting it to 0 (which is allowed cos of the min) would result in no connection at all.\n\nThe text could be (retry version):\n\nThe number of times to retry when Nova fails to create the connection to libvirtd.\n\nEach connection attempt is retried after 1 second.\nIf set to 0, only try once, no retries.","commit_id":"cf9c10904ed41b3392298c17d237350b16f5f07f"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"7fa42eb8c153da06602ebf1b810d7e0df9a77daa","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"               default\u003d3,"},{"line_number":1006,"context_line":"               min\u003d0,"},{"line_number":1007,"context_line":"               help\u003d\"\"\""},{"line_number":1008,"context_line":"Specify number of attempts nova should try when creating the connection"},{"line_number":1009,"context_line":"to libvirtd. Each connection attempt is retried after 1 second."},{"line_number":1010,"context_line":"\"\"\")"},{"line_number":1011,"context_line":"]"},{"line_number":1012,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_3e7071dc","line":1009,"range":{"start_line":1008,"start_character":0,"end_line":1009,"end_character":63},"in_reply_to":"3a461143_53ca9650","updated":"2017-02-02 21:59:16.000000000","message":"Good point, thanks","commit_id":"cf9c10904ed41b3392298c17d237350b16f5f07f"},{"author":{"_account_id":18337,"name":"Sujitha","email":"sujitha.neti@intel.com","username":"Sujitha"},"change_message_id":"de128a807082f7266680161d3bc5487e80736bb8","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"* All other vzstorage_* options"},{"line_number":1002,"context_line":"\"\"\""},{"line_number":1003,"context_line":"              ),"},{"line_number":1004,"context_line":"    cfg.IntOpt(\u0027connection_retries\u0027,"},{"line_number":1005,"context_line":"               default\u003d3,"},{"line_number":1006,"context_line":"               min\u003d1,"},{"line_number":1007,"context_line":"               help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a430d35_bd10fe4f","line":1004,"updated":"2017-02-03 23:30:44.000000000","message":"I see some ambiguity here. Description says number of attempts and name of the option says retries. Should we change the name to connection_attempts.","commit_id":"0a5e27ab0380db6c6e540bd590d54c19d2e8cf03"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"32ac5be48d2cb7f9aa9cc953a537c1f60413467f","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"* All other vzstorage_* options"},{"line_number":1002,"context_line":"\"\"\""},{"line_number":1003,"context_line":"              ),"},{"line_number":1004,"context_line":"    cfg.IntOpt(\u0027connection_retries\u0027,"},{"line_number":1005,"context_line":"               default\u003d3,"},{"line_number":1006,"context_line":"               min\u003d1,"},{"line_number":1007,"context_line":"               help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_7ac6854a","line":1004,"in_reply_to":"1a430d35_bd10fe4f","updated":"2017-02-21 10:01:39.000000000","message":"You\u0027re probably right, it would make more sense...","commit_id":"0a5e27ab0380db6c6e540bd590d54c19d2e8cf03"}],"nova/virt/libvirt/host.py":[{"author":{"_account_id":9178,"name":"Sayali Lunkad","email":"sayali.lunkad@suse.com","username":"sayalilunkad"},"change_message_id":"e7b2bfca8c02ea40fca8b0bb87d2263eb30d8b75","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        \"\"\""},{"line_number":451,"context_line":"        try:"},{"line_number":452,"context_line":"            conn \u003d self._get_connection()"},{"line_number":453,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":454,"context_line":"            LOG.exception(_LE(\"Connection to libvirt failed: %s\"), ex)"},{"line_number":455,"context_line":"            payload \u003d dict(ip\u003dCONF.my_ip,"},{"line_number":456,"context_line":"                           method\u003d\u0027_connect\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_266acbb3","side":"PARENT","line":453,"updated":"2017-01-05 15:59:23.000000000","message":"It does not make sense to remove this as it can still occur.","commit_id":"7463e1eec8f1d4b486703fbfd8d1eb755e0c5b0c"},{"author":{"_account_id":9178,"name":"Sayali Lunkad","email":"sayali.lunkad@suse.com","username":"sayalilunkad"},"change_message_id":"e7b2bfca8c02ea40fca8b0bb87d2263eb30d8b75","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from oslo_utils import importutils"},{"line_number":43,"context_line":"from oslo_utils import units"},{"line_number":44,"context_line":"from oslo_utils import versionutils"},{"line_number":45,"context_line":"from tenacity import *"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"import six"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_263c8bc7","line":45,"updated":"2017-01-05 15:59:23.000000000","message":"will need to add this to requirements.txt and pe8 probably does not  prefer * imports.","commit_id":"470717836e8abaf01b61c776834e1c622e50175b"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"c8e87ef2d667fc24d6398f1c96a2255174e4db3f","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        utils.spawn(self._dispatch_thread)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":367,"context_line":"           stop\u003dtenacity.stop_after_attempt(3)"},{"line_number":368,"context_line":"    )"},{"line_number":369,"context_line":"    def _get_new_connection(self):"},{"line_number":370,"context_line":"        # call with _wrapped_conn_lock held"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_426c10d0","line":367,"range":{"start_line":367,"start_character":44,"end_line":367,"end_character":45},"updated":"2017-01-05 20:28:22.000000000","message":"IMO this should be configurable. Perhaps you should add new config option for it to libvirt_group in https://github.com/openstack/nova/blob/master/nova/conf/libvirt.py","commit_id":"0b2ce1774725c94f87a0a62b1167930ca0282755"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"b37c05816fd80ab3dd1f41dba01f72b915776f9f","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        LOG.debug(\"Starting green dispatch thread\")"},{"line_number":364,"context_line":"        utils.spawn(self._dispatch_thread)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":367,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_retries)"},{"line_number":368,"context_line":"    )"},{"line_number":369,"context_line":"    def _get_new_connection(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_3dd68a27","line":366,"range":{"start_line":366,"start_character":45,"end_line":366,"end_character":46},"updated":"2017-01-11 12:21:46.000000000","message":"If number of retires is configurable, than waiting time should be as well IMO.\n\nPersonally I do not mind defaulting 3 times 1 second, but it does not mean that it is the best default - I guess we need a wiser mind here.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"6c295f7c5e04c5894776f9bcf9e357dd88964783","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        LOG.debug(\"Starting green dispatch thread\")"},{"line_number":364,"context_line":"        utils.spawn(self._dispatch_thread)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":367,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_retries)"},{"line_number":368,"context_line":"    )"},{"line_number":369,"context_line":"    def _get_new_connection(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_7fa56d02","line":366,"updated":"2017-01-11 10:54:10.000000000","message":"So this, by default, retries 3 times and the delay is 1 second. Would it make sense to increase delay to 2 seconds? It\u0027s just a question, wonder whether this would help.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"d92041141d6291476f6601b2565a1d8bc295dc75","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        LOG.debug(\"Starting green dispatch thread\")"},{"line_number":364,"context_line":"        utils.spawn(self._dispatch_thread)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":367,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_retries)"},{"line_number":368,"context_line":"    )"},{"line_number":369,"context_line":"    def _get_new_connection(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_7d3e52db","line":366,"range":{"start_line":366,"start_character":45,"end_line":366,"end_character":46},"in_reply_to":"ba5201f7_3dd68a27","updated":"2017-01-11 12:31:44.000000000","message":"There I agree with Jiri. One value is enough. If you want to have retries for 60 seconds, you can just set connection_retry to 60 and don\u0027t care about the delay","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"44bb3c51c802c984b77b754f00bfe2029af37446","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        LOG.debug(\"Starting green dispatch thread\")"},{"line_number":364,"context_line":"        utils.spawn(self._dispatch_thread)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":367,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_retries)"},{"line_number":368,"context_line":"    )"},{"line_number":369,"context_line":"    def _get_new_connection(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_df1bb91a","line":366,"in_reply_to":"ba5201f7_7fa56d02","updated":"2017-01-11 10:58:07.000000000","message":"I did not really gave deep thought about the exact numbers. I think it\u0027s enough that one value is configurable, so user can increase number of retries and not care about the delay.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"ccaa9981f962c3851988be0ef7b4dfb6b235d846","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        :returns: a config.LibvirtConfigCaps object"},{"line_number":650,"context_line":"        \"\"\""},{"line_number":651,"context_line":"        if not self._caps:"},{"line_number":652,"context_line":"            conn \u003d self.get_connection()"},{"line_number":653,"context_line":"            xmlstr \u003d self.get_capabilities_with_retry(conn)"},{"line_number":654,"context_line":"            LOG.info(_LI(\"Libvirt host capabilities %s\"), xmlstr)"},{"line_number":655,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_3f5e85e9","line":652,"updated":"2017-01-11 10:57:49.000000000","message":"Here you splat get_connection() and getCapabilities(), but no others, why is that?","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"b5ed0f9892be674f0175064475a6c1e7c167938a","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        :returns: a config.LibvirtConfigCaps object"},{"line_number":650,"context_line":"        \"\"\""},{"line_number":651,"context_line":"        if not self._caps:"},{"line_number":652,"context_line":"            conn \u003d self.get_connection()"},{"line_number":653,"context_line":"            xmlstr \u003d self.get_capabilities_with_retry(conn)"},{"line_number":654,"context_line":"            LOG.info(_LI(\"Libvirt host capabilities %s\"), xmlstr)"},{"line_number":655,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_737f6166","line":652,"in_reply_to":"ba5201f7_3f5e85e9","updated":"2017-01-11 12:49:12.000000000","message":"Honestly, based on the case I\u0027m able to reproduce.\nThe error I\u0027m seeing is seen only on the very start getCapabilities is the first operation (or one of the first?) with the connection. Once I\u0027m able to acquire it, it seems the rest works well.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"0ea53d714ba7c97ff57cf29bf0be4a6c9849e2de","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        :returns: a config.LibvirtConfigCaps object"},{"line_number":650,"context_line":"        \"\"\""},{"line_number":651,"context_line":"        if not self._caps:"},{"line_number":652,"context_line":"            conn \u003d self.get_connection()"},{"line_number":653,"context_line":"            xmlstr \u003d self.get_capabilities_with_retry(conn)"},{"line_number":654,"context_line":"            LOG.info(_LI(\"Libvirt host capabilities %s\"), xmlstr)"},{"line_number":655,"context_line":"            self._caps \u003d vconfig.LibvirtConfigCaps()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a3c09a3_a754fffe","line":652,"in_reply_to":"ba5201f7_737f6166","updated":"2017-01-17 09:50:56.000000000","message":"But do you have an idea where should another retries go? All of the methods based on connection (like the one you point bellow), or just some that are called for the initial connection?","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"ccaa9981f962c3851988be0ef7b4dfb6b235d846","unresolved":false,"context_lines":[{"line_number":662,"context_line":"                    xml_str \u003d self._caps.host.cpu.to_xml()"},{"line_number":663,"context_line":"                    if six.PY3:"},{"line_number":664,"context_line":"                        xml_str \u003d xml_str.decode(\u0027utf-8\u0027)"},{"line_number":665,"context_line":"                    features \u003d self.get_connection().baselineCPU("},{"line_number":666,"context_line":"                        [xml_str],"},{"line_number":667,"context_line":"                        libvirt.VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES)"},{"line_number":668,"context_line":"                    if features:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_7f580dfb","line":665,"updated":"2017-01-11 10:57:49.000000000","message":"E.g., you didn\u0027t split this. There are a lot more get_connection() usages in this file.","commit_id":"ee7913a88e55861cbdc6d431d750b395c68c0a10"},{"author":{"_account_id":18337,"name":"Sujitha","email":"sujitha.neti@intel.com","username":"Sujitha"},"change_message_id":"de128a807082f7266680161d3bc5487e80736bb8","unresolved":false,"context_lines":[{"line_number":634,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_retries),"},{"line_number":635,"context_line":"        reraise\u003dTrue"},{"line_number":636,"context_line":"    )"},{"line_number":637,"context_line":"    def retry_connection_method(self, f, args):"},{"line_number":638,"context_line":"        if len(args) \u003d\u003d 0:"},{"line_number":639,"context_line":"            return f()"},{"line_number":640,"context_line":"        return f(*args)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a430d35_dd1a2a17","line":637,"updated":"2017-02-03 23:30:44.000000000","message":"I\u0027m trying to understand this. \n_get_new_connection() already tries for CONF.libvirt.connection_retries times when the connection to libvirt fails. Why do we need this again.","commit_id":"0a5e27ab0380db6c6e540bd590d54c19d2e8cf03"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"32ac5be48d2cb7f9aa9cc953a537c1f60413467f","unresolved":false,"context_lines":[{"line_number":634,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_retries),"},{"line_number":635,"context_line":"        reraise\u003dTrue"},{"line_number":636,"context_line":"    )"},{"line_number":637,"context_line":"    def retry_connection_method(self, f, args):"},{"line_number":638,"context_line":"        if len(args) \u003d\u003d 0:"},{"line_number":639,"context_line":"            return f()"},{"line_number":640,"context_line":"        return f(*args)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da36d5c6_7af4c586","line":637,"in_reply_to":"1a430d35_dd1a2a17","updated":"2017-02-21 10:01:39.000000000","message":"The problem seems to be that even after I get the initial connection from _get_new_connection , sometimes (but this is much harder to reproduce than the original case) I get the same failure with the next method I call with existing connection.","commit_id":"0a5e27ab0380db6c6e540bd590d54c19d2e8cf03"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"041b626cb85aa214056b2d7e59a6a89fccccc8eb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"7f287b81_d153ade1","updated":"2017-09-05 14:48:16.000000000","message":"This seems a little excessive. Surely we only need to make the first call to libvirt retry, rather than every call? Also, I\u0027m not sure about introducing the tenacity requirement. Could we not achieve this with an oslo lib?","commit_id":"220579eec32e429ba89d23f020fa069ae4ccbff7"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"78bffcf4641c31be089d9f2255d7218bd76641bd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"7f515b1d_8b34ea4b","in_reply_to":"7f287b81_d153ade1","updated":"2017-10-05 15:29:07.000000000","message":"1. First vs later calls: this was already discussed before. Brought in patch set 8, later also discussed in https://review.openstack.org/#/c/416928/10/nova/virt/libvirt/host.py@637\n\n2. tenacity is already required by other OpenStack projects (heat, to my knowledge). Not sure what exactly do you mean could be done with oslo lib, I do not really know it there...","commit_id":"220579eec32e429ba89d23f020fa069ae4ccbff7"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1cd0d6a7df88389dea3f6c8e27bdf22277474846","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from oslo_utils import importutils"},{"line_number":43,"context_line":"from oslo_utils import units"},{"line_number":44,"context_line":"from oslo_utils import versionutils"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"import six"},{"line_number":47,"context_line":"import tenacity"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f93b717_030a49d1","line":45,"updated":"2018-01-25 19:06:48.000000000","message":"This new blank line is not necessary because \"import\" sections are separated into 3 blocks and tenacity should be in the same section with eventlet, etc.","commit_id":"15739a53c3bed5c592cc2cc1c5f9b4576e4111cd"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"ebb60d6469f496df2e432eaa17cd9bbd8c39398e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from oslo_utils import importutils"},{"line_number":43,"context_line":"from oslo_utils import units"},{"line_number":44,"context_line":"from oslo_utils import versionutils"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"import six"},{"line_number":47,"context_line":"import tenacity"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3fa0c359_26ef4c85","line":45,"in_reply_to":"5f93b717_030a49d1","updated":"2018-02-06 16:01:39.000000000","message":"Good point","commit_id":"15739a53c3bed5c592cc2cc1c5f9b4576e4111cd"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1cd0d6a7df88389dea3f6c8e27bdf22277474846","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":366,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_attempts)"},{"line_number":367,"context_line":"    )"},{"line_number":368,"context_line":"    def _get_new_connection(self):"},{"line_number":369,"context_line":"        # call with _wrapped_conn_lock held"},{"line_number":370,"context_line":"        LOG.debug(\u0027Connecting to libvirt: %s\u0027, self._uri)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f93b717_83d739c0","line":367,"updated":"2018-01-25 19:06:48.000000000","message":"just a question: Why don\u0027t we specify reraise\u003dTrue here?\nWhen not specifying, reraise is False and any exceptions are converted into RetryError. So even if unexpected exception(meaning non-libvirtError), the exception becomes present as RetryError.\n\nAccording to tenancity library code, RetryError\u0027s message shows actual last exception. So we can see the original exception from the log. This could not be a matter.\nI just have this question since retry_connection_method() specifies True as reraise.","commit_id":"15739a53c3bed5c592cc2cc1c5f9b4576e4111cd"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"fea6ab61eada42d4344845e73bed0464cd394a59","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":366,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_attempts)"},{"line_number":367,"context_line":"    )"},{"line_number":368,"context_line":"    def _get_new_connection(self):"},{"line_number":369,"context_line":"        # call with _wrapped_conn_lock held"},{"line_number":370,"context_line":"        LOG.debug(\u0027Connecting to libvirt: %s\u0027, self._uri)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3fa0c359_f407b51b","line":367,"in_reply_to":"3fa0c359_39376ab3","updated":"2018-02-07 09:38:29.000000000","message":"Hm. When I add reraise to this point, I get this weird error running test_conn_event_up_down:\n\nhttp://paste.openstack.org/show/664674/\n\nI do not really know what\u0027s wrong. Possibly the test needs an update, but I guess I do not understand how the test is written so it gets new connection after one failed attempt.... (and that tenacity\u0027s reraise option changes the behavior?)","commit_id":"15739a53c3bed5c592cc2cc1c5f9b4576e4111cd"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"222d840a4ff1788ef3f058a2ba5c25fae3a4b3d1","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":366,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_attempts)"},{"line_number":367,"context_line":"    )"},{"line_number":368,"context_line":"    def _get_new_connection(self):"},{"line_number":369,"context_line":"        # call with _wrapped_conn_lock held"},{"line_number":370,"context_line":"        LOG.debug(\u0027Connecting to libvirt: %s\u0027, self._uri)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3fa0c359_39376ab3","line":367,"in_reply_to":"3fa0c359_e1e38e04","updated":"2018-02-06 18:21:14.000000000","message":"I feel reraise\u003dTrue is better","commit_id":"15739a53c3bed5c592cc2cc1c5f9b4576e4111cd"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"ebb60d6469f496df2e432eaa17cd9bbd8c39398e","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    @tenacity.retry(wait\u003dtenacity.wait_fixed(1),"},{"line_number":366,"context_line":"        stop\u003dtenacity.stop_after_attempt(CONF.libvirt.connection_attempts)"},{"line_number":367,"context_line":"    )"},{"line_number":368,"context_line":"    def _get_new_connection(self):"},{"line_number":369,"context_line":"        # call with _wrapped_conn_lock held"},{"line_number":370,"context_line":"        LOG.debug(\u0027Connecting to libvirt: %s\u0027, self._uri)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3fa0c359_e1e38e04","line":367,"in_reply_to":"5f93b717_83d739c0","updated":"2018-02-06 16:01:39.000000000","message":"Makes sense. Although, as you also mention, is not exactly needed.\n\nI\u0027m not sure right now, what should be better?","commit_id":"15739a53c3bed5c592cc2cc1c5f9b4576e4111cd"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1cd0d6a7df88389dea3f6c8e27bdf22277474846","unresolved":false,"context_lines":[{"line_number":896,"context_line":"        :returns: a list of virNodeDevice instance"},{"line_number":897,"context_line":"        \"\"\""},{"line_number":898,"context_line":"        try:"},{"line_number":899,"context_line":"            return self.get_connection().listDevices(cap, flags)"},{"line_number":900,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":901,"context_line":"            error_code \u003d ex.get_error_code()"},{"line_number":902,"context_line":"            if error_code \u003d\u003d libvirt.VIR_ERR_NO_SUPPORT:"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f93b717_63f9cd7e","line":899,"range":{"start_line":899,"start_character":12,"end_line":899,"end_character":64},"updated":"2018-01-25 19:06:48.000000000","message":"Isn\u0027t it necessary to put retry_connection_method() here?","commit_id":"15739a53c3bed5c592cc2cc1c5f9b4576e4111cd"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"ebb60d6469f496df2e432eaa17cd9bbd8c39398e","unresolved":false,"context_lines":[{"line_number":896,"context_line":"        :returns: a list of virNodeDevice instance"},{"line_number":897,"context_line":"        \"\"\""},{"line_number":898,"context_line":"        try:"},{"line_number":899,"context_line":"            return self.get_connection().listDevices(cap, flags)"},{"line_number":900,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":901,"context_line":"            error_code \u003d ex.get_error_code()"},{"line_number":902,"context_line":"            if error_code \u003d\u003d libvirt.VIR_ERR_NO_SUPPORT:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3fa0c359_66f55457","line":899,"range":{"start_line":899,"start_character":12,"end_line":899,"end_character":64},"in_reply_to":"5f93b717_63f9cd7e","updated":"2018-02-06 16:01:39.000000000","message":"I think you\u0027re right","commit_id":"15739a53c3bed5c592cc2cc1c5f9b4576e4111cd"}]}
