Comments (5)
Hm, merging config like that appears (which is very handy for a multiple datacenter setup etc.) was also only working for me after a local edit....
- $config_hash_real = merge($config_defaults, $config_hash)
+ $config_hash_real = merge($config_defaults, hiera_hash('consul::config_hash'),$config_hash)
... which apparently had something to do with 76bc1ef ... but beside that little tidbit change, I would be running v0.4.6 now.
from puppet-consul.
This surprises me because we have a test for this:
https://github.com/solarkennedy/puppet-consul/blob/master/spec/classes/init_spec.rb#L247
If there was a dependency loop when settings consul::services
then that test would fail to compile?
from puppet-consul.
Im hitting this as well -
Error: Could not apply complete catalog: Found 1 dependency cycle: DEBUG [9817a86d] DEBUG [9817a86d] (File[/etc/consul/service_haproxy.json] => Class[Consul::Run_service] => Service[consul] => Class[Consul::Run_service] => Class[Consul] => Consul::Service[haproxy] => File[/etc/consul/service_haproxy.json]) DEBUG [9817a86d]
from puppet-consul.
It could be it's about an incomplete consul definition which causes it. Once I hiera_merge it like mentioned, the problem disappears, but without merging (which granted, would result in an incomplete / faulty consul config), this dependency cycle happens, so with just:
consul::config_hash:
log_level: 'INFO'
server: true
bootstrap_expect: 3
ui_dir: '/usr/share/consul/web-ui'
client_addr: '0.0.0.0'
consul::services:
'zookeeper':
tags: [ 'mesos' , 'master' ]
port: 2181
Arguable, this is incomplete, but probably it gives more clear error messages when:
- either defaults for the missing data which causes the loop are provided
- or missing data which causes the loop is checked and the code is aborted there & then
from puppet-consul.
Changing the merge() function as you describe above makes no difference for me, I am still receiving the same error. Having a look into it now...
Changing the spec test to
context "When the user provides a hash of services" do
let (:params) {{
:config_hash => {
'log_level' => 'INFO',
'server' => 'true',
'bootstrap_expect' => 3,
'ui_dir' => '/usr/share/consul/web-ui',
'client_addr' => '0.0.0.0'
},
:services => {
'test_service1' => {
'port' => '5',
'tags' => ['tag1', 'tag2']
}
}
}}
it { should contain_consul__service('test_service1').with_port('5') }
it { should have_consul__service_resource_count(1) }
end
still does not cause the spec test to fail for some reason (but I still definitely have the cycle issue)
from puppet-consul.
Related Issues (20)
- HCL Config Support HOT 1
- New Home Attribute on consul user resource breaks our puppet runs. HOT 3
- Registering multiple services from same node/instance with same name HOT 11
- Drop EoL CentOS/RHEL 6 support
- Drop EoL Ubuntu 16.04 support
- Drop EoL Amazon Linux support
- Drop EoL Fedora 25/26/27 support
- Drop EoL FreeBSD 10 support
- Drop support for old SLES/SLED versions
- Drop support for EoL Puppet 5
- Migrate from master to main HOT 2
- migrate module to Vox Pupuli? HOT 6
- Module Release?
- RFC: refactor to include official hashicorp package repos HOT 1
- Systemd service does't work for 'package' install_method HOT 6
- RFC: change dependency camp2camp/systemd module to voxpupuli/systemd
- legacy ACL v1 no longer working starting from Consul version 1.11 HOT 9
- Add ability to manage consul log directory HOT 1
- Status of the project HOT 1
- Adding ACLS / Policies failes with unable to get local issuer certificate -> Puppet 6 / LetsEncrypt HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-consul.