[PATCH] Add timeout to callbacks waiting for enough entropy (#1073679)
Vratislav Podzimek
vpodzime at redhat.com
Mon Nov 3 15:48:39 UTC 2014
On Mon, 2014-11-03 at 09:59 -0500, Anne Mulhern wrote:
>
>
>
> ----- Original Message -----
> > From: "Vratislav Podzimek" <vpodzime at redhat.com>
> > To: anaconda-patches at lists.fedorahosted.org
> > Sent: Monday, November 3, 2014 7:04:34 AM
> > Subject: [PATCH] Add timeout to callbacks waiting for enough entropy (#1073679)
> >
> > On some systems there might never be enough entropy so instead of making the
> > installation stuck forever we should just continue after some time.
> >
> > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > ---
> > pyanaconda/constants.py | 3 +++
> > pyanaconda/ui/gui/spokes/lib/entropy_dialog.glade | 25 +++++++++++++++---
> > pyanaconda/ui/gui/spokes/lib/entropy_dialog.py | 25 +++++++++++++++---
> > pyanaconda/ui/lib/entropy.py | 32
> > +++++++++++++++++------
> > 4 files changed, 71 insertions(+), 14 deletions(-)
> >
> > diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py
> > index 45b2ca8..46c9e00 100644
> > --- a/pyanaconda/constants.py
> > +++ b/pyanaconda/constants.py
> > @@ -154,3 +154,6 @@ TAR_SUFFIX = (".tar", ".tbz", ".tgz", ".txz", ".tar.bz2",
> > "tar.gz", "tar.xz")
> > # screenshots
> > SCREENSHOTS_DIRECTORY = "/tmp/anaconda-screenshots"
> > SCREENSHOTS_TARGET_DIRECTORY = "/root/anaconda-screenshots"
> > +
> > +# for how long (in minutes) we try to wait for enough entropy for LUKS
> > +MAX_ENTROPY_WAIT = 10
>
> Oh, and it might make more sense to make MAX_ENTROPY_WAIT be
> 10 * 60 and have the units be seconds instead of minutes,
> thereby saving a bunch of conversions back and forth between the other
> units which seem to be all seconds and milliseconds.
I started with seconds but then I saw many conversions to minutes so I
switched to minutes. But since we often use seconds, I'm switching that
for v2.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list