[node-patches] Change in ovirt-node[master]: Make sure empty NFSv4 domains get unset
rbarry at redhat.com
rbarry at redhat.com
Mon Jan 13 16:18:26 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Make sure empty NFSv4 domains get unset
......................................................................
Make sure empty NFSv4 domains get unset
If the transaction for configuring NFSv4 is triggered, assume that
an empty domain should unset the entry (currently, it passes None
and has no effect on the setting).
Change-Id: Ibbcc08b9790cf2939b260b0ebe0a96229b9d6410
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=960833
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/config/defaults.py
M src/ovirt/node/utils/storage.py
2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/31/23231/1
diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index befacfd..4c72467 100644
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -1347,7 +1347,7 @@
def transaction(self):
cfg = dict(self.retrieve())
- domain = cfg["domain"]
+ domain = cfg["domain"] if cfg["domain"] is not None else ""
class ConfigureNfsv4(utils.Transaction.Element):
title = "Setting NFSv4 domain"
diff --git a/src/ovirt/node/utils/storage.py b/src/ovirt/node/utils/storage.py
index 8958b70..d994a5b 100644
--- a/src/ovirt/node/utils/storage.py
+++ b/src/ovirt/node/utils/storage.py
@@ -59,8 +59,8 @@
(current_domain, domain), self.configfilename]
else:
if domain is "":
- cmd = ['sed', '-i', '-c', '/^Domain/ s/.*/#Domain = empty/g' %
- (current_domain, domain), self.configfilename]
+ cmd = ['sed', '-i', '-c', '/^Domain/ s/.*/#Domain = empty/g',
+ self.configfilename]
else:
cmd = ['sed', '-i', '-c', '/^Domain/ s/%s/%s/g' %
(current_domain, domain), self.configfilename]
--
To view, visit http://gerrit.ovirt.org/23231
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbcc08b9790cf2939b260b0ebe0a96229b9d6410
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