-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hosts filtering not working #1154
Comments
Hi guys, I have same issue. @RobinClowers did you solve it somehow? |
@RobinClowers do you use Rails? It could be rails specific problem: capistrano/rails#87 |
No, I didn't solve it. I am using rails, but I had the same issue with a custom task, so I don't think it's rails specific. |
@RobinClowers I checked sources of capistrano-rails gem and found this: https://github.com/capistrano/rails/blob/master/lib/capistrano/tasks/migrations.rake#L7 It means that it searches primary servers with db role, so I added "primary:true" key in my deploy.rb config and it helped. |
Hi, I came across the same issue on v3.3+. It seems that it was supposed to ignore host filter? I added a hack in my capistrano plugin: # Usage:
# set_host_filter ['example1.com']
def set_host_filter hosts
if defined? Capistrano::Configuration::Servers::HostFilter
set :filter, hosts: hosts
else
# hack for Capistrano v3.3+
Capistrano::Configuration.env.send(:servers).send(:servers).select! do |srv|
hosts.include?(srv.hostname)
end
end
end I think one can allow host filtering via command line by fixing |
Is this still an issue in latest Capistrano? I use the hosts feature all the time and it works for me. |
I seem to have hit a bug with hosts filtering. I have a pretty simple setup with 2 servers, and when I try to deploy to only one (either with
HOSTS=hostname
or--hosts=hostname
) I get an error about a release directory not existing on the other host.The text was updated successfully, but these errors were encountered: