Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart proc does not run when symlink is changing but artifact remains unchanged #59

Closed
rkialashaki opened this issue Mar 20, 2013 · 3 comments

Comments

@rkialashaki
Copy link

For testing purposes, it is nice to see what sequential chef runs will do when deploying the same artifact but incrementing the version number in the artifact_deploy resource. When doing so, the restart proc does not run. It seems that the restart proc will only run when the manifest is changed and not when only a symlink is changing.

@KAllan357
Copy link
Contributor

The logic in the provider for running the restart proc is as follows:

if deploy? || manifest_differences? || current_symlink_changing?
    run_proc :restart
end

This sounds like a bug, possibly one in the current_symlink_changing? method. Just to be clear, what you are doing is:

  1. Installing some artifact; restart proc runs.
  2. Installing another artifact; restart proc runs.
  3. Switching back to the old one; restart proc doesnt run.

Is that the behavior you are seeing?

@rkialashaki
Copy link
Author

The behavior is this:

1.) in the cookbook, using artifact_deploy to deploy version 1.0 of an artifact for example:

artifact_deploy "artifact" do
version "1.0"
artifact_location "http://artifacts.server.com/artifact-1.0.tar.gz"

2.) restart proc runs on the first chef run

3.) increment the version in the cookbook but not on the artifact location:

artifact_deploy "artifact" do
version "1.1"
artifact_location "http://artifacts.server.com/artifact-1.0.tar.gz"

4.) restart proc does not run even thought the symlink is changing from releases/1.0 to releases/1.1

@KAllan357
Copy link
Contributor

After working with @rkialashaki and his cookbook, we came to the conclusion that the problem was related to the runit_service definition and the recipe in general. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants