[rhel6-branch] Revert "Rm device from lvm reject filter if in action list. (#885755)"
by Samantha N. Bueno
Turns out this removes devices needed for installation from the
devicetree, so I'm reverting it now before it's a test blocker.
This reverts commit fc648508ff4715ec5c2a2b1e4f830957088915c9.
Related: rhbz#885755
---
storage/devicelibs/lvm.py | 10 ----------
storage/devicetree.py | 4 ----
2 files changed, 14 deletions(-)
diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py
index 7759e45..82719ef 100644
--- a/storage/devicelibs/lvm.py
+++ b/storage/devicelibs/lvm.py
@@ -100,16 +100,6 @@ def lvm_cc_addFilterRejectRegexp(regexp):
# compoes config once more.
_composeConfig()
-def lvm_cc_removeFilterRejectRegexp(regexp):
- """ Remove a regular expression from the --config string. """
- global config_args_data
- log.debug("lvm filter: removing %s from the reject list", regexp)
- try:
- config_args_data["filterRejects"].remove(regexp)
- except ValueError:
- log.debug("%s wasn't in the reject list", regexp)
- return
-
def lvm_cc_resetFilter():
global config_args, config_args_data
config_args_data["filterRejects"] = []
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 4045cdf..ea9b18b 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -710,10 +710,6 @@ class DeviceTree(object):
for action in self._actions:
log.debug("action: %s" % action)
- # Remove lvm filters for devices we are operating on
- for device in (d for d in self._devices if d.dependsOn(action.device)):
- lvm.lvm_cc_removeFilterRejectRegexp(device.name)
-
for action in self._actions:
log.info("executing action: %s" % action)
if not dryRun:
--
1.8.3.1
9 years, 10 months
[blivet:master] When logging, indicate whether exception was ignored by blivet.
by Anne Mulhern
Other tools examine the log to determine if there was a failure. The
IGNORED flag indicates that, while there was a traceback, blivet felt
able to ignore it, and so the tools should not treat the existance of this
traceback as a sign of failure.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
blivet/storage_log.py | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/blivet/storage_log.py b/blivet/storage_log.py
index 0609d0b..6ee694c 100644
--- a/blivet/storage_log.py
+++ b/blivet/storage_log.py
@@ -46,27 +46,32 @@ def log_method_return(d, retval):
fmt_args = (spaces, classname, methodname, retval)
log.debug(fmt, *fmt_args)
-def log_exception_info(log_func=log.debug, fmt_str=None, fmt_args=None):
+def log_exception_info(log_func=log.debug, fmt_str=None, fmt_args=None, ignored=True):
"""Log detailed exception information.
:param log_func: the desired logging function
:param str fmt_str: a format string for any additional message
:param fmt_args: arguments for the format string
:type fmt_args: a list of str
+ :param bool ignored: True if no action is taken regarding the exception
Note: the logging function indicates the severity level of
this exception according to the calling function. log.debug,
the default, is the lowest level.
+
+ Note: If the ignored flag is set, each line of the exception information
+ is prepended with an 'IGNORED' prefix.
"""
fmt_args = fmt_args or []
(_methodname, depth) = function_name_and_depth()
- spaces = depth * ' '
- log_func("%sCaught exception, continuing.", spaces)
+ indent = depth * ' '
+ prefix = 'IGNORED:' + indent if ignored else indent
+ log_func("%sCaught exception, continuing.", prefix)
if fmt_str:
fmt_str = "%sProblem description: " + fmt_str
- log_func(fmt_str, spaces, *fmt_args)
- log_func("%sBegin exception details.", spaces)
+ log_func(fmt_str, prefix, *fmt_args)
+ log_func("%sBegin exception details.", prefix)
tb = traceback.format_exception(*sys.exc_info())
for line in (l.rstrip() for entry in tb for l in entry.split("\n") if l):
- log_func("%s %s", spaces, line)
- log_func("%sEnd exception details.", spaces)
+ log_func("%s %s", prefix, line)
+ log_func("%sEnd exception details.", prefix)
--
1.9.3
9 years, 10 months
[PATCH] livemedia-creator: Ignore IGNORED errors in anaconda logs
by Brian C. Lane
---
src/sbin/livemedia-creator | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator
index 0fac7e0..47eec2c 100755
--- a/src/sbin/livemedia-creator
+++ b/src/sbin/livemedia-creator
@@ -135,7 +135,11 @@ class LogRequestHandler(SocketServer.BaseRequestHandler):
Check a line to see if it contains an error indicating installation failure
:param str line: log line to check for failure
+
+ If the line contains IGNORED it will be skipped.
"""
+ if "IGNORED" in line:
+ return
simple_tests = ["Traceback (",
"Out of memory:",
"Call Trace:",
--
1.9.3
9 years, 10 months
[anaconda:master] Some patches for a feature request for RHEL 7.1
by Anne Mulhern
They might as well go on master now, since the inhibiting factor was
that GRUB2 was not available with RHEL 6, but it's certainly available w/
current Fedora.
There is an accompanying blivet patch.
mulhern (1):
Patches to allow /boot to be RAID1 with EFI (#791136)
pyanaconda/bootloader.py | 20 ++++++++++----------
pyanaconda/storage_utils.py | 2 +-
pyanaconda/ui/gui/spokes/custom.py | 9 +++++----
3 files changed, 16 insertions(+), 15 deletions(-)
--
1.9.3
9 years, 10 months
[PATCH] Switch error exit codes to 1
by Brian C. Lane
There were several error exits that were still returning 0.
---
anaconda | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/anaconda b/anaconda
index 243ee2b..432d2ab 100755
--- a/anaconda
+++ b/anaconda
@@ -788,7 +788,7 @@ if __name__ == "__main__":
if os.geteuid() != 0:
stdoutLog.error("anaconda must be run as root.")
- sys.exit(0)
+ sys.exit(1)
# see if we're on s390x and if we've got an ssh connection
uname = os.uname()
@@ -820,7 +820,7 @@ if __name__ == "__main__":
if opts.images and opts.dirinstall:
stdoutLog.error("--images and --dirinstall cannot be used at the same time")
- sys.exit(0)
+ sys.exit(1)
elif opts.images:
flags.imageInstall = True
elif opts.dirinstall:
@@ -1127,7 +1127,7 @@ if __name__ == "__main__":
flags.imageInstall = True
except ValueError as e:
stdoutLog.error("error specifying image file: %s", e)
- sys.exit(0)
+ sys.exit(1)
if image_count:
anaconda.storage.setupDiskImages()
--
1.9.3
9 years, 10 months
[blivet:master 0/7] rhbz#1070095 related patches (v2)
by Anne Mulhern
The only patch that was changed (other than according to suggestions),
was "Add a few small tests...".
mulhern (7):
Remove unnecessary fanciness about importing devices.
Do not use udev info to get the name of the device.
Add a few small tests for mdexamine
Add a method to get the uuid of an md array member (#1070095)
Canonicalize mdadm generated UUIDS (#1070095)
Reset the uuid of the mdraid member device from mdexamine info
(#1070095)
Remove always succeeding check from udev_device_get_uuid() (#1070095)
blivet/devicelibs/mdraid.py | 9 +++++++++
blivet/devicetree.py | 11 +++++++---
blivet/udev.py | 31 +++++++++++++++++++---------
tests/devicelibs_test/mdraid_test.py | 39 ++++++++++++++++++++++++++++++++++++
4 files changed, 78 insertions(+), 12 deletions(-)
--
1.9.3
9 years, 10 months
[PATCH] Improving the Anaconda CLI help - final batch
by Martin Kolman
So this patch adds help texts to the remaining Anaconda options.
Again the help texts mostly come from the Wiki with various fixes
but there also some based on independent research such as the help
text for mpathfriendlynames.
All in all before I started cleaning up and documenting the
options, there were 57 of them. Now after the cleanup there are
45 options and all of them have a proper help text. :)
Next on the line is grouping the options to common, CLI-only and boot only
Argparse groups and figuring out what is the best way to generate the Wiki
(and a man page) from the boot option texts.
Martin Kolman (1):
Add help texts for the remaining Anaconda options
anaconda | 32 ++++++++++++++++++++------------
data/anaconda_options.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+), 12 deletions(-)
--
1.9.3
9 years, 10 months
[anaconda][master][PATCH] Import Pykickstart constants directly
by Martin Kolman
As already discussed with Brian on IRC, the patch removes a * import of
Pykickstart constants into the Anaconda constants module and imports
all Pykickstart constants directly where needed.
This should result in more readable & robust code and eliminate the
possibility of some very easy to do mistakes.
Martin Kolman (1):
Import Pykickstart constants directly
anaconda | 2 +-
pyanaconda/constants.py | 4 +---
pyanaconda/packaging/__init__.py | 4 +++-
pyanaconda/packaging/dnfpayload.py | 7 ++++---
4 files changed, 9 insertions(+), 8 deletions(-)
--
1.9.3
9 years, 10 months
[2/2 anaconda] Call setUpBootLoader in custom autopart (#1086811)
by Brian C. Lane
doAutopartition needs stage1_disk to be setup, otherwise it rejects the
existing ESP. At this stage not everything is setup for a clean run of
setUpBootLoader so it needs to be called with the new 'early' keyword so
that it will skip trying to setup stage1_device which would raise an
error because the mountpoint on it hasn't been set yet.
---
anaconda.spec.in | 2 +-
pyanaconda/ui/gui/spokes/custom.py | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 1bb458f..4b73cfb 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -91,7 +91,7 @@ The anaconda package is a metapackage for the Anaconda installer.
%package core
Summary: Core of the Anaconda installer
Requires: dnf >= %{dnfver}
-Requires: python-blivet >= 0.56
+Requires: python-blivet >= 0.58
Requires: python-meh >= %{mehver}
Requires: libreport-anaconda >= 2.0.21-1
Requires: libselinux-python
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 18c1759..5c91069 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2175,6 +2175,9 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._storage_playground.doAutoPart = True
self.clear_errors()
try:
+ # doAutoPartitions needs stage1_disk setup so it will reuse existing partitions
+ self._storage_playground.setUpBootLoader(early=True)
+
doAutoPartition(self._storage_playground, self.data)
except NoDisksError as e:
# No handling should be required for this.
--
1.9.3
9 years, 10 months
[blivet:master 0/7] rhbz#1070095 related patches
by Anne Mulhern
The first two are very minor cleanups.
The third is tests that pass.
The remaining four address two related bugs.
* mdadm formats UUIDs funny, we store UUIDs as strings just as they are
obtained by our tools, so lookup may fail where it should succeed, because
the format of the lookup UUID doesn't match the format with which it was
stored.
* We're making MDRaidMember format objects where the UUID of the device
and the UUID of the array of which it is a member are the same, which is
wrong.
mulhern (7):
Remove unnecessary fanciness about importing devices.
Do not use udev info to get the name of the device.
Add a few small tests for mdexamine
Add a method to get the uuid of an md array member (#1070095)
Canonicalize mdadm generated UUIDS (#1070095)
Reset the uuid of the mdraid member device from mdexamine info
(#1070095)
Remove always succeeding check from udev_device_get_uuid() (#1070095)
blivet/devicelibs/mdraid.py | 9 +++++++++
blivet/devicetree.py | 11 ++++++++---
blivet/udev.py | 17 ++++++++---------
tests/devicelibs_test/mdraid_test.py | 24 ++++++++++++++++++++++++
4 files changed, 49 insertions(+), 12 deletions(-)
--
1.9.3
9 years, 10 months