cinder scheduler has a comment error

Bug #1979041 reported by 周云飞
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Low
周云飞

Bug Description

The function backend_passes in cinder/scheduler/filters/capabilities_filter.py has an error in the return comment(https://github.com/openstack/cinder/blob/master/cinder/scheduler/filters/capabilities_filter.py#L94). The comment is "Return a list of backends that can create resource_type.", but actually it returns a bool value.

The function backend_passes is similar with function _satisfies_extra_specs wchih in same class.The previous code was very small, so I pasted it.
def backend_passes(self, backend_state, filter_properties):
        """Return a list of backends that can create resource_type."""
        # Note(zhiteng) Currently only Cinder and Nova are using
        # this filter, so the resource type is either instance or
        # volume.
        if not self._satisfies_extra_specs(backend_state.capabilities,
                                           filter_properties):
            LOG.debug("%(backend_state)s fails resource_type extra_specs "
                      "requirements", {'backend_state': backend_state})
            return False
        return True

So the comments in this line should change from"Return a list of backends that can create resource_type." to "Return a bool value which check if capabilities satisfactory resource type requirements."

Changed in openstack-manuals:
assignee: nobody → 周云飞 (zhouyunfei123)
affects: openstack-manuals → cinder
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/846901

Changed in cinder:
status: New → In Progress
summary: - cinde scheduler has a comment error
+ cinder scheduler has a comment error
Changed in cinder:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.