From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,FREEMAIL_FROM, MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,T_DKIM_INVALID shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Lawrence Pit Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: [ANN] unicorn 1.0.1 and 1.1.2 - fix rollbacks Date: Wed, 14 Jul 2010 12:14:20 +1000 Message-ID: <4C3D1D7C.6010200@gmail.com> References: <20100713201945.GB16925@dcvr.yhbt.net> <4C3D0140.6080806@gmail.com> <20100714003853.GA30485@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1279073676 9067 80.91.229.12 (14 Jul 2010 02:14:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Jul 2010 02:14:36 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Wed Jul 14 04:14:35 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=1wQW6nOJjdM/Nl2Lac8RlqDYU4o4rj56/mF7czNc1FE=; b=Ju3pfUrgHqhfhtsUNwUFq2IrFfP6X/f7gOuQizY3+1U/HyO7SqZ5/2k8E1hYIL4gGq h6YrEhDqzGTl37qDa5AMN6CbGSv+5i8X8sJdqLtnygk5NZ7z84X3cMjNJFkvCPC2VT0B 4eSRWSPzzV+KDZEBdTnzxEE6nMj4z4OwGlG2M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=BY8tD97Gd0oXTNUv9cGMgOGb5mIUW3MBic363tV/spy8Y4Eh95SKdt5mX5wt71xTG3 CLfPRRn25dQM8ifZTUg3EzUZ32nK5Ws9DOvC0UerC7vPMT9Q5X7FVPlhQHBFvOntE6zm sJps9bkC+QE/RW06CAbLHQ8CO73lDGs/RQyLQ= User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: <20100714003853.GA30485@dcvr.yhbt.net> X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:640 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OYrUY-0006Qe-R8 for gclrug-mongrel-unicorn@m.gmane.org; Wed, 14 Jul 2010 04:14:35 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 41E61185839E; Tue, 13 Jul 2010 22:14:34 -0400 (EDT) Received: from mail-px0-f178.google.com (mail-px0-f178.google.com [209.85.212.178]) by rubyforge.org (Postfix) with ESMTP id 26EEB1858364 for ; Tue, 13 Jul 2010 22:14:25 -0400 (EDT) Received: by pxi5 with SMTP id 5so3685210pxi.23 for ; Tue, 13 Jul 2010 19:14:25 -0700 (PDT) Received: by 10.142.172.17 with SMTP id u17mr10518320wfe.258.1279073665054; Tue, 13 Jul 2010 19:14:25 -0700 (PDT) Received: from copa.local ([124.149.45.23]) by mx.google.com with ESMTPS id 21sm6871111wfi.17.2010.07.13.19.14.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 13 Jul 2010 19:14:24 -0700 (PDT) Hi Eric, At the top of my pastie http://pastie.org/1043347.txt you can see that when I request of list of gems it mentions only unicorn v1.1.2 I also added the suggested logging to the before_fork block and I also logged the unicorn version. Interesting output. First it runs the master with Unicorn v1.1.2. But when I send a USR2 it exec'ed with a Unicorn v1.1.1 for the new master. So yes, I still had a version lying around, namely in the $APP_ROOT/vendor/bundler_gems dir. See also: http://pastie.org/1043487.txt It does do this though after a USR2: executing ["/usr/local/rvm/gems/ree-1.8.7-2010.02/bin/unicorn_rails", "-D", "-E", "staging", "-c", "/var/www/staging/current/config/unicorn/staging.rb"] I.e., it tries to exec exactly how I start unicorn. That unicorn_rails binary in that path is definitely v1.1.2. So I don't quite understand why the reexeced one is picking the version from the vendor/bundler_gems dir. I need to play a bit more with this.. I'll probably have to change my /etc/init.d/unicorn script so that it starts with the vendor/bundler_gems version instead of a system-wide version :o I'll get back to you.. Cheers, Lawrence > Lawrence Pit wrote: > >> Hi Eric, >> >> Thanks mate. Unfortunately this still doesn't seem to work for me. >> >> I went through the process manually, you can see a transcript at >> http://pastie.org/1043347.txt >> The indented text is what I see appearing in the unicorn stderr.log. >> > > Thanks Lawrence, the following line looks suspicious to me: > > reaped # exec()-ed > > Which makes it seem like > http://git.bogomips.org/cgit/unicorn.git/commit/?id=3f0f9d6 didn't get > applied (and I just checked the 1.1.2 gem and it looks good to me) > > Can you dump out the ENV hash in your before_exec hook of your > unicorn.conf.rb? I'm wondering if GEM_HOME or GEM_PATH is set > and doing anything funky, causing you to load an old version > of Unicorn: > > before_exec do |server| > ENV.each do |key,value| > server.logger.info "#{key}=#{value}" > end > end > > >> As you can see it reports two errors during the process, saying >> unicorn.pid is stale. >> >> I wonder whether this is because in my unicorn config file I mention: >> >> pid "/var/www/staging/current/tmp/pids/unicorn.pid" >> >> whereas in your back_out_of_upgrade test you don't have such a line? >> > > It does, I create a similar line in the unicorn_setup() function of > test-lib.sh > > _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying