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

Move pid file to /var/run #100

Closed
linc01n opened this issue Jun 29, 2015 · 12 comments
Closed

Move pid file to /var/run #100

linc01n opened this issue Jun 29, 2015 · 12 comments
Milestone

Comments

@linc01n
Copy link
Collaborator

linc01n commented Jun 29, 2015

We should move the /opt/atlassian/stash/work/catalina.pid to /var/run

It is because we are symlinking /opt/atlassian/stash to the latest version of stash. Every time we run the chef script to upgrade stash, it will change the symlink target and failed the stash restart since the service can't find the pid.

So the situation is like this:

/opt/atlassian/stash -> /opt/atlassian/stash-3.9.0
the catalina.pid is located in /opt/atlassian/stash-3.9.0

We run the cookbooks to update stash, now it points to
/opt/atlassian/stash -> /opt/atlassian/stash-3.10.0
the catalina.pid is still located in /opt/atlassian/stash-3.9.0

At the end of cookbook, we restart the stash service. But it fails because it can't find /opt/atlassian/stash-3.10.0/work/catalina.pid

reference: http://stackoverflow.com/questions/5173636/must-my-pidfile-be-located-in-var-run

@legal90
Copy link
Contributor

legal90 commented Jun 29, 2015

👍

@bflad
Copy link
Owner

bflad commented Jun 29, 2015

👍

On Mon, Jun 29, 2015, 6:09 AM Mikhail Zholobov [email protected]
wrote:

[image: 👍]


Reply to this email directly or view it on GitHub
#100 (comment).

@l4u
Copy link

l4u commented Jun 29, 2015

👍

@linc01n linc01n added this to the 4.x milestone Jun 30, 2015
@patcon
Copy link
Collaborator

patcon commented Jul 7, 2015

I think this can be closed now?

@linc01n
Copy link
Collaborator Author

linc01n commented Jul 7, 2015

I didn't merge to master. So I leave this open until 4.0 released.

@patcon
Copy link
Collaborator

patcon commented Jul 7, 2015

Ah ok, gotcha :) I don't normally see cookbooks using release branches, and hadn't realized.

@linc01n
Copy link
Collaborator Author

linc01n commented Jul 7, 2015

4.0 will contain breaking changes so we put it into a separate branch now. Mainly this one

4.0.0 (When Released)
Enhancement: #49: Update default database to postgresql

I am not sure how not to break other people deployment with the new cookbook.

@patcon
Copy link
Collaborator

patcon commented Jul 7, 2015

One possibility might be to have complex logic in the cookbook until a major release (to support all use-cases), but then make it known (via chef run warnings, etc) that the attributes or approaches will be deprecated in X number of months (or whatever seems fair)?

EDIT: Or of course, people could always stick with the old cookbook -- maybe we shouldn't wait up on them anyhow. I guess how far we bend over to support those specific users (who want to latest, but don't have time to upgrade their whole infra) depends on how many people are using the cookbook...?

@linc01n
Copy link
Collaborator Author

linc01n commented Jul 7, 2015

Maybe we check if the user installed mysql then use the mysql path?

@patcon
Copy link
Collaborator

patcon commented Jul 7, 2015

Hm. You mean check the run list?

I think the way I've seen is to do some sort of responds_to? on a resource attr, or a resource itself, to check on a feature that would only exist in cookbook version X but not in cookbook version Y. (I don't think we can add conditional logic based on "what version of mysql cookbook is being used"... although I may be wrong)

@patcon
Copy link
Collaborator

patcon commented Jul 7, 2015

@linc01n
Copy link
Collaborator Author

linc01n commented Jul 8, 2015

Merged!

@linc01n linc01n closed this as completed Jul 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants