[Pkg-iscsi-maintainers] Bug#833917: open-iscsi: LVM fails to see iSCSI targets for non-mounted devices with systemd.

Christian Seiler christian at iwakd.de
Thu Aug 11 14:27:35 UTC 2016


Control: found -1 2.0.873+git0.3b4b4500-8
Control: tags -1 - moreinfo
Control: tags -1 + jessie stretch sid confirmed
Control: severity -1 important
Control: retitle -1 race condition between LVM activation and kernel scanning for partitions on iSCSI devices

(Raising severity to important because the consequences of this
bug break your setup completely, and I think the aspect that
breaks in your setup (separate partitions for the PVs) is a very
natural choice and other people could also run into it. I'm
actually quite surprised that you're the first to run into this
issue, now that I figured out what the root cause was in your
case. I didn't notice it in my setups, because I always use the
disks directly as PVs, and don't partition them. I'll make a
mental note to add this to my test matrix and probably also add
some automatic integration tests for this kind of thing, as
starting with Stretch we already do have some autopkgtests for
simpler cases.)

On 08/11/2016 04:04 PM, IOhannes m zmölnig (Debian/GNU) wrote:
> indeed.
> i did a reboot and now all the virtual machines are running!

Great!

> but given that a race-condition cannot be "fixed" with a sleep, do
> you think that there is a proper solution for the problem as well?

Well, the proper solution would be to go fully event-based, and
the only reason that doesn't work in Jessie when using systemd
as the init system is because lvmetad doesn't properly work
there. In stretch it does, then you don't need to edit the file
/etc/default/open-iscsi at all anymore to start up LVM volumes,
have lvmetad do it dynamically, and then systemd will mount the
LVs once they appear. This is actually the only kind of setup
we want to support in the long term, and we want to get rid of
the old code precisely because of these issues.

(There's actually a bug open in open-iscsi to have a fully
event-based solution, see #664604. It's fixed for Stretch
already when using systemd, for sysvinit-based systems there's
still some work to be done.)

So the plan is to still support the "old way" in Stretch, but
recommend switching to lvmetad, and from Buster onwards to only
support the lvmetad way of doing this.

But for Jessie you're unfortunately stuck with this workaround.

For reference: the bug that makes lvmetad not work in Jessie is
<https://bugs.debian.org/774082>.

I will take care of adding this workaround via a stable update
to the next Jessie point release (after also fixing this in
sid).

Thanks for confirming.

Regards,
Christian



More information about the Pkg-iscsi-maintainers mailing list