summaryrefslogtreecommitdiff
path: root/usr/src/cmd/zoneadmd/vplat.c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2012-11-14 14:53:53 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2012-11-14 14:53:53 +0000
commitb57eecace15a65d90980675c469527c834dbc3ab (patch)
tree5cd99dbed277a380b86644c3bb2d8632ec282274 /usr/src/cmd/zoneadmd/vplat.c
parent29fa89a0a6637a30827183256423ca71429372ef (diff)
downloadillumos-joyent-b57eecace15a65d90980675c469527c834dbc3ab.tar.gz
OS-1697 zoneadmd halt retry timeout should be increased
Diffstat (limited to 'usr/src/cmd/zoneadmd/vplat.c')
-rw-r--r--usr/src/cmd/zoneadmd/vplat.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr/src/cmd/zoneadmd/vplat.c b/usr/src/cmd/zoneadmd/vplat.c
index 9cfb4bd798..415920acb4 100644
--- a/usr/src/cmd/zoneadmd/vplat.c
+++ b/usr/src/cmd/zoneadmd/vplat.c
@@ -137,6 +137,9 @@
#define ALT_MOUNT(mount_cmd) ((mount_cmd) != Z_MNT_BOOT)
+/* Number of times to retry unmounting if it fails */
+#define UMOUNT_RETRIES 30
+
/* a reasonable estimate for the number of lwps per process */
#define LWPS_PER_PROCESS 10
@@ -744,16 +747,16 @@ unmount_filesystems(zlog_t *zlogp, zoneid_t zoneid, boolean_t unmount_cmd)
* a few times before we give up.
*/
fail++;
- if (fail < 16) {
+ if (fail < (UMOUNT_RETRIES - 1)) {
zerror(zlogp, B_FALSE,
"unable to unmount '%s', "
- "retrying in 1 second",
+ "retrying in 2 seconds",
path);
- (void) sleep(1);
- } else if (fail > 17) {
+ (void) sleep(2);
+ } else if (fail > UMOUNT_RETRIES) {
error++;
zerror(zlogp, B_FALSE,
- "unable to unmount '%s'",
+ "unmount of '%s' failed",
path);
free_mnttable(mnts, nmnt);
goto out;