)]}'
{"cinder/scheduler/flows/create_volume.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"88d366ec34e13b20edd1175929017cc3d849cfb6","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # services. Lets delay execution for given amount of time to ensure"},{"line_number":130,"context_line":"        # that we\u0027ll have the metrics in memory when scheduling."},{"line_number":131,"context_line":"        if self.scheduling_delay:"},{"line_number":132,"context_line":"            eventlet.sleep(self.scheduling_delay)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        try:"},{"line_number":135,"context_line":"            self.driver_api.schedule_create_volume(context, request_spec,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_38b28e94","line":132,"updated":"2015-02-24 16:00:19.000000000","message":"How about:\n\n    if self.scheduling_delay:\n        i \u003d 0\n        while i\u003cself.scheduling_delay:\n            eventlet.sleep(1)\n            i+\u003d1\n\n    This allows scheduler to sleep less if volume stats comes quicker.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"b95db38b33d93ec8602cfb8eb5d045fc1927de7d","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # services. Lets delay execution for given amount of time to ensure"},{"line_number":130,"context_line":"        # that we\u0027ll have the metrics in memory when scheduling."},{"line_number":131,"context_line":"        if self.scheduling_delay:"},{"line_number":132,"context_line":"            eventlet.sleep(self.scheduling_delay)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        try:"},{"line_number":135,"context_line":"            self.driver_api.schedule_create_volume(context, request_spec,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_55bfe0a9","line":132,"in_reply_to":"ba7be1f8_0e566406","updated":"2015-02-25 12:06:56.000000000","message":"He isn\u0027t modifying self.scheduling_delay, he\u0027s only reading it, he just calls self.driver_api.schedule_create_volume every second during the period rather than sleeping the whole period. Looks reasonable to me, particularly with the change to broadcast for stats updates on startup added back in, the window until there is an acceptable volume manager available should be short.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"56c4ce752ab1d9b46996a37a05bf46ae73853a44","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # services. Lets delay execution for given amount of time to ensure"},{"line_number":130,"context_line":"        # that we\u0027ll have the metrics in memory when scheduling."},{"line_number":131,"context_line":"        if self.scheduling_delay:"},{"line_number":132,"context_line":"            eventlet.sleep(self.scheduling_delay)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        try:"},{"line_number":135,"context_line":"            self.driver_api.schedule_create_volume(context, request_spec,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_0e566406","line":132,"in_reply_to":"ba7be1f8_38b28e94","updated":"2015-02-24 16:21:09.000000000","message":"This won\u0027t work as you expect as self.scheduling_delay here is the copy of the one in manager. I couldn\u0027t find simple way to pass reference here.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"}],"cinder/scheduler/manager.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"67266418ffa84db430150f193fa7e0c7e0384971","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        super(SchedulerManager, self).__init__(*args, **kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @periodic_task.periodic_task"},{"line_number":80,"context_line":"    def _start_accepting_requests(self, context):"},{"line_number":81,"context_line":"        # NOTE(dulek): After periodic task timeout we should be able to accept"},{"line_number":82,"context_line":"        # requests without waiting as we should have gathered volume metrics"},{"line_number":83,"context_line":"        # from nodes."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_1ec92bac","line":80,"updated":"2015-02-24 18:35:52.000000000","message":"The problem with periodic_task is (besides it gets to run every now and then) it may not wait for periodic_interval before its first run because of the periodic_fuzzy_delay.  So you should still be able to reproduce the bug even with this fix when trying more times.  To get rid of the impact of periodic_fuzzy_delay, some modification has to be done to cinder/cmd/scheduler.py too.  \nOr, how about adding a one time sleep_and_reset_schedule_delay call in scheduler init_host_with_rpc()?  With that, scheduler starts with scheduling delay\u003d60, then broadcasts to ask for vol stats feed and waits for 60sec and sets scheduling delay back to 0.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"88d366ec34e13b20edd1175929017cc3d849cfb6","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        super(SchedulerManager, self).__init__(*args, **kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @periodic_task.periodic_task"},{"line_number":80,"context_line":"    def _start_accepting_requests(self, context):"},{"line_number":81,"context_line":"        # NOTE(dulek): After periodic task timeout we should be able to accept"},{"line_number":82,"context_line":"        # requests without waiting as we should have gathered volume metrics"},{"line_number":83,"context_line":"        # from nodes."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_58af422a","line":80,"updated":"2015-02-24 16:00:19.000000000","message":"This is actually a one time job, I don\u0027t like doing it periodically.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f3690b8017ca4b336d44e15b9ea1869d79558ef3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        super(SchedulerManager, self).__init__(*args, **kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @periodic_task.periodic_task"},{"line_number":80,"context_line":"    def _start_accepting_requests(self, context):"},{"line_number":81,"context_line":"        # NOTE(dulek): After periodic task timeout we should be able to accept"},{"line_number":82,"context_line":"        # requests without waiting as we should have gathered volume metrics"},{"line_number":83,"context_line":"        # from nodes."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_cadb387a","line":80,"in_reply_to":"ba7be1f8_1ec92bac","updated":"2015-02-25 08:40:40.000000000","message":"This is great idea, I\u0027ll update the patch.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"56c4ce752ab1d9b46996a37a05bf46ae73853a44","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        super(SchedulerManager, self).__init__(*args, **kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @periodic_task.periodic_task"},{"line_number":80,"context_line":"    def _start_accepting_requests(self, context):"},{"line_number":81,"context_line":"        # NOTE(dulek): After periodic task timeout we should be able to accept"},{"line_number":82,"context_line":"        # requests without waiting as we should have gathered volume metrics"},{"line_number":83,"context_line":"        # from nodes."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_f36ad7ec","line":80,"in_reply_to":"ba7be1f8_58af422a","updated":"2015-02-24 16:21:09.000000000","message":"Agreed, but I found this solution the cleanest. If you can propose how can I hook to do it just once 60 seconds after service startup I would definitely go for it.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"67266418ffa84db430150f193fa7e0c7e0384971","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.request_service_capabilities(ctxt)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def update_service_capabilities(self, context, service_name\u003dNone,"},{"line_number":91,"context_line":"                                    host\u003dNone, capabilities\u003dNone, **kwargs):"},{"line_number":92,"context_line":"        \"\"\"Process a capability update from a service node.\"\"\""},{"line_number":93,"context_line":"        if capabilities is None:"},{"line_number":94,"context_line":"            capabilities \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_3eceefb4","line":91,"updated":"2015-02-24 18:35:52.000000000","message":"A few volume create requests aren\u0027t served by best candidate(s), is not a big deal as long as they can be served.  Our concern should be focusing on scheduler isn\u0027t aware there is/are available candidate(s), and I agree alow scheduler to process request when first vol stats comes in doesn\u0027t really help in real deployment.  A more complete fix would be: when scheduler service starts, let scheduler driver to decide whether it can accept request or not (scheduler driver then should query DB for running vol services and expect to receive updates from those), if not, wait for periodic_interval can solve 90% of the failure cases may appear in real deployment.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"88d366ec34e13b20edd1175929017cc3d849cfb6","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.request_service_capabilities(ctxt)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def update_service_capabilities(self, context, service_name\u003dNone,"},{"line_number":91,"context_line":"                                    host\u003dNone, capabilities\u003dNone, **kwargs):"},{"line_number":92,"context_line":"        \"\"\"Process a capability update from a service node.\"\"\""},{"line_number":93,"context_line":"        if capabilities is None:"},{"line_number":94,"context_line":"            capabilities \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_78a88620","line":91,"updated":"2015-02-24 16:00:19.000000000","message":"This is the point where Cinder scheduler gets volume status update from backends, changing self.scheduling_delay here is better.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f3690b8017ca4b336d44e15b9ea1869d79558ef3","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.request_service_capabilities(ctxt)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def update_service_capabilities(self, context, service_name\u003dNone,"},{"line_number":91,"context_line":"                                    host\u003dNone, capabilities\u003dNone, **kwargs):"},{"line_number":92,"context_line":"        \"\"\"Process a capability update from a service node.\"\"\""},{"line_number":93,"context_line":"        if capabilities is None:"},{"line_number":94,"context_line":"            capabilities \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_aa73647e","line":91,"in_reply_to":"ba7be1f8_3eceefb4","updated":"2015-02-25 08:40:40.000000000","message":"It was agreed on bug discussion that this is the proper fix, but would require changes to oslo.messaging.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"56c4ce752ab1d9b46996a37a05bf46ae73853a44","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.request_service_capabilities(ctxt)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def update_service_capabilities(self, context, service_name\u003dNone,"},{"line_number":91,"context_line":"                                    host\u003dNone, capabilities\u003dNone, **kwargs):"},{"line_number":92,"context_line":"        \"\"\"Process a capability update from a service node.\"\"\""},{"line_number":93,"context_line":"        if capabilities is None:"},{"line_number":94,"context_line":"            capabilities \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_f319f7d7","line":91,"in_reply_to":"ba7be1f8_78a88620","updated":"2015-02-24 16:21:09.000000000","message":"At this point we\u0027ll have just one c-vol stats so any request would go to this one host. It would be unfair to favor host that happen to send it\u0027s status earlier. The decision made by scheduler won\u0027t be the best one in that case.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"67266418ffa84db430150f193fa7e0c7e0384971","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                      image_id\u003dNone, request_spec\u003dNone,"},{"line_number":125,"context_line":"                      filter_properties\u003dNone):"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            flow_engine \u003d create_volume.get_flow(context,"},{"line_number":129,"context_line":"                                                 db, self.driver,"},{"line_number":130,"context_line":"                                                 self.scheduling_delay,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_5ec6439b","line":127,"updated":"2015-02-24 18:35:52.000000000","message":"Instead of sleeping inside the task flow engine, why not just sleep here, so we can get fresh schedule_delay and probably sleep less.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f3690b8017ca4b336d44e15b9ea1869d79558ef3","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                      image_id\u003dNone, request_spec\u003dNone,"},{"line_number":125,"context_line":"                      filter_properties\u003dNone):"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            flow_engine \u003d create_volume.get_flow(context,"},{"line_number":129,"context_line":"                                                 db, self.driver,"},{"line_number":130,"context_line":"                                                 self.scheduling_delay,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_6fe6deb1","line":127,"in_reply_to":"ba7be1f8_5ec6439b","updated":"2015-02-25 08:40:40.000000000","message":"That was my original idea. The problem is that then we lose what TaskFlow offered in the first place - having control of state of tasks. If we\u0027re using TaskFlow then it would make no sense to me to place long-running-tasks outside of the flow.","commit_id":"27ca39558c88b6a732a90ca921851eecc7c2640c"}]}
