coren has submitted this change and it was merged.
Change subject: Turn off dry_run, and fix a few small errors.
......................................................................
Turn off dry_run, and fix a few small errors.
- Don't complain about a missing volume if we aren't
going to use it anyway.
- Fix a copy/paste error that broke global volumes.
This was just a copy/paste error.
Change-Id: I7ec4c3a4dd0908270f5b0ab3020c2d56d4fce012
---
M files/ldap/scripts/manage-nfs-volumes-daemon
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
coren: Looks good to me, approved
jenkins-bot: Verified
diff --git a/files/ldap/scripts/manage-nfs-volumes-daemon
b/files/ldap/scripts/manage-nfs-volumes-daemon
index e75b136..c385894 100755
--- a/files/ldap/scripts/manage-nfs-volumes-daemon
+++ b/files/ldap/scripts/manage-nfs-volumes-daemon
@@ -29,7 +29,7 @@
class VolumeManager:
def __init__(self):
# Turn on for testing
- self.dry_run = True
+ self.dry_run = False
# TODO: Pull this info from a configuration file
self.base_dir = '/srv/'
@@ -183,7 +183,8 @@
def update_exports(self, project_name, volume_name, hosts):
if project_name not in self.project_volumes:
- self.log("Unable to set exports for %s, %s because we can't find
it." % (project_name, volume_name))
+ if hosts:
+ self.log("Unable to set exports for %s, %s because we can't
find it." % (project_name, volume_name))
return False
if self.dry_run:
@@ -215,7 +216,7 @@
if "*" in hosts:
# Add a special-case read-only line for this
exportline = "%s
-ro,fsid=%s,subtree_check,async,no_root_squash *\n" % (
- volpath, permissions, fsid)
+ volpath, fsid)
f.write(exportline)
hosts.remove("*")
--
To view, visit https://gerrit.wikimedia.org/r/60228
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ec4c3a4dd0908270f5b0ab3020c2d56d4fce012
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: coren <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits