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

Allow find in gather-logs to follow symlinks. #1509

Merged
merged 1 commit into from
Jun 7, 2018

Conversation

teknofire
Copy link
Contributor

This is needed to fix an issue when users symlink another directory
to /var/log/opscode and allows find to follow the symlink when
searching for the log files to include.

Signed-off-by: Will Fisher [email protected]

@teknofire teknofire requested a review from a team June 5, 2018 15:02
Copy link
Contributor

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me. We likely need to make this change in a few products.

Copy link
Contributor

@markan markan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@@ -93,7 +93,7 @@ for i in /opt/{chef,$path}*/version-manifest.txt \
fi
done

for i in `find /var/log/${path}* -type f -mmin -"$modified_within_last_x_minutes"`; do
for i in `find -L /var/log/${path}* -type f -mmin -"$modified_within_last_x_minutes"`; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[unrelated] Hmm, looking at this, I wonder if the * behind ${path} really is needed. But I suppose it doesn't hurt either.

@markan
Copy link
Contributor

markan commented Jun 7, 2018

@teknofire You're good to merge, but please rebase onto master beforehand to keep the history clean.

This is needed to fix an issue when users symlink another directory
to `/var/log/opscode` and allows find to follow the symlink when
searching for the log files to include.

Signed-off-by: Will Fisher <[email protected]>
@markan markan force-pushed the will/gather-logs-follow-symlinks branch from a1411ee to 02960c7 Compare June 7, 2018 17:10
@markan markan merged commit 3ececfc into master Jun 7, 2018
@markan markan deleted the will/gather-logs-follow-symlinks branch June 7, 2018 17:22
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

Successfully merging this pull request may close these issues.

4 participants