)]}'
{"ironic/conductor/base_manager.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"df8d979e5c949f5d06ace0c0ca4a88a20aa48f15","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            executor_factory\u003dperiodics.ExistingExecutor(self._executor))"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        # clear all locks held by this conductor before registering"},{"line_number":142,"context_line":"        self.dbapi.clear_node_reservations_for_conductor(self.host)"},{"line_number":143,"context_line":"        try:"},{"line_number":144,"context_line":"            # Register this conductor with the cluster"},{"line_number":145,"context_line":"            self.conductor \u003d objects.Conductor.register("}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_06b0e0dc","line":142,"updated":"2016-03-07 08:41:53.000000000","message":"this should be also as conductor object method\nand \nhttps://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L1305","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"751149c68023f07ffe16e26964d9135751f25702","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            executor_factory\u003dperiodics.ExistingExecutor(self._executor))"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        # clear all locks held by this conductor before registering"},{"line_number":142,"context_line":"        self.dbapi.clear_node_reservations_for_conductor(self.host)"},{"line_number":143,"context_line":"        try:"},{"line_number":144,"context_line":"            # Register this conductor with the cluster"},{"line_number":145,"context_line":"            self.conductor \u003d objects.Conductor.register("}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_a64be758","line":142,"in_reply_to":"5aef4532_06b0e0dc","updated":"2016-03-07 10:03:44.000000000","message":"Indeed, I found another dbapi access at L261.\n\nI may leave this patch for register()/unregister() because that\u0027s what I need at the moment for DLM and remove the rest of the methods using the dbapi in a following patch, if you are ok with this approach.","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"a1cc74a27a0dfa0d2b0cb266c81494d8562bef61","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                _LW(\"A conductor with hostname %(hostname)s \""},{"line_number":152,"context_line":"                    \"was previously registered. Updating registration\"),"},{"line_number":153,"context_line":"                {\u0027hostname\u0027: self.host})"},{"line_number":154,"context_line":"            self.conductor \u003d objects.Conductor.register("},{"line_number":155,"context_line":"                admin_context, self.host, driver_names, update_existing\u003dTrue)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # Start periodic tasks"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_31c0e14f","line":154,"updated":"2016-03-04 03:18:13.000000000","message":"Most looks good but I am curious why db_api have only one register_conductor() to do both of register/update.\nwhat about have another function like Conductor.update()?","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"31d556ae2459ed409ef3133dc0f4464a34750b39","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                _LW(\"A conductor with hostname %(hostname)s \""},{"line_number":152,"context_line":"                    \"was previously registered. Updating registration\"),"},{"line_number":153,"context_line":"                {\u0027hostname\u0027: self.host})"},{"line_number":154,"context_line":"            self.conductor \u003d objects.Conductor.register("},{"line_number":155,"context_line":"                admin_context, self.host, driver_names, update_existing\u003dTrue)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # Start periodic tasks"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_39439f14","line":154,"in_reply_to":"7af24918_31c0e14f","updated":"2016-03-04 09:38:34.000000000","message":"Yeah I honestly have to investigate what are the real reasons but seems that updating a conductor is a no-no, see the save() method for example [0] it mentions exactly that.\n\nOff the top of my head, I think we can\u0027t update for two reasons:\n\n1) Drivers are registered and loaded at init time, so if we update the driver list of a conductor Ironic won\u0027t unload or load new drivers. This would require extra code that are not in place yet\n\n2) By changing the hostname of the conductor we also would have to guarantee that at that particular moment there are no nodes locked by the conductor, otherwise we may introduce a dead lock on them.\n\n[0] https://github.com/openstack/ironic/blob/master/ironic/objects/conductor.py#L51-L54","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"a979108c7201d2e7094bb18dc78f2e0d4ecc68cd","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                _LW(\"A conductor with hostname %(hostname)s \""},{"line_number":152,"context_line":"                    \"was previously registered. Updating registration\"),"},{"line_number":153,"context_line":"                {\u0027hostname\u0027: self.host})"},{"line_number":154,"context_line":"            self.conductor \u003d objects.Conductor.register("},{"line_number":155,"context_line":"                admin_context, self.host, driver_names, update_existing\u003dTrue)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # Start periodic tasks"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_1692a257","line":154,"in_reply_to":"7af24918_39439f14","updated":"2016-03-07 06:20:31.000000000","message":"Thanks, this make sense to me :) It will be more complicated if support this, let\u0027s keep it.","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"751149c68023f07ffe16e26964d9135751f25702","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        :return: generator yielding tuples of requested fields"},{"line_number":259,"context_line":"        \"\"\""},{"line_number":260,"context_line":"        columns \u003d [\u0027uuid\u0027, \u0027driver\u0027] + list(fields or ())"},{"line_number":261,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns, **kwargs)"},{"line_number":262,"context_line":"        for result in node_list:"},{"line_number":263,"context_line":"            if self._mapped_to_this_conductor(*result[:2]):"},{"line_number":264,"context_line":"                yield result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_722cfeab","line":261,"updated":"2016-03-07 10:03:44.000000000","message":"here too","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"ea310f94fe4d166bf43cb7f4c26eb02ad0ee7586","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        :return: generator yielding tuples of requested fields"},{"line_number":259,"context_line":"        \"\"\""},{"line_number":260,"context_line":"        columns \u003d [\u0027uuid\u0027, \u0027driver\u0027] + list(fields or ())"},{"line_number":261,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns, **kwargs)"},{"line_number":262,"context_line":"        for result in node_list:"},{"line_number":263,"context_line":"            if self._mapped_to_this_conductor(*result[:2]):"},{"line_number":264,"context_line":"                yield result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_3c081b91","line":261,"in_reply_to":"5aef4532_722cfeab","updated":"2016-03-09 05:53:34.000000000","message":"Yes, I see this one. But I think this should belong to node object  and definitely an different patch.","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"}],"ironic/objects/conductor.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"91282ea350b79703589038b7cf27257a93b96108","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":26,"context_line":"class Conductor(base.IronicObject, object_base.VersionedObjectDictCompat):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    dbapi \u003d db_api.get_instance()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_30f2ff6f","line":27,"updated":"2016-03-09 06:42:07.000000000","message":"Even though the new methods are not remotable for now which will not change the signature but I still think this is worth to bump the conductor Version to 1.1 for your change(which is 1.0 by default) and change the test accordingly. https://github.com/openstack/ironic/blob/master/ironic/tests/unit/objects/test_objects.py#L412","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0622ccff5b0727072edf99775740a9626e94b6c7","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":26,"context_line":"class Conductor(base.IronicObject, object_base.VersionedObjectDictCompat):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    dbapi \u003d db_api.get_instance()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_6c7f7e66","line":27,"in_reply_to":"5aef4532_30f2ff6f","updated":"2016-03-09 11:49:20.000000000","message":"Oh agreed!\n\nThanks for pointing that out. Awesome catch!","commit_id":"201a8b6b388ba1c539cd01ede53fce5fec149dc9"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f9d61c14500eaac29fcfbae0392cf6ed88909b35","unresolved":false,"context_lines":[{"line_number":25,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":26,"context_line":"class Conductor(base.IronicObject, object_base.VersionedObjectDictCompat):"},{"line_number":27,"context_line":"    # Version 1.0: Initial version"},{"line_number":28,"context_line":"    # Version 1.1: Add register() and unregister()"},{"line_number":29,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    dbapi \u003d db_api.get_instance()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_779ef0b9","line":28,"updated":"2016-03-18 13:19:41.000000000","message":"... and make the context parameter to touch() optional.","commit_id":"278d4c194607905dc60ed761f3f9662f8eae8312"}]}
