[PATCH 1/2] support specifying existing BTRFS subvolumes with noformat
by Gene Czarcinski
Specifying an existing BTRFS subvolume in a kickstart file
is now supported with --noformat. When --noformat is
pecified, the BTRFS subvolume will be added to the /etc/fstab
definition with the UUID of the BTRFS parent volume.
The use of --noformat replaces the use of --useexisting although
currently there is no difference. A test is added just in case
noformat is specified for a BTRFS volume.
This patch was developed against git level anaconda-20-22-1,
built on a Fedora TC1+ system and tested by running
F20-beta-TC2 installation with all repos enabled onto a KVM virtual.
---
pyanaconda/kickstart.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 34929b9..739f716 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -346,13 +346,20 @@ class BTRFSData(commands.btrfs.F17_BTRFSData):
if self.mountpoint != "" and self.mountpoint[0] != '/':
raise KickstartValueError(formatErrorMsg(self.lineno,
msg="The mount point \"%s\" is not valid." % (self.mountpoint,)))
- if self.preexist:
+ if not self.format: # --noformat
+ if not self.subvol:
+ raise KickstartValueError(formatErrorMsg(self.lineno,
msg="Specifying btrfs command for existing volume %s invalid" % self.name))
+
device = devicetree.getDeviceByName(self.name)
if not device:
device = udev.udev_resolve_devspec(self.name)
if not device:
raise KickstartValueError(formatErrorMsg(self.lineno,
msg="Specified nonexistent BTRFS volume %s in btrfs command" % self.name))
+ device.format.mountpoint = self.mountpoint
+ device.format.mountopts = "subvol=%s" % (self.name)
+ device.format.uuid = dev.uuid # use the UUID from the
parent (the BTRFS Volume)
+ return
else:
# If a previous device has claimed this mount point,
delete the
# old one.
--
1.8.3.1
10 years, 8 months
[PATCH 2/2] add support for recreating a btrfs subvolume
by Gene Czarcinski
This patch is intended to implement the BTRFS equivalent of
reformatting a subvolume from a kickstart. That is, a subvolume
is destroyed and then (re)created. As currently implemented this
is a "hack" which only works for a subvolume with the "/"
mountpoint. Once the pykickstart package has been updated
to separate --noformat and --useexisting parameters so that they
can have different meanings, the simple test for "/" can be
removed the the rest of the patch is good.
To invoke this functionality, the user must specify --useexisting
on the btrfs command for the "/" mountpoint. If the subvolume
does not exist, it does not matter and processing will continue.
Again, once pykickstart is updated, this will work for other
subvolumes.
---
pyanaconda/kickstart.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 739f716..7a76f6d 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -346,7 +346,9 @@ class BTRFSData(commands.btrfs.F17_BTRFSData):
if self.mountpoint != "" and self.mountpoint[0] != '/':
raise KickstartValueError(formatErrorMsg(self.lineno,
msg="The mount point \"%s\" is not valid." % (self.mountpoint,)))
- if not self.format: # --noformat
+ # FIXME: The following hack only exists until pykickstart can
be updated to separate
+ # --noformat and --useexisting into separate parameters
so they can have different meanings
+ if not self.format and self.mountpoint != "/": # --noformat
if not self.subvol:
raise KickstartValueError(formatErrorMsg(self.lineno,
msg="Specifying btrfs command for existing volume %s invalid" % self.name))
@@ -370,6 +372,16 @@ class BTRFSData(commands.btrfs.F17_BTRFSData):
except KeyError:
pass
+ # Handle pre-existing subvol to be deleted
+ if self.subvol:
+ device = devicetree.getDeviceByName(self.name)
+ if device:
+ if self.preexist:
+ storage.destroyDevice(device)
+ log.info("As requested by specified --useexisting,
destroying existing BTRFS subvolume %s" % self.name)
+ else:
+ raise
KickstartValueError(formatErrorMsg(self.lineno, msg="Specified BTRFS
subvolume %s already exists, specify --useexisting to recreate" %
self.name))
+
request = storage.newBTRFS(name=name,
subvol=self.subvol,
mountpoint=self.mountpoint,
--
1.8.3.1
10 years, 8 months
[master/f20-branch] DNFPayload: allow enable/disable calls for repos that do not exist.
by Ales Kozumplik
From: Ales Kozumplik <ales(a)redhat.com>
---
pyanaconda/packaging/dnfpayload.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index d0bda57..03354f6 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -285,12 +285,19 @@ class DNFPayload(packaging.PackagePayload):
len(self._base.transaction), self.spaceRequired)
def disableRepo(self, repo_id):
- log.info("Disabling '%s'", repo_id)
- self._base.repos[repo_id].disable()
+ try:
+ self._base.repos[repo_id].disable()
+ log.info("Disabled '%s'", repo_id)
+ except KeyError:
+ pass
super(DNFPayload, self).disableRepo(repo_id)
def enableRepo(self, repo_id):
- self._base.repos[repo_id].enable()
+ try:
+ self._base.repos[repo_id].enable()
+ log.info("Enabled '%s'", repo_id)
+ except KeyError:
+ pass
super(DNFPayload, self).enableRepo(repo_id)
def environmentDescription(self, environmentid):
--
1.8.3.1
10 years, 8 months
[master/f20] Fix the alignment of the Network Time switch (#1019301)
by David Shea
The default for valign and halign is "fill", which matches the rest of
the widgets in the top row of controls, which is what we want. Remove
the alignment overrides which align the NTP switch to the top of the
header box instead of the middle.
---
pyanaconda/ui/gui/spokes/datetime_spoke.glade | 2 --
1 file changed, 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.glade b/pyanaconda/ui/gui/spokes/datetime_spoke.glade
index e5cb6b9..70043a1 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.glade
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.glade
@@ -200,8 +200,6 @@
<object class="GtkSwitch" id="networkTimeSwitch">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="halign">end</property>
- <property name="valign">start</property>
<signal name="notify::active" handler="on_ntp_switched" swapped="no"/>
</object>
<packing>
--
1.8.3.1
10 years, 8 months
[master][PATCH] Grab journal only from the last boot
by Vratislav Podzimek
We are not interested in log messages from previous boots.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/exception.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 5321799..e61cce0 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -259,7 +259,7 @@ def journalctl_callback():
# logs)
anaconda_log_line = re.compile(r"\[%d\]:" % os.getpid())
ret = ""
- for line in iutil.execReadlines("journalctl", []):
+ for line in iutil.execReadlines("journalctl", ["-b"]):
if anaconda_log_line.search(line) is None:
# not an anaconda's message
ret += line + "\n"
--
1.7.11.7
10 years, 8 months
[master][v3] Resolve issue with unremovable swaps
by Vratislav Podzimek
Second attempt on this patch set. It now uses devices instead of formats and
keeps the naming convention in blivet.
Vratislav Podzimek (3):
Make code to get new devices reusable as property
Put only newly created or reformated swaps to the new root
Tell blivet which swaps should appear in the fstab (#1011391)
pyanaconda/kickstart.py | 13 ++++++++++
pyanaconda/ui/gui/spokes/custom.py | 53 ++++++++++++++++++--------------------
2 files changed, 38 insertions(+), 28 deletions(-)
--
1.7.11.7
10 years, 8 months
[rhel6-branch/ACKS_PENDING][PATCH] Fix getDiskPart for nvme devices (#1018703)
by Vratislav Podzimek
From: Václav Pavlín <vpavlin(a)redhat.com>
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
booty/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/booty/util.py b/booty/util.py
index 185c2af..7fd5a72 100644
--- a/booty/util.py
+++ b/booty/util.py
@@ -11,7 +11,7 @@ def getDiskPart(dev, storage):
if (path.startswith('rd/') or path.startswith('ida/') or
path.startswith('cciss/') or path.startswith('sx8/') or
path.startswith('mapper/') or path.startswith('mmcblk') or
- path.startswith('md')):
+ path.startswith('md') or path.startswith('nvme')):
if dev[-2] == 'p':
cut = -2
elif dev[-3] == 'p' and dev[-2] in string.digits:
--
1.7.11.7
10 years, 8 months
[lorax master and f20] arm cleanups, and dtb install, kernel flavour regex fixes
by Dennis Gilmore
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
sorry for the fpaste http://paste.fedoraproject.org/46732/79257913/ but
git send-email is not working for me for some reason. the patches in
the paste fix the regex for a kernel change so that we get PAE and lpae
kernels in the install trees again, something that has been missing from
every F20 compose to date. cleanup the arm templates to remove the no
longer existing kernel flavours. and install the dtb files into the
install trees. if i could get an ack ill push the patches
Dennis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
iQIcBAEBAgAGBQJSXHx9AAoJEH7ltONmPFDRE8EP/1Yq1pRjfTQ5eqQPbvEDfpBS
mk39mZqU4qYarlIDJjSfP7tT5CwvmwOvoCImkV/glAEy+45s6fvx5vl3wofdMPaV
3faOTU+vXmXHrE4cCzCFW+OBTAneZg3fWtxY95D9knGTb176k35T9vBCK2eRCa11
yvRWJOtTaTjZwbOm1N8vcu9Aibn3bOjMtU6YhLCpYNnIzWFNVBXkaJxmrBREOFnz
O29KyEMZZLkqv/ZU1jvlnPsUlebHxFdAeplyYVd0jf8SdvrONlOhmmVYCsXNR2+F
FNrinx9lOpBSMFwQ8ugC/cXX3iOCbRGryoKkKhgXRPGySONM7Hjv6OsL7bTniP0Q
Ty23rYb7PqShRzSiaoEuHZKHclQuZdGnChFxMw7Il2OdPfZkx7CCCRMW/pDnwB1H
RF8SdEn35q7qTfsScCezNc4gMBE6+yyNAK9o9vEDQpp88rotq1mISekId9GYPrhc
XTfAcxLKIOmBGBoUO+i9skaRNMReQ12spaOjlG9zjl+iHk/sJypty2BJExB7l+ue
985JFzEQApwVAYgSvD6rvEIm8v2wqwurzezLNPCdSfBCPqOze5OjS7xlJEXi8skr
9SMw7UhGllC2y6w3xBDatB7fwv7bw5lVvVJpOrCiW8n3cwSLMywsNW8B973Unv5I
geQIMHmXDyaJKdE1MsVJ
=Wd0N
-----END PGP SIGNATURE-----
10 years, 8 months
[master] Tweak and feature
by Vratislav Podzimek
PATCH 1/2 cleans our TUI categories a bit. PATCH 2/2 adds a Shell spoke to
s390(x) installations where we cannot run tmux. I think it is a nice way to let
users go to the shell and do something. And since it appears only in s390(x)
installations, it shouldn't be confusing for people who will enter it. :)
Vratislav Podzimek (2):
Put TUI spokes in common categories
Add shell spoke to s390x installations
pyanaconda/ui/tui/hubs/summary.py | 2 +-
pyanaconda/ui/tui/spokes/network.py | 2 +-
pyanaconda/ui/tui/spokes/shell_spoke.py | 65 +++++++++++++++++++++++++++++++++
pyanaconda/ui/tui/spokes/source.py | 6 +--
pyanaconda/ui/tui/spokes/storage.py | 6 +--
5 files changed, 73 insertions(+), 8 deletions(-)
create mode 100644 pyanaconda/ui/tui/spokes/shell_spoke.py
--
1.7.11.7
10 years, 8 months
[PATCH rhel6-branch] fcoe: rise fipvlan timeout to 100 (#1009691)
by Radek Vykydal
Resolves: rhbz#1009691
---
storage/fcoe.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/storage/fcoe.py b/storage/fcoe.py
index 4fe851e..f6823a8 100644
--- a/storage/fcoe.py
+++ b/storage/fcoe.py
@@ -129,7 +129,7 @@ class fcoe(object):
"e:1", "a:1", "w:1" ],
stdout = "/dev/tty5", stderr="/dev/tty5")
iutil.execWithRedirect("fipvlan", [ "-c", "-s", "-f",
- "-fcoe", nic],
+ "-fcoe", nic, "-l", "100"],
stdout = "/dev/tty5", stderr="/dev/tty5")
else:
if auto_vlan:
@@ -137,7 +137,7 @@ class fcoe(object):
iutil.execWithRedirect("modprobe", ["8021q"],
stdout = "/dev/tty5", stderr="/dev/tty5")
iutil.execWithRedirect("fipvlan", ['-c', '-s', '-f',
- "-fcoe", nic],
+ "-fcoe", nic, "-l", "100"],
stdout = "/dev/tty5", stderr="/dev/tty5")
else:
f = open("/sys/module/libfcoe/parameters/create", "w")
--
1.7.11.7
10 years, 8 months