New: [rhinstaller/anaconda/pulls/166 rhel7-branch] fix inst.ks.sendmac for static ip=XXX
by dashea
inst.ks.sendmac is supposed to make us send HTTP headers of the form:
X-RHN-Provisioning-MAC-1: <MAC ADDRESS OF NIC #1>
X-RHN-Provisioning-MAC-2: <MAC ADDRESS OF NIC #2>
[...]
along with the kickstart request.
This implies that we have to wait until after all modules are loaded
(i.e. all the NICs are visible) before we can add these headers and send
the kickstart request. So commit 35a93dd moved the header setup bit to
the `initqueue/settled` hook.
It turns out there's a race here: the actual kickstart fetch happens in
the `initqueue/online` hook, which runs as soon as a NIC comes online.
If you're using DHCP it takes a few network roundtrips before a NIC is
considered 'online', so this usually happens after udev is settled.
But: with a static IP config your NIC might be 'online' before udev is
settled. Which means we haven't set up the HTTP headers yet, and they
don't get sent.
This commit makes fetch-kickstart-net.sh actually just *schedule* the
kickstart to be fetched in the initqueue:
* if inst.ks.sendmac is enabled, it goes into initqueue/settled (where
it will happen after anaconda-ks-sendheaders.sh because they run in
alphanumeric order).
* otherwise, it is added to the normal initqueue, where it will run in
the next pass of the loop.
NOTE: it could be argued that we should move *any* HTTP operations after
anaconda-ks-sendheaders.sh, but AFAICT the documentation only specifies
that the request for the *kickstart* will contain these headers.
Resolves: rhbz#1190115
(cherry picked from commit e083bbcaf1a39464927ac17c9e34f14795ae6b36)
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/166
8 years, 10 months
[PATCH blivet rhel7-branch] Add support for specifying arbitrary mkfs options.
by Chris Lumens
While we have support for fsprofile, that is only supported by the
various ext* filesystems. We have no way to support passing options for
any of the other filesystems, including the default in RHEL.
Resolves: rhbz#1220898
---
blivet/formats/__init__.py | 19 +++++++++++++++----
blivet/formats/fs.py | 5 +++++
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/blivet/formats/__init__.py b/blivet/formats/__init__.py
index 55fc626..01fdbb8 100644
--- a/blivet/formats/__init__.py
+++ b/blivet/formats/__init__.py
@@ -185,6 +185,7 @@ class DeviceFormat(ObjectID):
self.uuid = kwargs.get("uuid")
self.exists = kwargs.get("exists")
self.options = kwargs.get("options")
+ self._createOptions = kwargs.get("createOptions")
# don't worry about existence if this is a DeviceFormat instance
#if self.__class__ is DeviceFormat:
@@ -194,14 +195,16 @@ class DeviceFormat(ObjectID):
s = ("%(classname)s instance (%(id)s) object id %(object_id)d--\n"
" type = %(type)s name = %(name)s status = %(status)s\n"
" device = %(device)s uuid = %(uuid)s exists = %(exists)s\n"
- " options = %(options)s supported = %(supported)s"
+ " options = %(options)s\n"
+ " createOptions = %(createOptions)s supported = %(supported)s"
" formattable = %(format)s resizable = %(resize)s\n" %
{"classname": self.__class__.__name__, "id": "%#x" % id(self),
- "object_id": self.id,
+ "object_id": self.id, "createOptions": self.createOptions,
"type": self.type, "name": self.name, "status": self.status,
"device": self.device, "uuid": self.uuid, "exists": self.exists,
"options": self.options, "supported": self.supported,
- "format": self.formattable, "resize": self.resizable})
+ "format": self.formattable, "resize": self.resizable,
+ "createOptions": self.createOptions})
return s
@property
@@ -223,7 +226,7 @@ class DeviceFormat(ObjectID):
d = {"type": self.type, "name": self.name, "device": self.device,
"uuid": self.uuid, "exists": self.exists,
"options": self.options, "supported": self.supported,
- "resizable": self.resizable}
+ "resizable": self.resizable, "createOptions": self.createOptions}
return d
@classmethod
@@ -293,6 +296,14 @@ class DeviceFormat(ObjectID):
options = property(_getOptions, _setOptions)
+ def _setCreateOptions(self, options):
+ self._setupCreateOptions = options # pylint: disable=attribute-defined-outside-init
+
+ def _getCreateOptions(self):
+ return self._createOptions
+
+ createOptions = property(_getCreateOptions, _setCreateOptions)
+
def _setDevice(self, devspec):
if devspec and not devspec.startswith("/"):
raise ValueError("device must be a fully qualified path")
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 6981a10..2784fbe 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -24,6 +24,7 @@
""" Filesystem classes. """
from decimal import Decimal
import os
+import shlex
import tempfile
from . import fslabeling
@@ -402,6 +403,9 @@ class FS(DeviceFormat):
else:
log.warning("Choosing not to apply label (%s) during creation of filesystem %s. Label format is unacceptable for this filesystem.", self.label, self.type)
+ if self.createOptions:
+ argv.extend(shlex.split(self.createOptions))
+
argv.append(self.device)
return argv
@@ -930,6 +934,7 @@ class FS(DeviceFormat):
else:
data.fsopts = ""
+ data.mkfsopts = self.createOptions or ""
data.fsprofile = self.fsprofile or ""
class Ext2FS(FS):
--
2.4.3
8 years, 10 months
[rhel7-branch] Create and use early snapshot of storage
by Vratislav Podzimek
We used the same trick on f22-branch and it resolved many issues there. Here it
fixes at least two reported bugs and a number of unreported.
Vratislav Podzimek (3):
Prevent any changes in the StorageSpoke if just going back
Implement the class for storage snapshots
Create and use snapshot of on-disk storage with no modifications
pyanaconda/storage_utils.py | 65 +++++++++++++++++++++++++++++
pyanaconda/ui/gui/spokes/storage.py | 82 +++++++++++++++++++++++++++++--------
2 files changed, 129 insertions(+), 18 deletions(-)
--
2.1.0
8 years, 10 months
[rhel7-branch] Two fixes for printing long widgets in TUI
by Vratislav Podzimek
We need to better handle screen height, decrease the default value because of
serial consoles and do a better job when counting printed and missing lines.
Vratislav Podzimek (2):
Improve how we set the default screen height in text mode (#1184378)
Fix the line counting when printing long widgets
pyanaconda/constants_text.py | 3 +++
pyanaconda/ui/tui/simpleline/base.py | 17 +++++++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
--
2.1.0
8 years, 10 months