Andrew Bogott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/49916
Change subject: Fix a bug with orphan volume tracking
......................................................................
Fix a bug with orphan volume tracking
In a previous patch I was accidentally popping items from
project_volumes which was preventing us from distinguishing
between changed anad unchanged projects.
Change-Id: If3b639726a667b4d70f59a1b3ec49a80961d1478
---
M files/ldap/scripts/manage-volumes
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/16/49916/1
diff --git a/files/ldap/scripts/manage-volumes
b/files/ldap/scripts/manage-volumes
index 0c7ab0f..d583413 100755
--- a/files/ldap/scripts/manage-volumes
+++ b/files/ldap/scripts/manage-volumes
@@ -62,7 +62,7 @@
volumedata = self.ssh_exec_command('sudo gluster volume info',
True, True)
project_hosts = self.get_hosts(hostdata)
project_volumes = self.get_volumes(volumedata)
- orphan_volumes = project_volumes
+ orphan_volumes = project_volumes.keys()
for project in projectdata:
project_name = project[1]["cn"][0]
hosts = []
@@ -97,7 +97,7 @@
continue
if project_volume in orphan_volumes:
- orphan_volumes.pop(project_volume)
+ orphan_volumes.remove(project_volume)
gluster_hosts = []
if project_volume in project_volumes and
'auth.allow' in project_volumes[project_volume]:
@@ -121,7 +121,7 @@
self.setallow(project_name,volume_name,[])
# TODO: Unshare and stop deleted projects
- for orphan in orphan_volumes.keys():
+ for orphan in orphan_volumes:
for volume_name in self.volume_names:
if orphan.endswith(volume_name):
self.log("Volume %s seems to lack a
project and may need cleanup." % orphan)
--
To view, visit https://gerrit.wikimedia.org/r/49916
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If3b639726a667b4d70f59a1b3ec49a80961d1478
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits