The _filter_idle_ports function of fujitsu driver cannot guanrantee high availabity of path

Bug #1891797 reported by zhaoleilc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

Description
===========
When we attach a volume based the fujitsu volume drive to a instance,
the fibre channel volume paths may not be high available. It is clear
for us to see that the filter ports algorithm in the code only depends
on the load on the ports so that all volume paths may belong a same
controller manager. When a controller manager fails, the fibre channel
volume paths can not fail over.

Steps to reproduce
==================
1. There are eight enabled ca ports. Four of them are used for the
A cloud platform, and the rest are used for the B cloud platform.
We will test on the A cloud platform. In order to state conveniently, we
sign them as a, b, c and d. In these ca ports, a and b belongs A controller
manager, c and d belongs B controller manager.
2. Configure two zones, one includes a port of hba ports and a and c of ca ports,
the other includes the other ports of hba ports and b nad d of ca ports.
3. Attach a volume of the fujitsu driver to a instance.

Expected result
===============
The fibre channel volume paths include a, b, c and d ca ports.

Actual result
=============
The fibre channel volume paths only include a and b ca ports of A controller
manager, and they also include some ports which belongs B controller manager.

Environment
===========
The master branch of cinder

Implicated codes
==============
    def _filter_idle_ports(self, avai_ports):
        """Filter idle ports."""
        LOG.debug('_filter_idle_ports, '
                  'available ports: %(avai_ports)s.',
                  {'avai_ports': avai_ports})

        need_port_num = self.need_port_num
        if len(avai_ports) <= need_port_num:
            temp_ports = avai_ports
        else:
            port_aglen_dict = {}
            for port in avai_ports:
                clidata = self._get_ags_info_by_port(port)
                port_aglen_dict[port] = len(clidata)
            sort_port_list = sorted(port_aglen_dict.items(),
                                    key=lambda item: item[1])

            temp_ports = [
                sort_port_list[i][0] for i in range(need_port_num)
            ]

        LOG.debug('_filter_idle_ports, '
                  'selected ports: %(temp_ports)s.',
                  {'temp_ports': temp_ports})
        return temp_ports

zhaoleilc (zhaoleilc)
description: updated
description: updated
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.