Skip to content

Commit c2a2d3f

Browse files
committed
Work around GH-1244
See comment in diff for details.
1 parent 127bc3e commit c2a2d3f

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

plans/unit/configure.pp

+18-5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@
3939

4040
# Set up the console node groups to configure the various hosts in their
4141
# roles
42+
43+
# Pending resolution of Bolt GH-1244, Target objects and their methods are
44+
# not accessible inside apply() blocks. Work around the limitation for now
45+
# by using string variables calculated outside the apply block. The
46+
# commented-out values should be used once GH-1244 is resolved.
47+
48+
# WORKAROUND: GH-1244
49+
$master_host_string = $master_target.pe_xl::target_host()
50+
$master_replica_host_string = $master_replica_target.pe_xl::target_host()
51+
$puppetdb_database_host_string = $puppetdb_database_target.pe_xl::target_host()
52+
$puppetdb_database_replica_host_string = $puppetdb_database_replica_target.pe_xl::target_host()
53+
4254
apply($master_target) {
4355
# Necessary to give the sandboxed Puppet executor the configuration
4456
# necessary to connect to the classifier`
@@ -47,15 +59,16 @@
4759
mode => '0644',
4860
path => Deferred('pe_xl::node_manager_yaml_location'),
4961
content => epp('pe_xl/node_manager.yaml.epp', {
50-
server => $servername,
62+
server => $master_host_string,
5163
}),
5264
}
5365

5466
class { 'pe_xl::setup::node_manager':
55-
master_host => $master_target.pe_xl::target_host(),
56-
master_replica_host => $master_replica_target.pe_xl::target_host(),
57-
puppetdb_database_host => $puppetdb_database_target.pe_xl::target_host(),
58-
puppetdb_database_replica_host => $puppetdb_database_replica_target.pe_xl::target_host(),
67+
# WORKAROUND: GH-1244
68+
master_host => $master_host_string, # $master_target.pe_xl::target_host(),
69+
master_replica_host => $master_replica_host_string, # $master_replica_target.pe_xl::target_host(),
70+
puppetdb_database_host => $puppetdb_database_host_string, # $puppetdb_database_target.pe_xl::target_host(),
71+
puppetdb_database_replica_host => $puppetdb_database_replica_host_string, # $puppetdb_database_replica_target.pe_xl::target_host(),
5972
compiler_pool_address => $compiler_pool_address,
6073
require => File['node_manager.yaml'],
6174
}

0 commit comments

Comments
 (0)