Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Tue Feb 14, 2012 12:48 am 
Offline
Newbie
User avatar

Joined: Fri Oct 21, 2011 2:35 pm
Posts: 4
I've been using "shutdown -r" on my linodes and it seems to be working fine. Is it okay to restart this way, or are there reasons we should use the dashboard/lish?


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 4:20 am 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
kipkoan wrote:
I've been using "shutdown -r" on my linodes and it seems to be working fine. Is it okay to restart this way, or are there reasons we should use the dashboard/lish?

Holy necromancy, Batman.

I think the reason it's 'working fine' is that Lassie is configured to reboot your node automatically when it unexpectedly shuts down. No harm done, but you might as well do it the 'proper' way.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 11:24 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
How is rebooting in the dashboard anymore proper? Doing a reboot from within the linode does a safe shutdown, and lets lassie simulate the BIOS doing a soft reboot...


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 4:59 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
I'm not about to try this right now, but if you have Lassie enabled, wouldn't it start your Linode back up as soon as you shut it down from inside? On the other hand, if you shut it down from the Dashboard, Lassie will know that you don't want it rebooted. So there might be a difference if you're trying to turn your Linode off for a while and resize disk images, etc.

But again, this is just speculation because I'm not going to try it right now 8)


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 5:36 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
hybinet wrote:
… if you have Lassie enabled, wouldn't it start your Linode back up as soon as you shut it down from inside?

Yes -- 'shutdown -h' from inside your Linode causes a reboot if Lassie is enabled. If Lassie is disabled, 'shutdown -r' powers off your Linode. Lassie-dependent 'not what it says on the tin'.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 5:45 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Right, and Lassie, which is enabled by default, unless I'm mistaken, is simulating the behaviour of a real computer for reboots...


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 5:55 pm 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
I usually do sudo shutdown.


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 6:11 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
Guspaz wrote:
Right, and Lassie, which is enabled by default, unless I'm mistaken, is simulating the behaviour of a real computer for reboots...

Only if you have a real computer that always reboots regardless of how you shut down the system. Lassie is an unconditional restart if it sees the guest go down (without a manager shutdown job). Most regular systems need the reboot to be initiated by the same process doing the shut down. Lassie is more akin to a hardware power switch with watchdog wired up to a real computer.

Thus, as pclissold pointed out, you can do a regular shutdown (no reboot) from the guest, and Lassie will still initiate a restart. That caught me by surprise once with my first Linode when I did a shutdown from the guest so I could work with the disks, and didn't expect the Lassie restart, since I erroneously considered it a proper (not unexpected) shutdown. I'm not sure if the manager had the text it now does explaining that unexpected meant no prior shutdown job in the manager itself. (it's certainly plausible it did and I just missed it)

Anyway, essentially a maintenance shutdown has to be done from the manager (if Lassie is enabled). Though if you want the reboot, a guest shutdown (with Lassie) is certainly fine and as clean as through the manager. In that case the shutdown options won't matter - you're going to get a reboot regardless. A guest initiated shutdown is faster (in my experience) than a manager shutdown, but the Lassie restart is then slower than the restart job a manager reboot queues up, so not sure which reboot approach is faster overall.

-- David


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 6:13 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
Guspaz wrote:
Right, and Lassie, which is enabled by default, unless I'm mistaken, is simulating the behaviour of a real computer for reboots...

'shutdown -h' halts the processor on a real computer -- you have to power cycle it or do a hardware reset to restart it. Lassie starts it regardless.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 6:24 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
That's still not really a reason not to use 'shutdown -r' or 'reboot'. Remember, we're talking about reboots here, not shutdowns.

That said, there's no particular reason you couldn't write a shell script to do reboots from inside a linode using the API. If you wanted to get fancy, you could even replace the system default shutdown command with a shell script that mapped it to Linode API equivalents.

Perhaps this is something Linode should do as one of the "xenify distro" options.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group