[rhel7-branch] Update storage config after running dasdfmt. (#1264411)
by Samantha N. Bueno
[I feel like this was fixed before, but I think it was something else
that I had to rip out later since it caused problems.
Anyway.]
Otherwise the installer attempts to work with disks it thinks have a size
of 0B (size reported of an unformatted disk), which causes problems.
Resolves: rhbz#1264411
---
pyanaconda/ui/gui/spokes/lib/dasdfmt.py | 5 +++++
pyanaconda/ui/gui/spokes/storage.py | 1 +
pyanaconda/ui/tui/spokes/storage.py | 7 ++++++-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/dasdfmt.py b/pyanaconda/ui/gui/spokes/lib/dasdfmt.py
index 1b94705..e1d3df2 100644
--- a/pyanaconda/ui/gui/spokes/lib/dasdfmt.py
+++ b/pyanaconda/ui/gui/spokes/lib/dasdfmt.py
@@ -27,6 +27,7 @@ from pyanaconda import constants
from pyanaconda.i18n import _
import threading
+from blivet import storageInitialize
from blivet.devicelibs.dasd import format_dasd
from blivet.errors import DasdFormatError
@@ -112,6 +113,10 @@ class DasdFormatDialog(GUIObject):
threadMgr.add(AnacondaThread(name=constants.THREAD_DASDFMT,
target=self.run_dasdfmt, args=(self._epoch,)))
+ # Need to make devicetree aware of storage change
+ threadMgr.add(AnacondaThread(name=constants.THREAD_STORAGE, target=storageInitialize,
+ args=(self.storage, self.data, self.storage.devicetree.protectedDevNames)))
+
@gtk_action_wait
def update_dialog(self, epoch_started):
"""
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index ca5d30b..155fe7e 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -314,6 +314,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
hubQ.send_not_ready(self.__class__.__name__)
# on the off-chance dasdfmt is running, we can't proceed further
threadMgr.wait(constants.THREAD_DASDFMT)
+ threadMgr.wait(constants.THREAD_STORAGE)
hubQ.send_message(self.__class__.__name__, _("Saving storage configuration..."))
if flags.automatedInstall and self.data.autopart.encrypted and not self.data.autopart.passphrase:
self.autopart_missing_passphrase = True
diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
index fae5852..eac4354 100644
--- a/pyanaconda/ui/tui/spokes/storage.py
+++ b/pyanaconda/ui/tui/spokes/storage.py
@@ -29,7 +29,7 @@ from pyanaconda.ui.tui.simpleline import TextWidget, CheckboxWidget
from pyanaconda.ui.tui.tuiobject import YesNoDialog
from pyanaconda.storage_utils import AUTOPART_CHOICES, sanity_check, SanityError, SanityWarning
-from blivet import arch
+from blivet import arch, storageInitialize
from blivet.size import Size
from blivet.errors import StorageError, DasdFormatError
from blivet.devices import DASDDevice, FcoeDiskDevice, iScsiDiskDevice, MultipathDevice, ZFCPDiskDevice
@@ -340,6 +340,11 @@ class StorageSpoke(NormalTUISpoke):
log.error(str(err))
continue
+ # need to make devicetree aware of disk changes
+ threadMgr.add(AnacondaThread(name=THREAD_STORAGE, target=storageInitialize,
+ args=(self.storage, self.data, self.storage.devicetree.protectedDevNames)))
+ self._initialize()
+
def apply(self):
self.autopart = self.data.autopart.autopart
self.data.ignoredisk.onlyuse = self.selected_disks[:]
--
2.1.0
8 years, 8 months
[master/f23/rhel-7] Do not display markup in showDetailedError.
by David Shea
showDetailedError is also used by text mode, which does not understand
Pango markup, so do not attempt to display markup in errors.py. Error
dialogs that need to display Pango markup should use specialized
dialogs, like those used by the storage spoke.
As a pleasant side effect this gets rid of the attempt to initialize Gtk
in errors.py.
Resolves: rhbz#1263963
---
pyanaconda/errors.py | 21 ++-------------------
pyanaconda/ui/gui/spokes/lib/detailederror.py | 2 +-
2 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py
index a3f9a69..83d69bb 100644
--- a/pyanaconda/errors.py
+++ b/pyanaconda/errors.py
@@ -25,23 +25,6 @@ __all__ = ["ERROR_RAISE", "ERROR_CONTINUE", "ERROR_RETRY",
"MediaMountError", "ScriptError", "CmdlineError",
"errorHandler"]
-# Only run the pango markup escape if the GUI is available
-try:
- from gi.repository import Gtk
-
- # XXX: Gtk stopped raising RuntimeError if it fails to
- # initialize. Horay! But will it stay like this? Let's be
- # cautious and raise the exception on our own to work in both
- # cases
- initialized = Gtk.init_check(None)[0]
- if not initialized:
- raise RuntimeError()
-
- # If we don't do the check above this import will fail within _isys
- from pyanaconda.ui.gui.utils import escape_markup
-except (RuntimeError, ImportError):
- escape_markup = lambda x: x
-
class InvalidImageSizeError(Exception):
def __init__(self, message, filename):
Exception.__init__(self, message)
@@ -134,13 +117,13 @@ class ErrorHandler(object):
def _storageResetHandler(self, exn):
message = (_("There is a problem with your existing storage "
- "configuration: <b>%(errortxt)s</b>\n\n"
+ "configuration: %(errortxt)s\n\n"
"You must resolve this matter before the installation can "
"proceed. There is a shell available for use which you "
"can access by pressing ctrl-alt-f1 and then ctrl-b 2."
"\n\nOnce you have resolved the issue you can retry the "
"storage scan. If you do not fix it you will have to exit "
- "the installer.") % {"errortxt": escape_markup(exn.message)})
+ "the installer.") % {"errortxt": exn.message})
details = _(exn.suggestion)
buttons = (_("_Exit Installer"), _("_Retry"))
if self.ui.showDetailedError(message, details, buttons=buttons):
diff --git a/pyanaconda/ui/gui/spokes/lib/detailederror.py b/pyanaconda/ui/gui/spokes/lib/detailederror.py
index c0360e8..f8082f4 100644
--- a/pyanaconda/ui/gui/spokes/lib/detailederror.py
+++ b/pyanaconda/ui/gui/spokes/lib/detailederror.py
@@ -65,7 +65,7 @@ class DetailedErrorDialog(GUIObject):
widget.grab_default()
if label:
- self.builder.get_object("detailedLabel").set_markup(label)
+ self.builder.get_object("detailedLabel").set_text(label)
# pylint: disable=arguments-differ
def refresh(self, msg):
--
2.4.3
8 years, 8 months
New: [rhinstaller/anaconda/pulls/370 rhel7-branch] rpmostreepayload: Forcibly unmount everything in sysroot
by dashea
There is an issue with 7.2 where something in the interaction
between blivet/systemd/rpmostreepayload is mounting filesystems
"deep" in `/mnt/sysimage/ostree/deploy/$x/sysroot/deploy/...`.
This then triggers another bug where the initramfs tmpfs gets remounted
read-only, and that in turns breaks dracut's ability to shutdown.
While these mounts do appear even in Fedora now, they're not actively
breaking things (for some reason), so let's just go with this crude
but functional hack for now, then re-investigate upstream and get the
mounts looking saner there.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/370
8 years, 8 months