On Mon, 2014-11-03 at 12:18 -0500, Anne Mulhern wrote:
----- Original Message -----
> From: "Vratislav Podzimek" <vpodzime(a)redhat.com>
> To: "anaconda patch review"
<anaconda-patches(a)lists.fedorahosted.org>
> Sent: Monday, November 3, 2014 10:55:53 AM
> Subject: Re: [blivet] Allow the wait_for_entropy callback enforce continue
>
> On Mon, 2014-11-03 at 09:53 -0500, Anne Mulhern wrote:
> >
> >
<-- SNIP -->
> >
> > I think that crypto.luks_format() should do one of:
> > a) have a time out itself
> How would you let user now what happens/happened?
>
> > b) document, in the method header, that the method can hang forever waiting
> > for minimum entropy
> > to be reached (especially as no effort is made to increase min entropy
> > within the method)
> Is there any effort that could be made to increase entropy? I don't
> think so. I can document the behaviour, but I think it is quite obvious.
>
> > c) not wait for minimum entropy to be reached (assume that calling code has
> > handled that problem)
> Not a good idea because there might be the drop you mentioned and we
> should check entropy as late as possible. There's really small chance
> that there would be some significant drop while those ~10 lines of
> Python code are executed.
>
What's currently wrong now is that none of these things are being done,
and one should be.
I'm not suggesting that all of them would be done, that would be
internally contradictory.
In theory, this method is a public method of some kind of distinct devicelibs
library, so there is not any actual control over the context in which this
method is called. Therefore, and generally it would be better, it should
do the best thing it can in any context, not just the one now in blivet,
and should document that clearly in the method header for the putative user.
I'm still relying on the vision of dropping this code completely in the
next few months when libblockdev gets ready and blivet switches to it.
So libblockdev is the right place to do the right thing now. But
tweaking the docs is easy enough to be done as part of this patch.
Adding locally.
--
Vratislav Podzimek
Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic