)]}'
{"cinder/scheduler/filters/capacity_filter.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"1ca3f3e9ac647f28b5db920b15a9ae29e34e8fe0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            # If new_size is passed, we are allocating space to extend a volume"},{"line_number":44,"context_line":"            requested_size \u003d (int(filter_properties.get(\u0027new_size\u0027)) -"},{"line_number":45,"context_line":"                              int(filter_properties.get(\u0027size\u0027)))"},{"line_number":46,"context_line":"            LOG.debug(\u0027Extending volume in %s GB\u0027, requested_size)"},{"line_number":47,"context_line":"        else:"},{"line_number":48,"context_line":"            requested_size \u003d filter_properties.get(\u0027size\u0027)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_1e249f0b","line":46,"updated":"2016-12-02 01:33:24.000000000","message":"May be useful to log the requested_size for both cases and just say something like \"Requested size %s GB\"","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d7dfa647cdd0af3c371bca6a945f84130f229bcf","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            requested_size \u003d (int(filter_properties.get(\u0027new_size\u0027)) -"},{"line_number":49,"context_line":"                              int(filter_properties.get(\u0027size\u0027)))"},{"line_number":50,"context_line":"            LOG.debug(\u0027Checking if host %(host)s can extend the volume %(id)s\u0027"},{"line_number":51,"context_line":"                      \u0027in %(size)s GB\u0027, {\u0027host\u0027: host_state.host, \u0027id\u0027: volid,"},{"line_number":52,"context_line":"                                         \u0027size\u0027: requested_size})"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            requested_size \u003d filter_properties.get(\u0027size\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_8a64b849","line":51,"updated":"2016-12-02 21:42:41.000000000","message":"nit: s/in/to","commit_id":"3a793099a4575fbb1ff5f2bfbe69a1dfdf28c361"}],"cinder/scheduler/rpcapi.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"1ca3f3e9ac647f28b5db920b15a9ae29e34e8fe0","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        }"},{"line_number":130,"context_line":"        return cctxt.cast(ctxt, \u0027manage_existing\u0027, **msg_args)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def extend_volume(self, ctxt, volume, new_size, reservations,"},{"line_number":133,"context_line":"                      request_spec, filter_properties\u003dNone):"},{"line_number":134,"context_line":"        cctxt \u003d self._get_cctxt()"},{"line_number":135,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_7e9593e2","line":132,"updated":"2016-12-02 01:33:24.000000000","message":"We probably need to bump the rpcapi version when adding this","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c92cd46e7fdd0877e79246ecca346f4a507e6cf0","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        }"},{"line_number":130,"context_line":"        return cctxt.cast(ctxt, \u0027manage_existing\u0027, **msg_args)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def extend_volume(self, ctxt, volume, new_size, reservations,"},{"line_number":133,"context_line":"                      request_spec, filter_properties\u003dNone):"},{"line_number":134,"context_line":"        cctxt \u003d self._get_cctxt()"},{"line_number":135,"context_line":"        request_spec_p \u003d jsonutils.to_primitive(request_spec)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_4e780d2c","line":132,"in_reply_to":"3a71b18c_7e9593e2","updated":"2016-12-02 12:33:38.000000000","message":"Yup! In case of being unable to fulfill version requirements (can_send_version() method) we should raise here and catch the exception in the API layer. Then we should alternatively go with older behavior - sending the request directly to cinder-volume.\n\nNote that such situation can happen only during live upgrade, so it\u0027s just - bug isn\u0027t fixed until you finish your upgrade.","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80b452a0ef3ca5841e68c9d341a63f3dfd91715d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    TOPIC \u003d constants.SCHEDULER_TOPIC"},{"line_number":69,"context_line":"    BINARY \u003d \u0027cinder-scheduler\u0027"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def get_cctxt(self, host\u003dNone, version\u003dNone, **kwargs):"},{"line_number":72,"context_line":"        if host is not None:"},{"line_number":73,"context_line":"            kwargs[\u0027server\u0027] \u003d utils.get_volume_rpc_host(host)"},{"line_number":74,"context_line":"        return super(SchedulerAPI, self)._get_cctxt(version, **kwargs)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def create_consistencygroup(self, ctxt, group, request_spec_list\u003dNone,"},{"line_number":77,"context_line":"                                filter_properties_list\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_40edc6b5","line":74,"range":{"start_line":71,"start_character":0,"end_line":74,"end_character":70},"updated":"2016-12-06 09:51:19.000000000","message":"Hm, you shouldn\u0027t need that here - get_volume_rpc_host should only be useful in volume.rpcapi. It\u0027s related to how multibackend is implemented.","commit_id":"3a793099a4575fbb1ff5f2bfbe69a1dfdf28c361"}],"cinder/tests/unit/scheduler/test_host_filters.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d7dfa647cdd0af3c371bca6a945f84130f229bcf","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        _mock_serv_is_up.return_value \u003d True"},{"line_number":63,"context_line":"        filt_cls \u003d self.class_map[\u0027CapacityFilter\u0027]()"},{"line_number":64,"context_line":"        filter_properties \u003d {\u0027size\u0027: 100,"},{"line_number":65,"context_line":"                             \u0027request_spec\u0027: {\u0027volume_id\u0027: \u00270000-0000\u0027}}"},{"line_number":66,"context_line":"        service \u003d {\u0027disabled\u0027: False}"},{"line_number":67,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027,"},{"line_number":68,"context_line":"                                   {\u0027total_capacity_gb\u0027: 500,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_fd3df4bb","line":65,"updated":"2016-12-02 21:42:41.000000000","message":"Please use a volume uuid in fake_constants.  Please change other places too.","commit_id":"3a793099a4575fbb1ff5f2bfbe69a1dfdf28c361"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d7dfa647cdd0af3c371bca6a945f84130f229bcf","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                    \u0027updated_at\u0027: None,"},{"line_number":134,"context_line":"                                    \u0027total_capacity_gb\u0027: 500,"},{"line_number":135,"context_line":"                                    \u0027service\u0027: service})"},{"line_number":136,"context_line":"        self.assertTrue(filt_cls.host_passes(host, filter_properties))"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def test_filter_passes_unknown(self, _mock_serv_is_up):"},{"line_number":139,"context_line":"        _mock_serv_is_up.return_value \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_bd729cab","line":136,"updated":"2016-12-02 21:42:41.000000000","message":"Can you add a negative test for extend volume?","commit_id":"3a793099a4575fbb1ff5f2bfbe69a1dfdf28c361"}],"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d7dfa647cdd0af3c371bca6a945f84130f229bcf","unresolved":false,"context_lines":[{"line_number":3939,"context_line":"            \u0027volume_id\u0027: volume.id"},{"line_number":3940,"context_line":"        }"},{"line_number":3941,"context_line":"        volume_api.scheduler_rpcapi.extend_volume.assert_called_once_with("},{"line_number":3942,"context_line":"            self.context, volume, 3, [\"RESERVATION\"], request_spec)"},{"line_number":3943,"context_line":""},{"line_number":3944,"context_line":"        # clean up"},{"line_number":3945,"context_line":"        self.volume.delete_volume(self.context, volume)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_3dbbec0f","line":3942,"updated":"2016-12-02 21:42:41.000000000","message":"Is there a similar test that covers the older version that does not go through the scheduler?","commit_id":"3a793099a4575fbb1ff5f2bfbe69a1dfdf28c361"}],"cinder/volume/api.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c92cd46e7fdd0877e79246ecca346f4a507e6cf0","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"        request_spec \u003d {"},{"line_number":1326,"context_line":"            \u0027volume_properties\u0027: volume,"},{"line_number":1327,"context_line":"            \u0027volume_type\u0027: volume_type,"},{"line_number":1328,"context_line":"            \u0027volume_id\u0027: volume.id"},{"line_number":1329,"context_line":"        }"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"        self.scheduler_rpcapi.extend_volume(context, volume, new_size,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_8e8f85cb","line":1328,"updated":"2016-12-02 12:33:38.000000000","message":"missing comma.","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"1ca3f3e9ac647f28b5db920b15a9ae29e34e8fe0","unresolved":false,"context_lines":[{"line_number":1328,"context_line":"            \u0027volume_id\u0027: volume.id"},{"line_number":1329,"context_line":"        }"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"        self.scheduler_rpcapi.extend_volume(context, volume, new_size,"},{"line_number":1332,"context_line":"                                            reservations, request_spec)"},{"line_number":1333,"context_line":"        LOG.info(_LI(\"Extend volume request issued successfully.\"),"},{"line_number":1334,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_de406759","line":1331,"updated":"2016-12-02 01:33:24.000000000","message":"I wonder what, if anything, we should do to support this for rolling upgrades. I think right now if we update the api service before scheduler users would lose the ability to extend volumes. Maybe we can check somewhere and fallback to the old behavior of just calling c-vol.","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"9f21936deddb4d7c2ab5308ade8bb0199969f8c8","unresolved":false,"context_lines":[{"line_number":1328,"context_line":"            \u0027volume_id\u0027: volume.id"},{"line_number":1329,"context_line":"        }"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"        self.scheduler_rpcapi.extend_volume(context, volume, new_size,"},{"line_number":1332,"context_line":"                                            reservations, request_spec)"},{"line_number":1333,"context_line":"        LOG.info(_LI(\"Extend volume request issued successfully.\"),"},{"line_number":1334,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_e0f716f3","line":1331,"in_reply_to":"3a71b18c_1f71d2e0","updated":"2016-12-02 17:14:43.000000000","message":"P.S. Shouldn\u0027t this break the grenade jobs?","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c92cd46e7fdd0877e79246ecca346f4a507e6cf0","unresolved":false,"context_lines":[{"line_number":1328,"context_line":"            \u0027volume_id\u0027: volume.id"},{"line_number":1329,"context_line":"        }"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"        self.scheduler_rpcapi.extend_volume(context, volume, new_size,"},{"line_number":1332,"context_line":"                                            reservations, request_spec)"},{"line_number":1333,"context_line":"        LOG.info(_LI(\"Extend volume request issued successfully.\"),"},{"line_number":1334,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_4e856dab","line":1331,"in_reply_to":"3a71b18c_de406759","updated":"2016-12-02 12:33:38.000000000","message":"+1, I\u0027ve explained the way to achieve that in rpcapi.py comments.","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"35a3967a51dec05b6d3cb82f50c0d47801d9c8f1","unresolved":false,"context_lines":[{"line_number":1328,"context_line":"            \u0027volume_id\u0027: volume.id"},{"line_number":1329,"context_line":"        }"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"        self.scheduler_rpcapi.extend_volume(context, volume, new_size,"},{"line_number":1332,"context_line":"                                            reservations, request_spec)"},{"line_number":1333,"context_line":"        LOG.info(_LI(\"Extend volume request issued successfully.\"),"},{"line_number":1334,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_1f71d2e0","line":1331,"in_reply_to":"3a71b18c_de406759","updated":"2016-12-02 16:50:14.000000000","message":"Good point! I\u0027ll add the check.","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5971de4016c45bc47fd9faf0da8542b4298e0583","unresolved":false,"context_lines":[{"line_number":1328,"context_line":"            \u0027volume_id\u0027: volume.id"},{"line_number":1329,"context_line":"        }"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"        self.scheduler_rpcapi.extend_volume(context, volume, new_size,"},{"line_number":1332,"context_line":"                                            reservations, request_spec)"},{"line_number":1333,"context_line":"        LOG.info(_LI(\"Extend volume request issued successfully.\"),"},{"line_number":1334,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_e09972c5","line":1331,"in_reply_to":"3a71b18c_e0f716f3","updated":"2016-12-06 09:42:40.000000000","message":"Currently our multinode grenade job is testing only new c-api, c-sch with old c-vol, c-bak. Such configuration wouldn\u0027t trigger the problem.\n\nWe\u0027re working on extending this testing, but it requires some changes to devstack-gate, so it takes time.","commit_id":"1599f826c459ca73778d90fd1b05fad12e585d7b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"80b452a0ef3ca5841e68c9d341a63f3dfd91715d","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"            \u0027volume_type\u0027: volume_type,"},{"line_number":1328,"context_line":"            \u0027volume_id\u0027: volume.id"},{"line_number":1329,"context_line":"        }"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"        # NOTE(erlon): During rolling upgrades scheduler and volume can have"},{"line_number":1332,"context_line":"        # different versions. This check makes sure that a new version of the"},{"line_number":1333,"context_line":"        # volume service won\u0027t break."},{"line_number":1334,"context_line":"        cctxt \u003d self.scheduler_rpcapi.get_cctxt(volume.host, (\u00273.1\u0027))"},{"line_number":1335,"context_line":"        if cctxt.can_send_version(\u00273.1\u0027):"},{"line_number":1336,"context_line":"            self.scheduler_rpcapi.extend_volume(context, volume, new_size,"},{"line_number":1337,"context_line":"                                                reservations, request_spec)"},{"line_number":1338,"context_line":"        else:"},{"line_number":1339,"context_line":"            # TODO(erlon): Remove in Pike"},{"line_number":1340,"context_line":"            self.volume_rpcapi.extend_volume(context, volume, new_size,"},{"line_number":1341,"context_line":"                                             reservations)"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"        LOG.info(_LI(\"Extend volume request issued successfully.\"),"},{"line_number":1344,"context_line":"                 resource\u003dvolume)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_8066fe4e","line":1341,"range":{"start_line":1330,"start_character":0,"end_line":1341,"end_character":58},"updated":"2016-12-06 09:51:19.000000000","message":"I think you should implement that check in the SchedulerRPCAPI.extend_volume. Just raise if you\u0027re unable to send this message, catch the exception here and fallback to old behavior.","commit_id":"3a793099a4575fbb1ff5f2bfbe69a1dfdf28c361"}]}
