Comments (8)
I'm getting similar warning for a custom LWRP
[2015-10-01T10:16:47+01:00] WARN: You declared a new resource #<Class:0x007fa901bac690> for resource #{resource_name}, but it comes alphabetically after LWRP resource #{resource_name} from cookbook #{cookbook_name} and has the same filters ({}), so it will not be used. Use override: true if you want to use it for #{resource_name}.
[2015-10-01T10:16:47+01:00] WARN: #{resource_name} already exists! Deprecation class overwrites LWRP resource #{resource_name} from cookbook #{cookbook_name}
I've also noticed that this warning only comes when I use ChefSpec::Runner
runner = ChefSpec::ServerRunner.new do |node, server|
ChefSpec::SoloRunner
doesn't go around whining about this.
Hope this helps to narrow down the issue a bit.
from apt.
We'll be solving this soon by using compat_resource to provide the update and repository functionality. This aligns the code base with core chef and eliminates double code loading
from apt.
Googling doesn't help too much, the only stuff I'm finding are logs from travis-ci:
http://www.google.com/search?q="AptRepository+already+exists!+Deprecation+class+overwrites+LWRP+resource+apt_repository+from+cookbook+apt"
from apt.
This appears to be coming from Chef::Platform::HandlerMap in 12.4.1, though it isn't obvious why ChefSpec is triggering these warnings. FWIW, I see similar errors using the sudo cookbook.
@jkeiser, can you shed any light on why we've begun to see these messages?
Thanks!
from apt.
Is this still present with the recently released Chefspec 4.4.0 version?
Am 01.10.2015 11:46 vorm. schrieb "Deepu Mohan Puthrote" <
[email protected]>:
I'm getting similar warning for a custom LWRP
[2015-10-01T10:16:47+01:00] WARN: You declared a new resource #Class:0x007fa901bac690 for resource #{resource_name}, but it comes alphabetically after LWRP resource #{resource_name} from cookbook #{cookbook_name} and has the same filters ({}), so it will not be used. Use override: true if you want to use it for #{resource_name}.
[2015-10-01T10:16:47+01:00] WARN: #{resource_name} already exists! Deprecation class overwrites LWRP resource #{resource_name} from cookbook #{cookbook_name}I've also noticed that this warning only comes when I use ChefSpec::Runner
runner = ChefSpec::ServerRunner.new do |node, server|
ChefSpec::SoloRunner doesn't go around whining about this.
Hope this helps to narrow down the issue a bit.
—
Reply to this email directly or view it on GitHub
#163 (comment).
from apt.
@tknerr, yes I can confirm I'm still seeing this with ChefSpec 4.4.0
from apt.
(Posted in issue 642 above, reposting here) Hey all, a hack workaround for this is to redirect stdout during the chefspec converge, and restore it afterwards. Code:
let (:chef_run) do
# Redirecting stdout to suppress 'Deprecation class overwrites LWRP' noise.
# (ref https://github.com/sethvargo/chefspec/issues/642)
old_std_out = $stdout.clone
$stdout.reopen('tmp_std_out.txt', 'w')
result = chef_runner.converge(described_recipe)
$stdout.reopen(old_std_out)
File.read('tmp_std_out.txt').each_line do |lin|
puts lin unless lin =~ /Deprecation class overwrites LWRP resource/
end
File.delete('tmp_std_out.txt')
result
end
from apt.
We've removed the sources from this cookbook so you shouldn't see this warnings in the 6.0 release now.
from apt.
Related Issues (20)
- apt_repository should honour the components values given, regardless of whether it's a ppa repository HOT 2
- Issue with v3.0.0 execute[apt-get update] HOT 5
- Truncating URI HOT 1
- apt_repository with key option creates ~/.gnupg owned by root in Vagrant's homedir HOT 2
- Add a warning on the README that https://github.com/chef/chef/pull/4782 supersedes this cookbook's `apt_repository` LWRP HOT 6
- execute[apt-cache gencaches] cannot be found in the resource collection HOT 6
- Apt update fails on Chef < 12.4.0 HOT 1
- Port apt_preference to chef/chef HOT 3
- Adding apt key doesn't work on Ubuntu 16.10 HOT 2
- apt update fails with "STDERR: E: The method driver /usr/lib/apt/methods/deb https could not be found."
- 6.1.0 removal of apt_update isn't actually in 6.1.0 supermarket code. HOT 3
- Request to add attribute allow-unauthenticated config option HOT 4
- apt_repository needs dirmngr installed HOT 1
- origins_patterns not applied for unattended_upgrades HOT 6
- master build fails with "undefined method contains"
- unattended-upgrades forced to check daily HOT 3
- apt_package resource should support source HOT 4
- Converge of apt::default fails as it tries to install version of a package that does not exist HOT 1
- Dependency Dashboard
- apt-key deprecated - use signed-by
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 apt.