All of lore.kernel.org
 help / color / mirror / Atom feed
From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH nvme-cli rfc 0/6] Support discovery log change events
Date: Sun, 24 Feb 2019 18:17:01 +0100	[thread overview]
Message-ID: <d4012891-8bc7-00cf-ab96-7828270d25af@suse.de> (raw)
In-Reply-To: <20190223023257.21227-1-sagi@grimberg.me>

On 2/23/19 3:32 AM, Sagi Grimberg wrote:
> This series corresponds to the nvme-core discovery uevent notification
> for discovery log changes.
> 
> The motivation is that whenever we get a discovery log change event from
> a discovery controller, we want to query the discovery log page again
> and connect to the new controllers in the fabric.
> 
> To support this we have a couple of steps:
> 1. establish a "persistent" discovery controller
> 2. allow discovery over an existing "persisent" discovery controller device
>     node
> 3. allow users to pass "none" to nvme-cli for arguments that they don't
>     care about (this will be useful when we have udev rule that catches events
>     and simply feed them to nvme-cli without checking any parameters or building
>     a commandline arg string).
> 4. add udev+systemd scripting to make this all automatic.
> 
> Review and feedback is welcome.
> 
> Hannes Reinecke (1):
>    fc: add autoconnect systemd service and udev rule for fc discovery log
>      changes
> 
> Sagi Grimberg (5):
>    fabrics: ignore arguments that pass in "none"
>    fabrics: support persistent connections to a discovery controller
>    fabrics: allow user to retrieve discovery log from existing discovery
>      controller
>    fabrics: add --quiet option
>    fabrics: systemd and udev support for automatic discovery log changes
> 
>   Makefile                                | 10 +++-
>   fabrics.c                               | 62 ++++++++++++++++++-------
>   fabrics.h                               |  2 +
>   nvme.spec.in                            |  7 +++
>   systemd/nvmefc-boot-connections.service |  9 aw++++
>   systemd/nvmf-connect at .service           | 15 ++++++
>   udev/70-nvmf-autoconnect.rules          | 11 +++++
>   7 files changed, 98 insertions(+), 18 deletions(-)
>   create mode 100644 systemd/nvmefc-boot-connections.service
>   create mode 100644 systemd/nvmf-connect at .service
>   create mode 100644 udev/70-nvmf-autoconnect.rules
> 
Hmm.

Last time I've posted the autoconnect scripts you said you'd rather have 
them updated to be useful for generic discovery events.
So what happened to that?
As it stands (and as posted here) these scripts are pretty much 
independent on the remaining series as they react to the existent FC 
NVMe uevents.

And the one thing which I patently dislike about those scripts is this 
utterly weird interface.
Problem here is that abstract systemd services (ie those ending with an 
'@' sign) can pass exactly _one_ argument, namely that one following the 
'@' sign.
But for nvme we need to pass in several arguments, one for each 
command-line parameter.

The way it's solved nowadays is to insert a 'tab' character (\t) between 
each argument, use the combined string as parameter to the systemd 
service, and call 'echo' to split the parameters again.
Shudder.

What I really want to do here is to add a '--dry-run' option to 
nvme-cli, which then would instruct nvme-cli to _not_ write the final 
string to the ioctl interface but rather to stdout.
This string will not contain any spaces, and have each argument (minus 
any leading dashes) concatenated by commas.
So it should be possible to use this string as argument for the systemd 
service.
Then we only need to complementary call --argstr to accept this string 
for nvme-cli, re-parse it into the internal structure, and continue with 
the operation.

I do have some patches, but still need to polish them off (and possibly 
test them :-) before sending.

Cheers,

Hannes

  parent reply	other threads:[~2019-02-24 17:17 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23  2:32 [PATCH nvme-cli rfc 0/6] Support discovery log change events Sagi Grimberg
2019-02-23  2:32 ` [PATCH nvme-cli rfc 1/6] fabrics: ignore arguments that pass in "none" Sagi Grimberg
2019-05-07  9:17   ` Max Gurtovoy
2019-05-07 17:04     ` James Smart
2019-02-23  2:32 ` [PATCH nvme-cli rfc 2/6] fabrics: support persistent connections to a discovery controller Sagi Grimberg
2019-05-07  9:22   ` Max Gurtovoy
2019-02-23  2:32 ` [PATCH nvme-cli rfc 3/6] fabrics: allow user to retrieve discovery log from existing " Sagi Grimberg
2019-05-07  9:27   ` Max Gurtovoy
2019-02-23  2:32 ` [PATCH nvme-cli rfc 4/6] fabrics: add --quiet option Sagi Grimberg
2019-05-07  9:35   ` Max Gurtovoy
2019-05-07 17:12     ` James Smart
2019-05-07 18:54       ` Max Gurtovoy
2019-02-23  2:32 ` [PATCH nvme-cli rfc 5/6] fabrics: systemd and udev support for automatic discovery log changes Sagi Grimberg
2019-02-23  2:32 ` [PATCH nvme-cli rfc 6/6] fc: add autoconnect systemd service and udev rule for fc " Sagi Grimberg
2019-02-24 17:17 ` Hannes Reinecke [this message]
2019-02-24 22:33   ` [PATCH nvme-cli rfc 0/6] Support discovery log change events Sagi Grimberg
2019-03-09  2:18     ` Sagi Grimberg
2019-03-13 21:04     ` James Smart
2019-03-14  0:00       ` Sagi Grimberg
2019-03-14 20:43         ` James Smart
2019-03-14 20:50           ` James Smart
2019-03-15 12:40             ` Hannes Reinecke
2019-03-15 20:38               ` Sagi Grimberg
2019-04-25 19:10                 ` Sagi Grimberg
2019-04-26 14:19                   ` Hannes Reinecke
2019-04-26 15:46                     ` Sagi Grimberg
2019-04-26 16:17                       ` James Smart
2019-04-26 19:10                         ` Sagi Grimberg
2019-04-26 20:14                           ` James Smart
2019-05-06 22:38                             ` Arun Easi
2019-05-07 16:47                               ` James Smart
2019-04-27 11:05                           ` Hannes Reinecke
2019-04-27 10:53                       ` Hannes Reinecke
2019-03-14 21:41           ` Sagi Grimberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4012891-8bc7-00cf-ab96-7828270d25af@suse.de \
    --to=hare@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.