Re: [PATCH 26/35] monitor: implement starting discovery controllers on startup

Martin Wilck
2021-01-29T21:13:10Z

On Fri, 2021-01-29 at 13:06 -0800, Sagi Grimberg wrote:
>
> > If the -U/--startup option is used, nvme monitor looks for exsiting
> > nvme controllers on startup, and runs a discovery on the associated
> > transport address (connection); i.e. tries to connect to a
> > discovery
> > subsystem on the same address, retrieve the discovery log pages,
> > and (if --autoconnect is given) connect all listed controllers.
>
> Oh no no no no... This is a completely wrong assumption to make.
> Nothing
> suggest that an nvme controller will have a discovery controller on
> the
> same port.
>
> There is a discovery controller and an NVM controller, the only
> connection between the two is that a discovery controller can
> refer to an nvme controller (or a different discovery controller).
>
> Information about discovery controllers may be obtained in different
> ways, but it absolutely cannot be obtained by any nvme controller.
>
> Now I understand a bit more on the --keep discussion. The monitor
> should today get discovery controller endpoints from a conf file
> (maybe discovery.conf) and in the future by any other automatic
> way, not even looking into the currently connected nvme controllers.
>

I hear you. I'll drop this in the next version, no problem.

I didn't expect that probing for a discovery controller was a problem.
IIUC, if we get an fc_udev_device event for a NVMe remote port, we
can't be sure that that remote port offers a discovery controller,
either. We try to connect, and give up if it fails.

Martin