Solaris 10 container graceful shutdown?

Hi,
I've got a UPS connected to my Solaris 10 machine and I'm planning to run containers/zones on there.
At the moment if the UPS agent sends the signal to the solaris machine to shutdown, all the apps shutdown gracefully and then the host goes down.

If I setup containers for the apps, does anyone know if they will shutdown gracefully if the host gets the shutdown signal or will they just halt or what happens?

I dont have another machine to test this on and Im also new to the Solaris container technology.

thanks!

When the global zone is shutting down, it is asking for all other zones to shutdown gracefully. However, there is a timeout after which zones still running will be halted. You can display and change the timeout value this way (here the default value of 100 s being raised to 5 minutes):

# svccfg
svc:> select system/zones
svc:/system/zones> listprop stop/timeout_seconds
stop/timeout_seconds  count    100
svc:/system/zones> setprop stop/timeout_seconds=300
svc:/system/zones> 
# svcadm refresh svc:/system/zones 

thats just what i was looking for thanks jlliagre! :b:

Hi,

I have a zone in Solaris 10 called "testzone" I have edited the timeout value using svccfg so this zone will shutdown after 5 mins instead of the default 60 seconds.

To test this I have the zone running and i am logged into it. However when i shutdown the machine (using GUI-Launch:Shutdown), it powers off immediately.

Why does the host not wait 5 mins before shutdown?

When i powered the machine on again I checked the timeout value and it was still set to 300 seconds.

thanks

Did you refresh the zone configuration (svcadm refresh ...) ?

yes I followed your instructions :

# svccfg
svc:> select system/zones
svc:/system/zones> listprop stop/timeout_seconds
stop/timeout_seconds count 100
svc:/system/zones> setprop stop/timeout_seconds=300
svc:/system/zones>
# svcadm refresh svc:/system/zones

and after the reboot I went in to check and it was still 300.

thanks

Double check you run

svcadm refresh svc:/system/zones

Rebooting doesn't refresh the internal configuration. Checking the reported value isn't enough.

If not the problem, I have no idea about a possible explanation. Make sure you are up to date with patches.

I ran the refresh again exactly as you list.

When I shutdown with the zone running. its the same result it shuts down immediately.

The machine is up to date with patches.

Perhaps the host gives up to 5 mins to the zone. So if the zone had an app that required 5 mins to shutdown it would give that, but if not it shuts down straight away?

Seems like a long shot but I'll try and find an app that takes a few mins to shutdown and test it again.

That's the way it works. Why would you want the system to wait after the zone is down ?

1 Like

I dont want it to wait after the zone is down, I just assumed it waited the full amount of time. Thanks for the clarification.