diff options
author | gjelinek <none@none> | 2007-01-03 15:16:33 -0800 |
---|---|---|
committer | gjelinek <none@none> | 2007-01-03 15:16:33 -0800 |
commit | cf6b13d25d313b9fcf3e31d0b5c4bc79e1ad12ed (patch) | |
tree | 5a5db221a8ec43b7dfa15726369817a767a6bf89 /usr/src | |
parent | b9567a85b89c30c8d0194f662f7e1e7fa7ae7cdc (diff) | |
download | illumos-joyent-cf6b13d25d313b9fcf3e31d0b5c4bc79e1ad12ed.tar.gz |
6508068 tmp pool info should not be saved after a dedicated-cpu configuration removed zone rebooting
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/zoneadmd/vplat.c | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/usr/src/cmd/zoneadmd/vplat.c b/usr/src/cmd/zoneadmd/vplat.c index 26fd72ba64..d12c3ac25f 100644 --- a/usr/src/cmd/zoneadmd/vplat.c +++ b/usr/src/cmd/zoneadmd/vplat.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -4039,15 +4039,34 @@ vplat_teardown(zlog_t *zlogp, boolean_t unmount_cmd, boolean_t rebooting) } /* - * If we are rebooting then we don't want to destroy an existing - * temporary pool at this point so that we can just reuse it when the - * zone boots back up. + * If we are rebooting then we normally don't want to destroy an + * existing temporary pool at this point so that we can just reuse it + * when the zone boots back up. However, it is also possible we were + * running with a temporary pool and the zone configuration has been + * modified to no longer use a temporary pool. In that case we need + * to destroy the temporary pool now. This case looks like the case + * where we never had a temporary pool configured but + * zonecfg_destroy_tmp_pool will do the right thing either way. */ - if (!unmount_cmd && !rebooting) { - if ((res = zonecfg_destroy_tmp_pool(zone_name, pool_err, - sizeof (pool_err))) != Z_OK) { - if (res == Z_POOL) - zerror(zlogp, B_FALSE, pool_err); + if (!unmount_cmd) { + boolean_t destroy_tmp_pool = B_TRUE; + + if (rebooting) { + struct zone_psettab pset_tab; + zone_dochandle_t handle; + + if ((handle = zonecfg_init_handle()) != NULL && + zonecfg_get_handle(zone_name, handle) == Z_OK && + zonecfg_lookup_pset(handle, &pset_tab) == Z_OK) + destroy_tmp_pool = B_FALSE; + } + + if (destroy_tmp_pool) { + if ((res = zonecfg_destroy_tmp_pool(zone_name, pool_err, + sizeof (pool_err))) != Z_OK) { + if (res == Z_POOL) + zerror(zlogp, B_FALSE, pool_err); + } } } |