[node-patches] Change in ovirt-node[master]: If booted from PXE, don't filter live devices
rbarry at redhat.com
rbarry at redhat.com
Thu May 1 15:07:56 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: If booted from PXE, don't filter live devices
......................................................................
If booted from PXE, don't filter live devices
With other cases covered, stop filtering disks when we're PXE.
Assume that we're PXE if there's a BOOTIF argument, as this is
typically added by pxelinux and is not otherwise set
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=882846
Change-Id: I38c3316fcf7d9eb06f030b8ebc5319389278eca0
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/utils/storage.py
1 file changed, 12 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/08/27308/1
diff --git a/src/ovirt/node/utils/storage.py b/src/ovirt/node/utils/storage.py
index 5792af4..1b784ca 100644
--- a/src/ovirt/node/utils/storage.py
+++ b/src/ovirt/node/utils/storage.py
@@ -108,11 +108,18 @@
if self._cached_live_disk_name:
return self._cached_live_disk_name
- from ovirtnode.ovirtfunctions import get_live_disk
- name = get_live_disk()
- if not "/dev/mapper" in name:
- # FIXME explain ...
- name = "/dev/%s" % name.rstrip('0123456789')
+ from ovirt.node.utils import system
+ args = [x for x in system.kernel_cmdline_arguments.keys() if
+ x.startswith("BOOTIF")]
+ if args:
+ # We're PXE, don't filter anything
+ name = ""
+ else:
+ from ovirtnode.ovirtfunctions import get_live_disk
+ name = get_live_disk()
+ if not "/dev/mapper" in name:
+ # FIXME explain ...
+ name = "/dev/%s" % name.rstrip('0123456789')
self._cached_live_disk_name = name
return name
--
To view, visit http://gerrit.ovirt.org/27308
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I38c3316fcf7d9eb06f030b8ebc5319389278eca0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list