[PATCH] If a kickstart installation stops because it doesn't know something, log that.

Vratislav Podzimek vpodzime at redhat.com
Thu Sep 11 06:23:23 UTC 2014


On Wed, 2014-09-10 at 14:58 -0400, Chris Lumens wrote:
> Also, bump down all the other log messages to debug since users typically will
> not care about them.
> ---
>  pyanaconda/ui/gui/hubs/__init__.py | 15 ++++++++++-----
>  pyanaconda/ui/tui/hubs/summary.py  |  5 ++++-
>  2 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
> index a89248b..523580e 100644
> --- a/pyanaconda/ui/gui/hubs/__init__.py
> +++ b/pyanaconda/ui/gui/hubs/__init__.py
> @@ -245,7 +245,7 @@ class Hub(GUIObject, common.Hub):
>  
>          if not self._spokes and self.window.get_may_continue():
>              # no spokes, move on
> -            log.info("no spokes available on %s, continuing automatically", self)
> +            log.debug("no spokes available on %s, continuing automatically", self)
>              gtk_call_once(self.window.emit, "continue-clicked")
>  
>          click_continue = False
> @@ -270,7 +270,7 @@ class Hub(GUIObject, common.Hub):
>                      self._notReadySpokes.append(spoke)
>  
>                  self._updateContinueButton()
> -                log.info("spoke is not ready: %s", spoke)
> +                log.debug("spoke is not ready: %s", spoke)
>              elif code == hubQ.HUB_CODE_READY:
>                  self._updateCompleteness(spoke)
>  
> @@ -278,13 +278,18 @@ class Hub(GUIObject, common.Hub):
>                      self._notReadySpokes.remove(spoke)
>  
>                  self._updateContinueButton()
> -                log.info("spoke is ready: %s", spoke)
> +                log.debug("spoke is ready: %s", spoke)
>  
>                  # If this is a real kickstart install (the kind with an input ks file)
>                  # and all spokes are now completed, we should skip ahead to the next
>                  # hub automatically.  Take into account the possibility the user is
>                  # viewing a spoke right now, though.
>                  if flags.automatedInstall:
> +                    # Users might find it helpful to know why a kickstart install
> +                    # went interactive.  Log that here.
> +                    if not spoke.completed:
> +                        log.info("kickstart installation stopped for info: %s", spoke.title.replace("_", ""))
> +
>                      # Spokes that were not initially ready got the execute call in
>                      # _createBox skipped.  Now that it's become ready, do it.  Note
>                      # that we also provide a way to skip this processing (see comments
> @@ -301,14 +306,14 @@ class Hub(GUIObject, common.Hub):
>  
>              elif code == hubQ.HUB_CODE_MESSAGE:
>                  spoke.selector.set_property("status", args[1])
> -                log.info("setting %s status to: %s", spoke, args[1])
> +                log.debug("setting %s status to: %s", spoke, args[1])
>  
>              q.task_done()
>  
>          # queue is now empty, should continue be clicked?
>          if self._autoContinue and click_continue and self.window.get_may_continue():
>              # enqueue the emit to the Gtk message queue
> -            log.info("_autoContinue clicking continue button")
> +            log.debug("_autoContinue clicking continue button")
>              gtk_call_once(self.window.emit, "continue-clicked")
>  
>          return True
> diff --git a/pyanaconda/ui/tui/hubs/summary.py b/pyanaconda/ui/tui/hubs/summary.py
> index 3b04c90..c7633a9 100644
> --- a/pyanaconda/ui/tui/hubs/summary.py
> +++ b/pyanaconda/ui/tui/hubs/summary.py
> @@ -64,7 +64,10 @@ class SummaryHub(TUIHub):
>              self.close()
>              return None
>  
> -        if not flags.ksprompt:
> +        if flags.ksprompt:
> +            for spoke in incompleteSpokes:
> +                log.info("kickstart installation stopped for info: %s", spoke.title)
> +        else:
>              errtxt = _("The following mandatory spokes are not completed:") + \
>                       "\n" + "\n".join(spoke.title for spoke in incompleteSpokes)
>              log.error("CmdlineError: %s", errtxt)
Makes sense. ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list