[blivet][all branches] Reduce some of the overhead in blivet's logging (#1155984)
by Samantha N. Bueno
The primary issue these patches solve is to reduce the amount of wait
time between clicking "Create partitions" in the custom part spoke and
then seeing those results show up on the screen. With a higher number
of disks, e.g. 12, you could wait up to seven or eight seconds for the
GUI to refresh. I imagine that with more disks, the problem becomes even
more pronounced.
There's definitely more to do here, but it's tedious. The current set
reduces the amount of wait time from about seven seconds to about two.
Thanks to dlehman for combing over the logs with me and helping out
with identifying some problem areas.
8 years, 8 months
[PATCH] Remove a call to execute in storage thread to avoid a threading disaster. (#1245268)
by Samantha N. Bueno
When I first introduced this dasdfmt code, I issued a manual call to
execute() in the storage threada after running dasdfmt to re-jigger
everything (detect newly-formatted DASDs etc). Turns out this is not
necessary at all--if doing a ks install, dasdfmt is called _before_
execute() is ever called anyway, so it only added a duplicate thread,
causing anaconda to crash.
Tl;dr get rid of some unnecessary junk.
Resolves: rhbz1245268
---
pyanaconda/ui/gui/spokes/storage.py | 4 ----
1 file changed, 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 25b27e6..fe2cd10 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -696,10 +696,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
log.error(str(err))
continue
- # I really hate doing this, but the way is the way; probably the most
- # correct way to kajigger the storage spoke into becoming ready
- self.execute()
-
# signal handlers
def on_summary_clicked(self, button):
# show the selected disks dialog
--
1.9.3
8 years, 8 months
[rhel7-branch] Fix reuse of encrypted devices on rhel7-branch
by Vratislav Podzimek
These two patches cherry-picked/ported from master fix the issues with reusing
encrypted devices from a previous installation for a new installation.
Vratislav Podzimek (2):
Make the Encrypt checkbox insensitive for encrypted non-BTRFS devices
Set both .format's and .originalFormat's passphrase on unlock
(#1255679)
pyanaconda/ui/gui/spokes/custom.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--
2.1.0
8 years, 8 months
[rhel7-branch] Duplicate VG names are problem even if their disks are ignored (#1198367)
by Vratislav Podzimek
Even if user tells us we should ignore a disk that contains a VG with the same
name as a VG on some not-ignored disk, it is a problem, because LVM has no idea
about our ignored disks and thus fails to do things we need to do. More
precisely, we tell LVM to filter the ignored disk out, but that only leads to it
seeing a VG with no existing or not-ignored PVs which is no-GO for it.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
blivet/devicetree.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 5248c4a..12acf26 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1593,9 +1593,7 @@ class DeviceTree(object):
vg_device.parents.append(device)
else:
same_name = self.getDeviceByName(vg_name)
- if isinstance(same_name, LVMVolumeGroupDevice) and \
- not (all(self._isIgnoredDisk(d) for d in same_name.disks) or
- all(self._isIgnoredDisk(d) for d in device.disks)):
+ if isinstance(same_name, LVMVolumeGroupDevice):
raise DuplicateVGError("multiple LVM volume groups with the same name (%s)" % vg_name)
try:
--
2.1.0
8 years, 8 months
[anaconda][rhel7-branch/master/f23-branch][PATCH] Don't crash if the Japanese PC-98 keyboard is selected (#1190589)
by Martin Kolman
Also add a test case verifying the PC-98 keyboard layout is
parsed correctly.
Resolves: rhbz#1190589
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/keyboard.py | 2 +-
tests/pyanaconda_tests/keyboard_test.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 1f3e572..0c71d3e 100644
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -46,7 +46,7 @@ LOCALED_IFACE = "org.freedesktop.locale1"
# should match and parse strings like 'cz' or 'cz (qwerty)' regardless of white
# space
-LAYOUT_VARIANT_RE = re.compile(r'^\s*(\w+)\s*' # layout plus
+LAYOUT_VARIANT_RE = re.compile(r'^\s*([/\w]+)\s*' # layout plus
r'(?:(?:\(\s*([-\w]+)\s*\))' # variant in parentheses
r'|(?:$))\s*') # or nothing
diff --git a/tests/pyanaconda_tests/keyboard_test.py b/tests/pyanaconda_tests/keyboard_test.py
index 167ba8b..766beff 100644
--- a/tests/pyanaconda_tests/keyboard_test.py
+++ b/tests/pyanaconda_tests/keyboard_test.py
@@ -39,6 +39,11 @@ class ParsingAndJoiningTests(unittest.TestCase):
self.assertEqual(layout, "cz")
self.assertEqual(variant, "")
+ # a valid layout variant spec containing a slash
+ layout, variant = keyboard.parse_layout_variant("nec_vndr/jp")
+ self.assertEqual(layout, "nec_vndr/jp")
+ self.assertEqual(variant, "")
+
# an invalid layout variant spec (missing layout)
with self.assertRaises(keyboard.InvalidLayoutVariantSpec):
layout, variant = keyboard.parse_layout_variant("")
--
2.4.3
8 years, 8 months
[rhel7-branch][PATCH] Make the default screen height yet one line shorter (#1184378)
by Vratislav Podzimek
We need to leave one line for the tmux bar.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/constants_text.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/constants_text.py b/pyanaconda/constants_text.py
index bb0f113..db6376a 100644
--- a/pyanaconda/constants_text.py
+++ b/pyanaconda/constants_text.py
@@ -24,5 +24,6 @@ from pyanaconda.constants import *
INPUT_PROCESSED = None
INPUT_DISCARDED = False
-# default screen height in number of lines (24 lines is the default for serial consoles)
-DEFAULT_SCREEN_HEIGHT = 24
+# default screen height in number of lines (24 lines is the default for serial
+# consoles + 1 line for the tmux bar)
+DEFAULT_SCREEN_HEIGHT = 23
--
2.1.0
8 years, 8 months
[anaconda][all branches] Fix a bash error in kickstart-genrules.sh (#1057271)
by Samantha N. Bueno
Freakin bash.
Resolves: rhbz#1057271
---
dracut/kickstart-genrules.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut/kickstart-genrules.sh b/dracut/kickstart-genrules.sh
index a6972b2..ae9310a 100755
--- a/dracut/kickstart-genrules.sh
+++ b/dracut/kickstart-genrules.sh
@@ -31,7 +31,7 @@ case "${kickstart%%:*}" in
warn "inst.ks: can't get kickstart - biospart (bd:) isn't supported yet"
;;
"")
- if [ -z "$kickstart" -a -n $(getarg ks= inst.ks=) ]; then
+ if [ -z "$kickstart" -a -n "$(getarg ks= inst.ks=)" ]; then
when_diskdev_appears $(disk_to_dev_path LABEL=OEMDRV) \
fetch-kickstart-disk \$env{DEVNAME} "/ks.cfg"
fi
--
2.1.0
8 years, 8 months