[PATCH 1/5] Reorganize run_kickstart_tests.sh a bit to use parallel.
by Chris Lumens
Turns out it wasn't as hard as I'd thought it would be.
Also note that for now I am still restricting the number of jobs running
in parallel to two, because each needs a lot of memory and I don't want to
assume too much about the test host. I am open to ideas about better ways
to do this.
---
tests/kickstart_tests/run_kickstart_tests.sh | 62 ++++++++++++++--------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/tests/kickstart_tests/run_kickstart_tests.sh b/tests/kickstart_tests/run_kickstart_tests.sh
index 613ebe6..39c9d34 100755
--- a/tests/kickstart_tests/run_kickstart_tests.sh
+++ b/tests/kickstart_tests/run_kickstart_tests.sh
@@ -38,13 +38,25 @@ if [[ ! -e "${IMAGE}" ]]; then
exit 77
fi
-run() {
- tmpdir=$1
- ks=$2
+runone() {
+ img=$1
+ t=$2
+
+ ks=${t/.sh/.ks}
+ . $t
+
+ echo ${ks}
+ echo ==============================
+
+ # qemu user needs to be able to read the directory.
+ tmpdir=$(mktemp -d --tmpdir=/var/tmp)
+ chmod 755 ${tmpdir}
ksfile=$(prepare ${ks} ${tmpdir})
if [[ $? != 0 ]]; then
echo Test prep failed: ${ksfile}
+ rm -rf ${tmpdir}
+ unset kernel_args prep validate
return 1
fi
@@ -55,7 +67,7 @@ run() {
livemedia-creator ${kargs} \
--make-disk \
- --iso "${IMAGE}" \
+ --iso "${img}" \
--ks ${ksfile} \
--tmp ${tmpdir} \
--logfile ${tmpdir}/livemedia.log \
@@ -67,6 +79,8 @@ run() {
--vnc vnc
if [[ $? != 0 ]]; then
echo $(grep CRIT ${tmpdir}/virt-install.log)
+ rm -rf ${tmpdir}
+ unset kernel_args prep validate
return 1
elif [[ -f ${tmpdir}/livemedia.log ]]; then
img=$(grep disk_img ${tmpdir}/livemedia.log | cut -d= -f2)
@@ -74,48 +88,34 @@ run() {
if [[ ! -f ${trimmed} ]]; then
echo Disk image ${trimmed} does not exist.
+ rm -rf ${tmpdir}
+ unset kernel_args prep validate
return 1
fi
validate ${trimmed}
if [[ $? != 0 ]]; then
echo FAILED
+ rm -rf ${tmpdir}
+ unset kernel_args prep validate
return 1
elif [[ "${result}" != "SUCCESS" ]]; then
echo ${result}
+ rm -rf ${tmpdir}
+ unset kernel_args prep validate
return 1
fi
fi
echo SUCCESS
+ rm -rf ${tmpdir}
+ unset kernel_args prep validate
return 0
}
-status=0
-for t in kickstart_tests/*sh; do
- # Skip this file, and also provide a way to skip tests by only running
- # those that are executable.
- if [[ $t == "kickstart_tests/run_kickstart_tests.sh" || ! -x $t ]]; then
- continue
- fi
-
- ks=${t/.sh/.ks}
- . $t
-
- echo ${ks}
- echo ==============================
-
- # qemu user needs to be able to read the directory.
- tmpdir=$(mktemp -d --tmpdir=/var/tmp)
- chmod 755 ${tmpdir}
-
- run ${tmpdir} ${ks}
- if [[ $? = 1 ]]; then
- status=1
- fi
-
- rm -rf ${tmpdir}
- unset kernel_args prep validate
-done
+export -f runone
-exit ${status}
+# Round up all the kickstart tests we want to run, skipping those that are not
+# executable as well as this file itself.
+find kickstart_tests -name '*sh' -a -perm -o+x -a \! -wholename 'kickstart_tests/run_kickstart_tests.sh' | \
+parallel --jobs 2 runone ${IMAGE} {}
--
1.9.3
9 years, 4 months
[blivet:master 0/6] Some patches for formats package.
by Anne Mulhern
Things I ran across while working on tasks refactoring.
Use correct package... is dead obvious. Tests never hit it, because there
is a guard in writeLabel() that prevents that code path from executing.
Pylint never saw it because of the unfortunate choice of fs for a parameter.
Both of those problems should be fixed, but they already are as a side-effect
of other changes in my tasks branch, and I don't want any more rebasing
headaches.
Change allowDirty to False...is a no brainer.
Eliminate dirtyCB parameter...should not be too controversial and makes
next patch a bit easier.
Factor out calculation...shouldn't be too hard to accept.
The last two are really desirable as they ease refactoring in my tasks branch
a good deal. Otherwise, I get to spend a lot of time disentanglishing dirty
calculation from minimum size calculation, and if those dirty and error
values are never used, as they aren't in existing anaconda set up, that
would be a depressing task.
mulhern (6):
Use correct package for FSError.
Change allowDirty to False (from None).
Eliminate dirtyCB parameter from mountExistingSystem() params.
Factor out calculation of dirtyDevices and be less eager in
calculating.
Remove allowDirty parameter and dependent code.
Remove needsFSCheck() and what only it depends on.
blivet/__init__.py | 27 +--------------------------
blivet/formats/fs.py | 21 ---------------------
blivet/formats/fslabel.py | 2 +-
tests/formats_test/fstesting.py | 1 -
4 files changed, 2 insertions(+), 49 deletions(-)
--
1.9.3
9 years, 4 months
[PATCH rhel7-branch] Mount efivarfs under /mnt/sysimage on appropriate platforms
by Peter Jones
Bug 1129435 was fixed in the efibootmgr code, but that code only works
if we've got the newer kernel interface available, which requires
mounting it. If we don't mount it, we hit the old code path, which
doesn't allow us to create device paths > 1024 bytes.
Signed-off-by: Peter Jones <pjones(a)redhat.com>
---
blivet/__init__.py | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index d7758f7..b1df1eb 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -91,6 +91,7 @@ from . import util
from . import arch
from .flags import flags
from .platform import platform as _platform
+from .platform import EFI
from .size import Size
from .i18n import _
@@ -2431,6 +2432,7 @@ class FSSet(object):
self._devshm = None
self._usb = None
self._selinux = None
+ self._efivars = None
self._run = None
self._fstab_swaps = set()
self.preserveLines = [] # lines we just ignore and preserve
@@ -2481,6 +2483,12 @@ class FSSet(object):
return self._selinux
@property
+ def efivars(self):
+ if not self._efivars:
+ self._efivars = NoDevice(fmt=getFormat("efivarfs", device="efivarfs", mountpoint="/sys/firmware/efi/efivars"))
+ return self._efivars
+
+ @property
def run(self):
if not self._run:
self._run = DirectoryDevice("/run",
@@ -2557,7 +2565,8 @@ class FSSet(object):
device=device.path,
exists=True)
elif mountpoint in ("/proc", "/sys", "/dev/shm", "/dev/pts",
- "/sys/fs/selinux", "/proc/bus/usb"):
+ "/sys/fs/selinux", "/proc/bus/usb",
+ "/sys/firmware/efi/efivars"):
# drop these now -- we'll recreate later
return None
else:
@@ -2725,6 +2734,8 @@ class FSSet(object):
devices = list(self.mountpoints.values()) + self.swapDevices
devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
self.proc, self.selinux, self.usb, self.run])
+ if isinstance(_platform, EFI):
+ devices.append(self.efivars)
devices.sort(key=lambda d: getattr(d.format, "mountpoint", None))
for device in devices:
@@ -2782,6 +2793,8 @@ class FSSet(object):
devices = list(self.mountpoints.values()) + self.swapDevices
devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
self.proc, self.usb, self.selinux, self.run])
+ if isinstance(_platform, EFI):
+ devices.append(self.efivars)
devices.sort(key=lambda d: getattr(d.format, "mountpoint", None))
devices.reverse()
for device in devices:
--
2.1.0
9 years, 4 months
[firstboot][rhel7][PATCH] Fix exception handler (#952633)
by Martin Kolman
A missing namedtuple import was preventing the exception handler from
working correctly.
Related: rhbz#952633
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
progs/firstboot | 2 ++
1 file changed, 2 insertions(+)
diff --git a/progs/firstboot b/progs/firstboot
index f690a86..8e45f25 100755
--- a/progs/firstboot
+++ b/progs/firstboot
@@ -27,6 +27,8 @@ import sys
import tempfile
import traceback
+from collections import namedtuple
+
import firstboot.frontend
import firstboot.loader
--
1.9.3
9 years, 4 months
[anaconda][master][v2][PATCH] Use anaconda-user-help package
by Martin Kolman
The "nuke it from orbit" edition!
As a change from V1, it also removes all traces of the late data/help directory
and its contents.
Martin Kolman (1):
Use the anaconda-user-help package for help content
Makefile.am | 29 +++----------------------
anaconda.spec.in | 3 ++-
configure.ac | 2 --
data/Makefile.am | 2 +-
data/help/Makefile.am | 21 ------------------
data/help/en-US/FedoraPlaceholder.html | 5 -----
data/help/en-US/FedoraPlaceholderWithLinks.html | 13 -----------
data/help/en-US/Makefile.am | 26 ----------------------
data/help/en-US/RHEL7Placeholder.html | 5 -----
data/help/en-US/RHEL7PlaceholderWithLinks.html | 11 ----------
10 files changed, 6 insertions(+), 111 deletions(-)
delete mode 100644 data/help/Makefile.am
delete mode 100644 data/help/en-US/FedoraPlaceholder.html
delete mode 100644 data/help/en-US/FedoraPlaceholderWithLinks.html
delete mode 100644 data/help/en-US/Makefile.am
delete mode 100644 data/help/en-US/RHEL7Placeholder.html
delete mode 100644 data/help/en-US/RHEL7PlaceholderWithLinks.html
--
1.9.3
9 years, 4 months
[rhel7] Don't install langpacks.conf if nowhere to install to (#1172004)
by David Shea
Some installations don't install yum. Some installations don't really
care about the langpacks config.
Resolves: rhbz#1172004
---
pyanaconda/packaging/yumpayload.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 4b038ec..19eb0fd 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -255,8 +255,15 @@ class YumPayload(PackagePayload):
f.write("langpack_locales = %s\n" % ", ".join(langs))
def _copyLangpacksConfigToTarget(self):
- shutil.copy2(_yum_installer_langpack_conf,
- iutil.getSysroot()+_yum_target_langpack_conf)
+ target_langpack_conf = iutil.getSysroot() + _yum_target_langpack_conf
+
+ # The directory for the config may not exist if yum was not installed
+ # to the target. If this is the case, skip installing the config.
+ if not os.path.exists(os.path.dirname(target_langpack_conf)):
+ log.debug("langpack directory not found, not copying langpacks.conf to taget")
+ else:
+ shutil.copy2(_yum_installer_langpack_conf,
+ target_langpack_conf)
def _writeYumConfig(self):
""" Write out anaconda's main yum configuration file. """
--
2.1.0
9 years, 4 months
[PATCH] LVMFactory: raise exception when adding LV to full fixed size VG (#1170660)
by Vojtěch Trefný
---
blivet/devicefactory.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index e720fbd..03b7aaf 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -1134,6 +1134,9 @@ class LVMFactory(DeviceFactory):
if self.device:
self.size += self.device.size
+
+ if self.size == 0:
+ raise DeviceFactoryError("not enough free space for new device")
else:
super(LVMFactory, self)._handle_no_size()
--
2.1.0
9 years, 4 months
[master] Remove Requires: python-nss
by Vratislav Podzimek
We don't seem to require it anymore.
Related: rhbz#1014220
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
anaconda.spec.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 75a919f..e0ebd55 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -110,7 +110,6 @@ Requires: util-linux >= %{utillinuxver}
Requires: dbus-python
Requires: python-pwquality
Requires: python-IPy
-Requires: python-nss
Requires: pytz
Requires: realmd
Requires: teamd
--
1.9.3
9 years, 4 months
[anaconda][master][PATCH] Switch to the help content package
by Martin Kolman
The new separate help content package (anaconda-user-help) has just been
added to Rawhide after realatively smooth sailing through the review process. :)
So it is time to dump our "provisional" help packaging code overboard and use the package instead. :)
Martin Kolman (1):
Use the anaconda-user-help package for help content
Makefile.am | 29 +++----------------------
anaconda.spec.in | 3 ++-
data/help/en-US/FedoraPlaceholder.html | 5 -----
data/help/en-US/FedoraPlaceholderWithLinks.html | 13 -----------
data/help/en-US/Makefile.am | 6 -----
data/help/en-US/RHEL7Placeholder.html | 5 -----
data/help/en-US/RHEL7PlaceholderWithLinks.html | 11 ----------
7 files changed, 5 insertions(+), 67 deletions(-)
delete mode 100644 data/help/en-US/FedoraPlaceholder.html
delete mode 100644 data/help/en-US/FedoraPlaceholderWithLinks.html
delete mode 100644 data/help/en-US/RHEL7Placeholder.html
delete mode 100644 data/help/en-US/RHEL7PlaceholderWithLinks.html
--
1.9.3
9 years, 4 months
[PATCH] Fix which TUI field is being checked for which input (#1169533)
by David Shea
The index used by EditTUISpoke.input() is into the fields visible to the
user, so always use visible_fields.
---
pyanaconda/ui/tui/spokes/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index ff5c88c..79292bc 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -301,9 +301,9 @@ class EditTUISpoke(NormalTUISpoke):
try:
idx = int(key) - 1
if idx >= 0 and idx < len(self.visible_fields):
- if self.edit_fields[idx].aux == self.CHECK:
+ if self.visible_fields[idx].aux == self.CHECK:
setdeepattr(self.args, self.visible_fields[idx].attribute,
- not getdeepattr(self.args, self.edit_fields[idx][1]))
+ not getdeepattr(self.args, self.visible_fields[idx][1]))
self.app.redraw()
self.apply()
else:
--
2.1.0
9 years, 4 months