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

file: Tell people what file a link is pointing at in warning messages #8417

Merged
merged 1 commit into from
May 1, 2019

Conversation

jaymzh
Copy link
Collaborator

@jaymzh jaymzh commented Apr 25, 2019

Description

In the event you are managing a file /etc/file with a file resource,
but it turns out to be a link to /etc/passwd and you are trying to figure
out what overwrite /etc/passwd, there is no indication in the logs. Let's add
one.

Check List

@jaymzh jaymzh force-pushed the link_message branch 2 times, most recently from b23f840 to 79ddf11 Compare April 25, 2019 18:20
@tas50
Copy link
Contributor

tas50 commented Apr 25, 2019

Looks like realpath isn't going to work on Windows @jaymzh

@jaymzh
Copy link
Collaborator Author

jaymzh commented Apr 25, 2019

Fucking Windows. Is there... something that does?

@jaymzh
Copy link
Collaborator Author

jaymzh commented Apr 25, 2019

OK I think I added support

Gemfile.lock Outdated Show resolved Hide resolved
@jaymzh
Copy link
Collaborator Author

jaymzh commented Apr 26, 2019

@tas50 so fixing that, at lest running locally the linux stuff, I get a bunch of failures when I do bundle exec rspec spec/unit/providers/file_spec.rb but when I run ALL the specs, I don't. wat.

@jaymzh jaymzh force-pushed the link_message branch 3 times, most recently from 486d447 to 85ba516 Compare April 26, 2019 05:32
@jaymzh
Copy link
Collaborator Author

jaymzh commented Apr 26, 2019

OK @tas50 light is green, trap is clean!

@tas50 tas50 changed the title Tell people what file a link is pointing at. file: Tell people what file a link is pointing at in warning messages Apr 29, 2019
In the event you are managing a file `/etc/file` with a `file` resource,
but it turns out to be a link to `/etc/passwd` and you are trying to figure
out what overwrite `/etc/passwd`, there is no indication in the logs. Let's add
one.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
@lamont-granquist lamont-granquist merged commit 58bcea7 into chef:master May 1, 2019
@jaymzh jaymzh deleted the link_message branch May 1, 2019 00:33
@lock
Copy link

lock bot commented May 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants