Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Cannot find a resource matching java_ark[jdk] #15

Closed
sclausson opened this issue Oct 31, 2013 · 5 comments
Closed

Cannot find a resource matching java_ark[jdk] #15

sclausson opened this issue Oct 31, 2013 · 5 comments

Comments

@sclausson
Copy link

When trying to run the stash::upgrade recipe I am encountering this error. I used the 2.16.0 version of the cookbook to install Stash, and am using cookbook version 2.21.0 for the upgrade. I am trying to upgrade from Stash 2.6.3 to 2.8.1.

Thanks for the cookbook!


Cannot find a resource matching java_ark[jdk]

Relevant File Content:

/var/chef/cache/cookbooks/stash/recipes/default.rb:

181: )
182: notifies :restart, "service[stash]", :delayed
183: end
184:
185: service "stash" do
186: supports :status => true, :restart => true
187: action [ :enable, :start ]
188>> subscribes :restart, resources("java_ark[jdk]")
189: end
190:

@bflad
Copy link
Owner

bflad commented Oct 31, 2013

Ahh, yes. The java_ark[jdk] is if you're using the Opscode Java cookbook with tarballs to install Java. Here'san example where it would be invoked from: https://github.com/opscode-cookbooks/java/blob/master/recipes/oracle.rb#L47

I do need to fix the syntax here though to not use resources() and instead just use the string notation. I think this might get around your case where you're not using java_ark. I also could potentially remove this subscribes since it could be undesired to immediately restart Stash when Java is updated.

The master branch is on version 3 of the cookbook. I believe I should be able to branch 2.X development and provide a hotfix there for you, but not sure if that will work. If its too much effort, I'll at least get this into master.

Also, please note that the upgrade recipe has been explicitly removed from version 3 of this cookbook. Updating should require just changing the version number, which ark will install and move the symlink. Backups are outside the cookbook's responsibility in version 3 as well, but it does provide installation and configuration support of the Stash Backup Client from Atlassian.

I'll get to this hopefully on Sunday.

@sclausson
Copy link
Author

Thanks very much for the explanation. I'm going to download the version 3 cookbook now and see if I can't get it to do what I want using the new ark/symlink workflow as you describe.

@sclausson
Copy link
Author

Hey Brian. I ended up just simply removing that subscribes :restart, resources("java_ark[jdk] from the service_init recipe in the 3.0.1 cookbook and successfully upgraded from 2.6.3 to 2.8.1 in my test environment. Will try it out in production tomorrow. Also really like how ark is used now to manage the upgrade. Thanks for that!

@bflad
Copy link
Owner

bflad commented Nov 4, 2013

I've switched it in the 3.1.0 version of the cookbook to just use string notation: subscribes :restart, 'java_ark[jdk]'. This should not change the behavior and hopefully will get around your issue. If it still doesn't work, I'll remove the line completely since its not good to force the dependency on the other cookbook.

@bflad
Copy link
Owner

bflad commented Nov 18, 2013

It's been 2 weeks since I heard about this so closing the issue. If you're still having trouble after 3.1.0 please reopen. Thanks.

@bflad bflad closed this as completed Nov 18, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants