Comments (3)
This used to work for us in previous versions. We've established that it breaks from v3.1.0 to v3.2.0, though we're not sure what change made it stop working https://github.com/sous-chefs/consul/compare/v3.1.0..v3.2.0.
We also tried with the latest version (v4.0.3) and we had the same issue. We can make our chef-client runs pass with the following patch, though we're not sure if it's optimal:
diff --git a/libraries/consul_definition.rb b/libraries/consul_definition.rb
index 2eefec6..bb406a7 100644
--- a/libraries/consul_definition.rb
+++ b/libraries/consul_definition.rb
@@ -37,7 +37,7 @@ module ConsulCookbook
def params_to_json
final_parameters = parameters
- final_parameters = final_parameters.merge(name: name) if final_parameters[:name].nil?
+ final_parameters = final_parameters.merge(name: name) if %w(check service).include?(type) && final_parameters[:name].nil?
JSON.pretty_generate(type => final_parameters)
end
More details on this thread https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9343#note_400279286 /cc @ahanselka
from consul.
from consul.
@eReGeBe could you please make a PR which includes this fix so we can see how this goes with tests?
from consul.
Related Issues (20)
- Dangerfile should use failure instead of fail
- Remove .rubocop.yml with Dangerfile HOT 1
- Update Changelog HOT 2
- Run latest cookstyle HOT 2
- Update builds to be parallel HOT 1
- undefined method `join_path' for PoiseArchive::Resources::PoiseArchive::Resource HOT 6
- Segment part of the config is wrong type HOT 1
- Poise dependency is abandoned HOT 3
- Rewrite Consul cookbook to use custom resources HOT 5
- Support arm64 on linux
- Diplomat gem fails on Chef 16.9.29+ HOT 4
- Error in configure_diplomat with Diplomat 2.5.0 HOT 12
- Chef 17 - Poise no longer works HOT 2
- Consul 1.9.x - ui/ui_dir deprecated HOT 1
- Why are unit tests disabled? Any plans to return them back? HOT 1
- consul_service ignores program property HOT 1
- Dependency Dashboard
- Consul 1.12.x deprecated fields
- Consul client install latest packages missing checksums
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 consul.