mirror of
https://github.com/puppetlabs/vmpooler-provider-gce.git
synced 2026-01-26 03:18:41 -05:00
Use domain provided by pool's dns_config
debug open socket
This commit is contained in:
parent
911c15dc4e
commit
1375093b43
1 changed files with 6 additions and 8 deletions
|
|
@ -82,12 +82,9 @@ module Vmpooler
|
||||||
return provider_config['machine_type'] if provider_config['machine_type']
|
return provider_config['machine_type'] if provider_config['machine_type']
|
||||||
end
|
end
|
||||||
|
|
||||||
def domain
|
def domain(pool_name)
|
||||||
provider_config['domain']
|
dns_plugin_name = pool_config(pool_name)['dns_plugin']
|
||||||
end
|
return dns_config(dns_plugin_name)
|
||||||
|
|
||||||
def dns_zone_resource_name
|
|
||||||
provider_config['dns_zone_resource_name']
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Base methods that are implemented:
|
# Base methods that are implemented:
|
||||||
|
|
@ -191,7 +188,7 @@ module Vmpooler
|
||||||
boot: true,
|
boot: true,
|
||||||
initialize_params: init_params
|
initialize_params: init_params
|
||||||
)
|
)
|
||||||
append_domain = domain || global_config[:config]['domain']
|
append_domain = domain(pool_name)
|
||||||
fqdn = "#{new_vmname}.#{append_domain}" if append_domain
|
fqdn = "#{new_vmname}.#{append_domain}" if append_domain
|
||||||
|
|
||||||
# Assume all pool config is valid i.e. not missing
|
# Assume all pool config is valid i.e. not missing
|
||||||
|
|
@ -468,7 +465,8 @@ module Vmpooler
|
||||||
def vm_ready?(_pool_name, vm_name)
|
def vm_ready?(_pool_name, vm_name)
|
||||||
begin
|
begin
|
||||||
# TODO: we could use a healthcheck resource attached to instance
|
# TODO: we could use a healthcheck resource attached to instance
|
||||||
open_socket(vm_name, domain || global_config[:config]['domain'])
|
domain = domain(_pool_name)
|
||||||
|
open_socket(vm_name, domain)
|
||||||
rescue StandardError => _e
|
rescue StandardError => _e
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue