Ticket #78 (closed defect: fixed)
Verbose Git Pulls Seem to timeout deployment
| Reported by: | BenHill | Owned by: | jweiss |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | component1 | Version: | |
| Keywords: | Cc: |
Description
So here is the deal:
I have my config set up for git to pull from a github repository.
Everything seems to go well, except every time the buffer refreshes, it shows a new percentage of completion:
** [out] remote: 2% (34/1691) done ** [out] remote: 3% (51/1691) done ** [out] remote: 4% (68/1691) done ** [out] remote: 5% (85/1691) done ** [out] remote: 6% (102/1691) done ** [out] remote: 7% (119/1691) done ** [out] remote: 8% (136/1691) done
...so it becomes very verbose and fills the buffer rapidly.
Then, around 5 seconds into it, the buffer stops refreshing and the deployment seems to just hang with the status spinner spinning.
My cap file:
load 'deploy'
# ================================================================ # ROLES # ================================================================
role :app, "frodo.revworks.biz"
role :db, "frodo.revworks.biz", {:primary=>true}
role :www, "frodo.revworks.biz"
# ================================================================ # VARIABLES # ================================================================
# Webistrano defaults
set :webistrano_project, "test_2" set :webistrano_stage, "dev"
set :apache_init_script, "/etc/init.d/apache2"
set :application, "test_2"
set :user, "XXXXXX"
set :deploy_to, "/var/www/test"
set :deploy_via, :checkout
set :mod_rails_restart_file, "XXXXX"
set :password, "XXXXX"
set :rails_env, "production"
set :repository, "git@…:RevWorks?/fringe_submit.git"
set :runner, "benhill"
set :scm, "git"
set :use_sudo, true
# ================================================================ # TEMPLATE TASKS # ================================================================
# allocate a pty by default as some systems have problems without default_run_options[:pty] = true
# set Net::SSH ssh options through normal variables # at the moment only one SSH key is supported as arrays are not # parsed correctly by Webistrano::Deployer.type_cast (they end up as strings) [:ssh_port, :ssh_keys].each do |ssh_opt|
if exists? ssh_opt
logger.important("SSH options: setting #{ssh_opt} to: #{fetch(ssh_opt)}") ssh_options[ssh_opt.to_s.gsub(/ssh_/, ).to_sym] = fetch(ssh_opt)
end
end
namespace :webistrano do
namespace :mod_rails do
desc "start mod_rails & Apache" task :start, :roles => :app, :except => { :no_release => true } do
as = fetch(:runner, "app") invoke_command "#{apache_init_script} start", :via => run_method, :as => as
end
desc "stop mod_rails & Apache" task :stop, :roles => :app, :except => { :no_release => true } do
as = fetch(:runner, "app") invoke_command "#{apache_init_script} stop", :via => run_method, :as => as
end
desc "restart mod_rails" task :restart, :roles => :app, :except => { :no_release => true } do
as = fetch(:runner, "app") invoke_command "touch #{mod_rails_restart_file}", :via => run_method, :as => as
end
end
end
namespace :deploy do
task :restart, :roles => :app, :except => { :no_release => true } do
webistrano.mod_rails.restart
end
task :start, :roles => :app, :except => { :no_release => true } do
webistrano.mod_rails.start
end
task :stop, :roles => :app, :except => { :no_release => true } do
webistrano.mod_rails.stop
end
end
# ================================================================ # CUSTOM RECIPES # ================================================================
