)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"980be55354b4199b839f7631324fd666039adc31","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f8c8d8d3_caff9353","updated":"2026-05-11 09:37:07.000000000","message":"Hi. My patch is probably wrong because of what\u0027s been pointed out: objects.ServiceList.get_all() is supposed to return only active and enabled services. However, we do have a serious bug here, because that\u0027s unfortunately not working. In production, we did see Cinder targeting volume services that were disabled. It\u0027d be nice if this could be investigated by the team.","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":32666,"name":"Damian Dąbrowski","email":"damian@dabrowski.cloud","username":"ddabrowski"},"change_message_id":"f702a8ab00790ea99f3352ccf975b1e1b5384244","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"00eebdd5_6d6f59b9","updated":"2026-05-12 12:56:30.000000000","message":"I tried to reproduce this issue on my test env and I couldn\u0027t.\n\nVolume creation requests were never delegated to the disabled cinder-volume service.\n\nPotentially, some special conditions need to be met in order to reproduce the problem.\n\n\nHowever, I did face an issue with disabling cinder-volume services.\nEven though API call was returning 200, it wasn\u0027t really disabling the service.\nEventually I had to disable the service directly in cinder.services table.","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"733e73c421447d2f3e44b33d3ac2862db38b7e03","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"c1d562df_76f314cb","updated":"2026-03-25 12:44:05.000000000","message":"They change looks okay, but I added an improvements suggestion.","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"c4d12f914d3f722ff34b0ea93c9deee4eb3ca9e3","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"86277c7d_22b84052","in_reply_to":"00eebdd5_6d6f59b9","updated":"2026-07-01 09:39:39.000000000","message":"Hi Damian,\n\nIt took me some time to understand what was going on. For this, I vibe coded a quick test:\n\nfrom cinder.common import config\nfrom cinder import context\nfrom cinder import objects\nfrom cinder.db.sqlalchemy import api as db_api\n\nCONF \u003d config.CONF\n                                                                                                                                                                                              \n\ndef test_cinder(ctxt):\n    volume_services \u003d objects.ServiceList.get_all(\n        ctxt,\n        {\n            \"topic\": \"cinder-volume\",\n            \"disabled\": False,\n        },\n    )\n\n    for s in volume_services:\n        print(\n            s.id,\n            s.host,\n            s.binary,\n            s.topic,\n            s.disabled,\n            s.updated_at\n        )\n\ndef main():\n    CONF([], default_config_files\u003d[\"/etc/cinder/cinder.conf\"])\n    db_api.get_engine()\n    objects.register_all()\n    ctxt \u003d context.get_admin_context()\n\n    test_cinder(ctxt)\n\nif __name__ \u003d\u003d \"__main__\":\n    main()\n\nThis shows that objects.ServiceList.get_all() always return hosts, even if they are disabled. But there\u0027s a subtitle thing here: that\u0027s the case ONLY if one sets the cluster\u003d thing AND if there\u0027s other hosts in the cluster that haven\u0027t been disabled. This behavior comes from _clustered_bool_field_filter() that\u0027s doing this.\n\nWhile _clustered_bool_field_filter() cloud be \"fixed\", this would also break the scheduler, so it shouldn\u0027t be done at this level. IMO, my original patch is the correct one, unless we add a new parameter to keep the old behavior by default. Something like:\n\ndef _clustered_bool_field_filter(query, field_name, filter_value, cluster_filer\u003dTrue):\n\nso that callers that do not set cluster_filer would keep the same behavior. This would work, but that would make my original patch a way more complicated.\n\nPlease share your thoughts here, so I can move forward to fix this bug.\n\nAs I believe I\u0027ve discovered a real bug here, I\u0027ll open it on launchpad.","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"8daffe896f65d650e88719fb9309660107316251","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"16f5cd41_e752f8c5","in_reply_to":"86277c7d_22b84052","updated":"2026-07-03 07:51:15.000000000","message":"Done","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"9daab3d3d0c3632383f77bab5df959f03c388f77","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"148c7494_d831fdd3","updated":"2026-07-03 07:21:48.000000000","message":"recheck","commit_id":"b74a4f327329a29bbeac465537f876e67295e18f"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"4a1d8cb30c75c439a981a2434fa34f746f93d739","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3e6a9a28_60a08444","updated":"2026-07-02 12:36:19.000000000","message":"recheck","commit_id":"b74a4f327329a29bbeac465537f876e67295e18f"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"b8b8dba0fd03f7da2e82f82505bc86ed6729c07b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6c5a9e8e_4df4ebc0","updated":"2026-07-02 07:05:21.000000000","message":"recheck","commit_id":"b74a4f327329a29bbeac465537f876e67295e18f"},{"author":{"_account_id":36171,"name":"jayaanand borra","display_name":"jayaanand borra","email":"jayaanand.borra@netapp.com","username":"jayaanan","status":"netapp"},"change_message_id":"f502d70fa14f87cf38cc6ffee0dbc3e64ffaaba4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4dd4dbc8_246f4639","updated":"2026-07-15 11:00:06.000000000","message":"Thank you! Brian...i missed this point, stale entries are removed at lines 735-744","commit_id":"c5f7b0127ea674327cdc1d5bf1906a72c3b3c3e8"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"aec1586564588f450db2bf64bebce66575a547aa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1f9095dd_ad7f7f5d","updated":"2026-07-04 20:52:26.000000000","message":"recheck","commit_id":"c5f7b0127ea674327cdc1d5bf1906a72c3b3c3e8"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"c774be1481fefc3ac0bde1458f0a8fa4532c8397","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"7dd27967_abbee69d","updated":"2026-07-03 10:32:39.000000000","message":"recheck","commit_id":"c5f7b0127ea674327cdc1d5bf1906a72c3b3c3e8"}],"cinder/scheduler/host_manager.py":[{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"733e73c421447d2f3e44b33d3ac2862db38b7e03","unresolved":true,"context_lines":[{"line_number":692,"context_line":"        no_capabilities_backends \u003d set()"},{"line_number":693,"context_line":"        for service in volume_services.objects:"},{"line_number":694,"context_line":"            host \u003d service.host"},{"line_number":695,"context_line":"            if not service.is_up:"},{"line_number":696,"context_line":"                LOG.warning(\"volume service is down. (host: %s)\", host)"},{"line_number":697,"context_line":"                continue"},{"line_number":698,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3303b5d6_e8ba3a3f","line":695,"updated":"2026-03-25 12:44:05.000000000","message":"Can you merge your fix to this if?\n```\n  if not service.is_up or service.disabled:\n      LOG.warning(\"volume service down or disabled. (host: %s)\", host)\n```","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"5e96792b1635bb4e496074e786bc227ec8e242f8","unresolved":false,"context_lines":[{"line_number":692,"context_line":"        no_capabilities_backends \u003d set()"},{"line_number":693,"context_line":"        for service in volume_services.objects:"},{"line_number":694,"context_line":"            host \u003d service.host"},{"line_number":695,"context_line":"            if not service.is_up:"},{"line_number":696,"context_line":"                LOG.warning(\"volume service is down. (host: %s)\", host)"},{"line_number":697,"context_line":"                continue"},{"line_number":698,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"2b619e7b_e26ba44c","line":695,"in_reply_to":"3303b5d6_e8ba3a3f","updated":"2026-03-27 08:09:34.000000000","message":"No, I prefer the way I did, so we can log differently if the service is down or disabled.","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"62206690e8e1faccfb7d7367946a726334055fe3","unresolved":true,"context_lines":[{"line_number":696,"context_line":"                LOG.warning(\"volume service is down. (host: %s)\", host)"},{"line_number":697,"context_line":"                continue"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"            if service.disabled:"},{"line_number":700,"context_line":"                LOG.warning(\"volume service is disabled. (host: %s)\", host)"},{"line_number":701,"context_line":"                continue"},{"line_number":702,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7af2be6e_d0b0be44","line":699,"updated":"2026-04-21 14:44:47.000000000","message":"Didn\u0027t we call ServiceList.get_all with disabled: False above? Will this ever be true?","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":36171,"name":"jayaanand borra","display_name":"jayaanand borra","email":"jayaanand.borra@netapp.com","username":"jayaanan","status":"netapp"},"change_message_id":"0c8e65e6779060164f5e1de8764cbd696f4cae21","unresolved":true,"context_lines":[{"line_number":696,"context_line":"                LOG.warning(\"volume service is down. (host: %s)\", host)"},{"line_number":697,"context_line":"                continue"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"            if service.disabled:"},{"line_number":700,"context_line":"                LOG.warning(\"volume service is disabled. (host: %s)\", host)"},{"line_number":701,"context_line":"                continue"},{"line_number":702,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c8d82915_4df35ba1","line":699,"in_reply_to":"7af2be6e_d0b0be44","updated":"2026-04-22 05:38:52.000000000","message":"small window of possibility... ServiceList.get_all(disabled\u003dFalse) filters correctly at SQL level for this cycle and backend_state_map is a persistent in-memory dict that accumulates entries across in scheduler cycles.\nA service disabled between cycles will no longer appear in SQL results, but its stale entry remains in state_map from the previous cycle and the scheduler will keep sending jobs to it.","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"ca58f5d43103db7626819549fbecc3f4231bfd4b","unresolved":true,"context_lines":[{"line_number":696,"context_line":"                LOG.warning(\"volume service is down. (host: %s)\", host)"},{"line_number":697,"context_line":"                continue"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"            if service.disabled:"},{"line_number":700,"context_line":"                LOG.warning(\"volume service is disabled. (host: %s)\", host)"},{"line_number":701,"context_line":"                continue"},{"line_number":702,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"e96bb456_71ee6e8c","line":699,"in_reply_to":"c8d82915_4df35ba1","updated":"2026-04-27 18:53:15.000000000","message":"I think the stale entries from the previous cycle are removed after this loop is completed, namely at lines 735-744 ... or am i misunderstanding your point?","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"ac850c6394aead966f5d8ec44c62184ca803f9ab","unresolved":false,"context_lines":[{"line_number":696,"context_line":"                LOG.warning(\"volume service is down. (host: %s)\", host)"},{"line_number":697,"context_line":"                continue"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"            if service.disabled:"},{"line_number":700,"context_line":"                LOG.warning(\"volume service is disabled. (host: %s)\", host)"},{"line_number":701,"context_line":"                continue"},{"line_number":702,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"4eb977b2_071bb0bb","line":699,"in_reply_to":"e96bb456_71ee6e8c","updated":"2026-07-01 15:16:30.000000000","message":"As explained in the bug report, this is very miss-leading. If I understand correctly (please do double-check for me: I\u0027m not an expert in SQLAlchemy), if one carefully looks into how objects.ServiceList.get_all() works, it internally calls the filter _clustered_bool_field_filter(). While this does work for a single hostname with no cluster, if cluster\u003d is set in cinder.conf, and there are other hosts in the clusters that haven\u0027t been disabled, then the host isn\u0027t filtered. See _clustered_bool_field_filter() in cinder/db/sqlalchemy/api.py (called by _service_query()).","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"}],"cinder/tests/unit/scheduler/test_host_manager.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"5306e2e4672261c87f5b7738a2e5ae734adbca60","unresolved":true,"context_lines":[{"line_number":755,"context_line":"    @mock.patch(\u0027cinder.db.service_get_all\u0027)"},{"line_number":756,"context_line":"    @mock.patch(\u0027cinder.objects.service.Service.is_up\u0027,"},{"line_number":757,"context_line":"                new_callable\u003dmock.PropertyMock)"},{"line_number":758,"context_line":"    def test_get_all_backend_states(self, _mock_service_is_up,"},{"line_number":759,"context_line":"                                    _mock_service_get_all):"},{"line_number":760,"context_line":"        context \u003d \u0027fake_context\u0027"},{"line_number":761,"context_line":"        timestamp \u003d datetime.utcnow()"}],"source_content_type":"text/x-python","patch_set":1,"id":"20172704_67dfb078","line":758,"updated":"2026-04-21 15:04:10.000000000","message":"Maybe this test can be modified to include a disabled host.","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"8daffe896f65d650e88719fb9309660107316251","unresolved":false,"context_lines":[{"line_number":755,"context_line":"    @mock.patch(\u0027cinder.db.service_get_all\u0027)"},{"line_number":756,"context_line":"    @mock.patch(\u0027cinder.objects.service.Service.is_up\u0027,"},{"line_number":757,"context_line":"                new_callable\u003dmock.PropertyMock)"},{"line_number":758,"context_line":"    def test_get_all_backend_states(self, _mock_service_is_up,"},{"line_number":759,"context_line":"                                    _mock_service_get_all):"},{"line_number":760,"context_line":"        context \u003d \u0027fake_context\u0027"},{"line_number":761,"context_line":"        timestamp \u003d datetime.utcnow()"}],"source_content_type":"text/x-python","patch_set":1,"id":"e9a4e754_d078e3d6","line":758,"in_reply_to":"20172704_67dfb078","updated":"2026-07-03 07:51:15.000000000","message":"Very good idea, thanks!","commit_id":"86ff5183a5d219e12eaefe86861f53e81d147873"}]}
