Merge branch 'main' into pr/205
* main: Simplify domain language to just "boot" and unscoped config keys Retain a fixed number of containers when pruning Don't assume rolling back in message Check all hosts before rolling back Ensure Traefik service name is consistent Extend traefik delay by 1 second Include traefik access logs Check if we are still getting a 404 Also dump load balancer logs Dump traefik logs when app not booted Fix missing for apt-get Report on container health after failure Fix the integration test healthcheck Allow percentage-based rolling deployments Move `group_limit` & `group_wait` under `boot` Limit rolling deployment to boot operation Allow performing boot & start operations in groups
This commit is contained in:
@@ -233,15 +233,24 @@ class Mrsk::Cli::Main < Mrsk::Cli::Base
|
||||
subcommand "lock", Mrsk::Cli::Lock
|
||||
|
||||
private
|
||||
def container_available?(version, host: MRSK.primary_host)
|
||||
available = nil
|
||||
|
||||
on(host) do
|
||||
first_role = MRSK.roles_on(host).first
|
||||
available = capture_with_info(*MRSK.app(role: first_role).container_id_for_version(version)).present?
|
||||
def container_available?(version)
|
||||
begin
|
||||
on(MRSK.hosts) do
|
||||
MRSK.roles_on(host).each do |role|
|
||||
container_id = capture_with_info(*MRSK.app(role: role).container_id_for_version(version))
|
||||
raise "Container not found" unless container_id.present?
|
||||
end
|
||||
end
|
||||
rescue SSHKit::Runner::ExecuteError => e
|
||||
if e.message =~ /Container not found/
|
||||
say "Error looking for container version #{version}: #{e.message}"
|
||||
return false
|
||||
else
|
||||
raise
|
||||
end
|
||||
end
|
||||
|
||||
available
|
||||
true
|
||||
end
|
||||
|
||||
def deploy_options
|
||||
|
||||
Reference in New Issue
Block a user