New: [rhinstaller/blivet/pulls/78 rhel7-branch] Fix "anaconda hangs while trying to discover iscsi..." (#1166652)
by dashea
This was 2 errors in one.
First problem: anaconda freeze for some time.
Second problem: libiscsi was run on thread and libiscsi the library
is not thread safe.
Anaconda freeze is because of GIL is taken on library thread which is
trying to connect to server.
The thread safe problem is because libiscsi is using signals internally
which were delivered to another thread (this is hard to solve in python
threads...). Solution is to start discover method on new process.
So new process is now created to call libiscsi discover_sendtargets
method. This should fix both problems.
--
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/78
9 years, 1 month
[blivet][master] Fixes for master changes
by Vratislav Podzimek
The first two patches are fixes for recent changes on blivet's master branch,
the third one is something I've been keeping hitting for long enough to make me
patch it.
Vratislav Podzimek (3):
Do not try to stat FileDevice's path if it doesn't exist
Add back DeviceTree's support for saving LUKS passphrases
Do not try importing hidden/backup files as formats
blivet/blivet.py | 3 +--
blivet/devices/file.py | 2 +-
blivet/devicetree.py | 5 +++++
blivet/formats/__init__.py | 2 +-
blivet/populator.py | 7 +++++++
5 files changed, 15 insertions(+), 4 deletions(-)
--
2.1.0
9 years, 1 month
[PATCH rhel7-branch] Implement the new reqpart command.
by Chris Lumens
Resolves: rhbz#1164660
---
pyanaconda/kickstart.py | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 0d722d1..0b72ada 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -27,6 +27,7 @@ from blivet.devicelibs import swap as swap_lib
from blivet.formats import getFormat
from blivet.partitioning import doPartitioning
from blivet.partitioning import growLVM
+from blivet.platform import platform
from blivet.errors import StorageError, BTRFSValueError
from blivet.size import Size
from blivet import udev
@@ -1465,6 +1466,28 @@ class RepoData(commands.repo.RHEL7_RepoData):
commands.repo.RHEL7_RepoData.__init__(self, *args, **kwargs)
+class ReqPart(commands.reqpart.RHEL7_ReqPart):
+ def execute(self, storage, ksdata, instClass):
+ from blivet.partitioning import doReqPartition
+
+ if not self.reqpart:
+ return
+
+ reqs = platform.setPlatformBootloaderReqs()
+ if self.addBoot:
+ bootPartition = platform.setPlatformBootPartition()
+
+ # blivet doesn't know this - anaconda sets up the default boot fstype
+ # in various places in this file, as well as in setDefaultPartitioning
+ # in the install classes. We need to duplicate that here.
+ for part in bootPartition:
+ if part.mountpoint == "/boot":
+ part.fstype = storage.defaultBootFSType
+
+ reqs += bootPartition
+
+ doReqPartition(storage, reqs)
+
class RootPw(commands.rootpw.F18_RootPw):
def execute(self, storage, ksdata, instClass, users):
if not self.password and not flags.automatedInstall:
@@ -1725,6 +1748,7 @@ commandMap = {
"partition": Partition,
"raid": Raid,
"realm": Realm,
+ "reqpart": ReqPart,
"rootpw": RootPw,
"selinux": SELinux,
"services": Services,
@@ -1937,6 +1961,7 @@ def doKickstartStorage(storage, ksdata, instClass):
ksdata.bootloader.execute(storage, ksdata, instClass)
ksdata.autopart.execute(storage, ksdata, instClass)
+ ksdata.reqpart.execute(storage, ksdata, instClass)
ksdata.partition.execute(storage, ksdata, instClass)
ksdata.raid.execute(storage, ksdata, instClass)
ksdata.volgroup.execute(storage, ksdata, instClass)
--
2.2.2
9 years, 1 month
[anaconda][master][PATCH] Sort disks by name when checking disk selection
by Vratislav Podzimek
Not sure about what Python 2 makes up to sort the disks, but Python 3 complains
about DiskDevice objects being unsortable. Making the use of name as the key
explicit is however good no matter which python we are using.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/lib/disks.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/lib/disks.py b/pyanaconda/ui/lib/disks.py
index 0febf85..9264360 100644
--- a/pyanaconda/ui/lib/disks.py
+++ b/pyanaconda/ui/lib/disks.py
@@ -106,7 +106,7 @@ def checkDiskSelection(storage, selected_disks):
errors = []
for name in selected_disks:
selected = storage.devicetree.getDeviceByName(name, hidden=True)
- related = sorted(storage.devicetree.getRelatedDisks(selected))
+ related = sorted(storage.devicetree.getRelatedDisks(selected), key=lambda d: d.name)
missing = [r.name for r in related if r.name not in selected_disks]
if missing:
errors.append(P_("You selected disk %(selected)s, which contains "
--
2.1.0
9 years, 1 month