Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Apr 05, 2010 4:20 pm 
Offline
Junior Member

Joined: Wed Sep 03, 2008 9:51 am
Posts: 25
I have a stackscript I'm working on that is long-running -- around 10 minutes, and the host shouldn't be marked as "ready to use" until the stackscript has finished.

Is there already a way to register a job in the job queue that represents the stack script so that the eventual end-user can know that their host is ready?

If not, that's my feature request :)


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 4:34 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
We discussed this a while back and decided implementing this type of hook into the Linode Manager would be a bad thing. From the host's perspective, the job of setting up the distro with the StackScript in place IS done. And the job of booting the Linode IS done when the actual VM starts...

I recommend either disabling sshd until the script is done, or doing something evil like setting root's .bashrc to display a nice "Hey, don't touch this yet" message and logging off, or whatever.

-Chris


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 4:41 pm 
Offline
Junior Member

Joined: Wed Sep 03, 2008 9:51 am
Posts: 25
Understandable, but what if you provided a simple bash script function that those who wanted to register with the job queue could do something like:

Code:
linode_job_start "My Long-running Job"
sleep 600
linode_job_finish "My Long-running Job"


You could even prefix the job description with "StackScript: " so as not to confuse the user.

I understand if it's too much work for too little gain - just my thoughts.

Justin[/code]


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 4:54 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
No. Why would you want to add jobs into the queue that block other jobs. That's not how it works. The user is in control, not your StackScript :)

-Chris


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 5:00 pm 
Offline
Junior Member

Joined: Wed Sep 03, 2008 9:51 am
Posts: 25
Now I gotcha. I wasn't thinking about the blocking nature of a job, I just wanted it for a progress meter.

I'll just take in a email addy on the form that I can notify once it's done.


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


Who is online

Users browsing this forum: No registered users and 0 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