Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
tasks that refuse to run after they fail twice
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
patcoll  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 18:27
From: patcoll <patc...@gmail.com>
Date: Wed, 28 Oct 2009 11:27:21 -0700 (PDT)
Local: Wed 28 Oct 2009 18:27
Subject: tasks that refuse to run after they fail twice
I have two custom "restart" tasks that restart apache and nginx,
respectively. I put :on_error => :continue on both.

After the Apache "restart" throws an error twice in the same script
(my fault), any subsequent calls to that task seem to get ignored...

Has anyone else experienced this? I can see how this may be a feature
for one call to "cap" on the command line, but the behavior persists
to the next time I use "cap" -- does the result of each task get
cached somehow?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 18:38
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Wed, 28 Oct 2009 19:38:01 +0100
Local: Wed 28 Oct 2009 18:38
Subject: Re: [capistrano] tasks that refuse to run after they fail twice

Pat, please see guidelines here and post back –
http://groups.google.com/group/capistrano

-- Lee Hambley

Twitter: @leehambley | @capistranorb
Blog: http://lee.hambley.name/
Working with Rails: http://is.gd/1s5W1

2009/10/28 patcoll <patc...@gmail.com>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
patcoll  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 19:00
From: patcoll <patc...@gmail.com>
Date: Wed, 28 Oct 2009 12:00:53 -0700 (PDT)
Local: Wed 28 Oct 2009 19:00
Subject: Re: tasks that refuse to run after they fail twice
I'm using cap to setup an Ubuntu appliance to use as an app server
with a LAMP (PHP) stack.

Here's the output of what I see...

http://pastie.org/673712

I have :on_error => :continue on the "appliance:apache:restart" task,
so it correctly continues the first time, but the next time it
encounters "appliance:apache:restart" it seems to ignore it (in this
case it continues on to execute "appliance:php:install").

Then I run the same "cap" command on the command line. In this case, I
have an "after('deploy:setup')" block that goes on to install the LAMP
stack. Soo when I run the same cmd again, and it gets to the
"appliance:apache:restart" part, cap ignores it completely:

  * executing `appliance:apache:restart'
  * executing "/etc/init.d/apache2 restart"

And nothing after that.

ruby 1.8.7
capistrano 2.5.9

On Oct 28, 2:38 pm, Lee Hambley <lee.hamb...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 19:04
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Wed, 28 Oct 2009 20:04:22 +0100
Local: Wed 28 Oct 2009 19:04
Subject: Re: [capistrano] Re: tasks that refuse to run after they fail twice

And your code please? (that err output was pretty useful, need to see your
implementation as per the guidelines, please)

-- Lee Hambley


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
patcoll  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 19:49
From: patcoll <patc...@gmail.com>
Date: Wed, 28 Oct 2009 12:49:41 -0700 (PDT)
Local: Wed 28 Oct 2009 19:49
Subject: Re: tasks that refuse to run after they fail twice
With names changed to protect the innocent:

Capfile:  https://gist.github.com/7a1aec02691d15117308
Output of the _second_ time deploy:setup was run:
https://gist.github.com/9c571040fb25a42e414b

Basically you see a lot of this, as shown before:

  * executing `appliance:apache:restart'
  * executing "/etc/init.d/apache2 restart"

Thanks so much for looking at this.

On Oct 28, 3:04 pm, Lee Hambley <lee.hamb...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rafael G.  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 01:08
From: "Rafael G." <r...@aspgems.com>
Date: Sat, 31 Oct 2009 02:08:31 +0100
Local: Sat 31 Oct 2009 01:08
Subject: Re: [capistrano] Re: tasks that refuse to run after they fail twice
Hi Patcoll,

    I was trying to reproduce this behaviour in a simple task but I
cann't :-(

I tried with this task:

desc "Something to check it"
task :on_error_test, :on_error => :continue, :role => :app do
    run "~/foobar.sh"
end

    foobar.sh is a simple script(echo message), it's stored in all hosts
except only one to make it fail.
And it show me a correct behaviour. The task is executed in all servers
fail or not fail.

    The second test that I did was write a syntax error in the script
(a  command not found) and one server without the script. The task was
executed in all servers likewise.

    The third and last test, I added a exit 1 (I test it with an exit 2
too) in the script to return an exit value. And again I cann't reproduce
it :-(

Could you paste again your deploy.rb?

--
Rafa

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google