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

Empty LogPath will use journald's default path. #253

Merged
merged 1 commit into from
Aug 27, 2019
Merged

Empty LogPath will use journald's default path. #253

merged 1 commit into from
Aug 27, 2019

Conversation

stribb
Copy link
Contributor

@stribb stribb commented Jan 30, 2019

At present, the empty LogPath will use the code's default journal path, without regard for the host's default journal path.

This code changes the default to use the host's path.

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please email the CNCF helpdesk: [email protected]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jan 30, 2019
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 30, 2019
@stribb
Copy link
Contributor Author

stribb commented Jan 30, 2019

CLA signed.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 30, 2019
@stribb
Copy link
Contributor Author

stribb commented Feb 11, 2019

/assign @Random-Liu

@stribb
Copy link
Contributor Author

stribb commented Feb 22, 2019

Is there some way I can make this simpler to review?

Thanks

@stribb
Copy link
Contributor Author

stribb commented Mar 13, 2019

Forgive my ignorance, but how long should I expect to wait before this PR is reviewed?

Thanks

@wangzhen127
Copy link
Member

Sorry for the delay. I will take a look today. Feel free to ping me on slack if you don't see any response after a day or two.

// returning error. So check the path existence ourselves.
if _, err := os.Stat(path); err != nil {
return nil, fmt.Errorf("failed to stat the log path %q: %v", path, err)
path := ""
Copy link
Member

Choose a reason for hiding this comment

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

The value of path seems never updated?

return nil, fmt.Errorf("failed to stat the log path %q: %v", path, err)
}
// Get journal client from the log path.
journal, err = sdjournal.NewJournalFromDir(cfg.LogPath)
}
Copy link
Member

Choose a reason for hiding this comment

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

Now we fall back to system default path, can you print a message here on what path it is used?

Copy link
Member

@andyxning andyxning May 14, 2019

Choose a reason for hiding this comment

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

+1 for the comment above. @stribb Do you have time to update this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree it would be nice. But there's no API to find that out as far as I can tell.

https://www.freedesktop.org/software/systemd/man/sd_journal_open.html#

Copy link
Member

Choose a reason for hiding this comment

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

ACK

@wangzhen127
Copy link
Member

/test all

@andyxning
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 19, 2019
@stribb
Copy link
Contributor Author

stribb commented Aug 26, 2019

@wangzhen127 Sorry, I'm new to GitHub PRs. Does my PR look reasonable or did I mess up? :)

Thanks!

@wangzhen127
Copy link
Member

/test all

@wangzhen127
Copy link
Member

Not sure why the tests didn't run. Just triggered the tests manually.

Do you mind squash all the 3 commits? The are not big and it is cleaner to just have one commit.

@wangzhen127
Copy link
Member

By the way, k8s 1.6 code freeze is 8/29 this Thursday. I plan to cut NPD v0.7.1 and include it in k8s 1.16.

This PR looks ok to me. Just need to squash the commits. If you plan to include it in v0.7.1, please do so by end of day today, so that we have enough time to release and test. Thanks!

@stribb
Copy link
Contributor Author

stribb commented Aug 26, 2019

Thanks, I've squashed all the commits. Sorry for the delay: I was flying to Barcelona.

@wangzhen127
Copy link
Member

/test all

@wangzhen127
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 27, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stribb, wangzhen127

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 27, 2019
@k8s-ci-robot k8s-ci-robot merged commit 2a07254 into kubernetes:master Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants