On Sat, Sep 29, 2018 at 01:10:32PM +0200, Tomasz Torcz wrote:
> On Fri, Sep 28, 2018 at 11:42:58AM -0700, Andrew Lutomirski wrote:
> > There's a request for the nvme-cli package to generate a unique name
> > to use when connecting to NVMe-over-fabrics targets:
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=1633814
> > 
> > I'm wondering what the right approach is.  For the various Atomic
> > variants, ISTM it's not very nice for the package to generate files in
> > /etc in a postinstall script.  And it also seems like it might be
> > surprising for a remove-and-reinstall of nvme-cli to generate a whole
> > new NQN.
> 
>   So this is similar to /etc/iscsi/initiatorname.iscsi. This one is
> generated in %post by using iscsi-iname binary:
> https://src.fedoraproject.org/rpms/iscsi-initiator-utils/blob/master/f/iscsi-initiator-utils.spec#_224
> 
>  But I wouldn't use this method verbatim! iscsi-iname generates different ID 
> on
> every invocation, which is not nice.
> 
>  The way proposed in BZ use very similar mechanism for NVMoF, invoking
> nvme gen-hostnqn. Which has the same problem: every invocation gives
> random, non-persistent ID. Again, not nice.
> 
>   I propose changing the mechanism of generating the name to give
> persistent, machine-specific result.  The best way would be to
> patch nvme gen-hostqn to use sd_id128_get_machine_app_specific()
> function. This way generated hostqn will be tied to machine-id.
Yes, please use sd_id128_get_machine_app_specific() — it is designed
specifically for such purposes.

>   After this change, stable hostqn could be generated at any moment:
> during boot, during package installation, from udev-rule, etc…
To underline this: the id that is generated is stable, so there is
no need to actually store it.

Zbyszek
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to