Madhuvishy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/306280

Change subject: labstore: Change nfs mount removal logic to not declaring it as 
file resource
......................................................................

labstore: Change nfs mount removal logic to not declaring it as file resource

Declaring the mount path as file resource and marking it absent, causes puppet 
to
error out if the file resource is redeclared in another place. Making this an 
exec
works around the problem.

Change-Id: I65c4efc17b8673b8c61f786449d50d7808962a1b
---
M modules/labstore/manifests/nfs_mount.pp
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/80/306280/1

diff --git a/modules/labstore/manifests/nfs_mount.pp 
b/modules/labstore/manifests/nfs_mount.pp
index 2df2202..36c57ac 100644
--- a/modules/labstore/manifests/nfs_mount.pp
+++ b/modules/labstore/manifests/nfs_mount.pp
@@ -117,12 +117,13 @@
         mount { $mount_path:
             ensure  => absent,
             require => Exec["cleanup-${mount_path}"],
+            notify  => Exec["remove-${mount_path}"],
         }
 
-        file { $mount_path:
-            ensure  => absent,
-            force   => true,
-            require => Mount[$mount_path],
+        exec { "remove-${mount_path}":
+            command   => "/usr/bin/timeout -k 5s 10s /bin/rm -rf 
${mount_path}",
+            refreshonly => true,
+            logoutput => true,
         }
     }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/306280
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65c4efc17b8673b8c61f786449d50d7808962a1b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Madhuvishy <mviswanat...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to