Yuvipanda has submitted this change and it was merged.
Change subject: Labs: Remove reboot-if-idmap
......................................................................
Labs: Remove reboot-if-idmap
The script reboot-if-idmap was needed for interactively disabling
idmap. With that task resolved, it has no purpose anymore.
Bug: T95555
Change-Id: I19f5734c6290ca3175f33f0a561ee48f7bcb9b06
---
D files/nfs/reboot-if-idmap
M manifests/role/labs.pp
2 files changed, 2 insertions(+), 54 deletions(-)
Approvals:
Yuvipanda: Verified; Looks good to me, approved
coren: Looks good to me, but someone else must approve
diff --git a/files/nfs/reboot-if-idmap b/files/nfs/reboot-if-idmap
deleted file mode 100644
index 2cccadf..0000000
--- a/files/nfs/reboot-if-idmap
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /bin/bash
-#
-# This simply tries to create a test file in /home
-# and chown it to a numeric UID known to not exist
-# on the labstore - this is known to fail iff
-# idmap is currently enabled.
-#
-
-testfile="/home/._._testfile"
-
-if [ -e $testfile ]; then
- echo "$testfile: already exists\n"
- exit 1
-fi
-
-trap "rm -f $testfile" 0
-
-if ! touch $testfile 2>/dev/null; then
- echo "$testfile: unable to create\n"
- exit 1
-fi
-
-if ! chown 456 $testfile 2>/dev/null; then
- # UID 456 picked because known to not be on labstore
-
- # Rather than reboot outright, try to unmount the NFS
- # filesystems and unload the kernel module. This will
- # fail if anything is using NFS but will prevent a
- # needless reboot for instances that aren't actually
- # using it at this time.
-
- if /bin/umount -a -t nfs 2>/dev/null; then
- if /sbin/rmmod nfs 2>/dev/null; then
- if /sbin/modprobe nfs 2>/dev/null; then
- if /bin/mount -a -t nfs 2>/dev/null; then
- echo "skipped - was able to reload the module"
- exit 1
- fi
- fi
- fi
- fi
-
- /sbin/reboot
- echo "rebooting"
- exit 0
-fi
diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index dfeb2b7..b690c43 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -167,15 +167,9 @@
ensure => absent,
}
- # This short script allows verifying whether an instance uses
- # idmap and will reboot it if it does. It's meant to be invoked
- # by salt, not automatically.
-
+ # TODO: Remove after Puppet cycle.
file { '/usr/local/sbin/reboot-if-idmap':
- ensure => present,
- owner => root,
- mode => '0555',
- source => 'puppet:///files/nfs/reboot-if-idmap',
+ ensure => absent,
}
# In production, we try to be punctilious about having Puppet manage
--
To view, visit https://gerrit.wikimedia.org/r/227492
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I19f5734c6290ca3175f33f0a561ee48f7bcb9b06
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt <[email protected]>
Gerrit-Reviewer: Yuvipanda <[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