[Pkg-iscsi-maintainers] Bug#816632: open-iscsi: should allow setting a custom initiatorName on install

Christian Seiler christian at iwakd.de
Thu Mar 3 16:18:42 UTC 2016


Control: severity -1 wishlist
Control: tags -1 + confirmed pending

On 03.03.2016 16:28, Mathieu Trudel-Lapierre wrote:
> It appears as though open-iscsi always generates a random initiatorName from
> scratch on installation; either as it runs in the installer, or as it is first
> installed on the system.

Yes.

> Furthermore, this would then lead to the initiatorName changing from in the
> installer environment and on the installed system, as it seems that
> /etc/iscsi/initiatorname.iscsi isn't copied from the installer to the target.

No, it actually is. open-iscsi-udeb contains a finalizing part that
copies the entirety of /etc/iscsi from the installer ramdisk to the
system after installation is complete. This means that while the package
installation will generate a new random initiator name, that one is
never used and immediately overwritten at the end of installation.

> Now, on some secured setups, the host needs to authenticate also by
> initiatorName to the target, and that sometimes requires using one's own
> naming scheme for the initiator name.

Yes, I think we should support that.

> open-iscsi should allow using a custom initiatorName at least in the installer,
> where it currently always creates /etc/iscsi/initiatorname.iscsi using
> iscsi-iname. I've been testing code to allow setting the initiatorName in the
> installer, but this will only work if there is an added test whether the
> file exists.

It makes sense to add that check in the udeb. What I'm unsure about is
whether to add a low-priority (hence not shown by default) debconf
template to allow setting the initiator name before package installation
- for the installer this wouldn't be relevant (because as I said it
overwrites /etc/iscsi after the installation is complete), but maybe for
other use cases? On the other hand, postinst currently does check for
the presence of the file, so the simpler solution that already works now
is to just create the file before installing the package. So I think I'm
against adding a debconf prompt for that, unless you can make a good
case for it.

> Patch follows:

Thanks for the patch, looks reasonable. I've pushed it to git:
https://anonscm.debian.org/cgit/pkg-iscsi/open-iscsi.git/commit/?id=f5b850a81767f79f853394d0ba1d41544f572754

Regards,
Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20160303/1e934046/attachment.sig>


More information about the Pkg-iscsi-maintainers mailing list