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

Add pprof support to ark server #234

Merged
merged 1 commit into from
Dec 5, 2018
Merged

Conversation

ncdc
Copy link
Contributor

@ncdc ncdc commented Dec 1, 2017

Fixes #85

There is a new ark server flag: --profiler-address. It defaults to localhost:6060. This means by default it's only accessible if you use kubectl port-forward, but you can change it to something like :6060 and put a service + ingress in front if you want to make it publicly accessible. There is no authentication for it at this time.

This does not add pprof support for plugin processes. Those tend to be relatively short-lived. If needed, in the future we could add some sort of debugging flag that would capture various pprof data from plugin processes and store it in files local to the ark server pod, and they could be retrieved after the fact by hand using kubectl cp or some other mechanism.

@rosskukulinski rosskukulinski added Enhancement/Dev Internal or Developer-focused Enhancement to Velero and removed Enhancement labels Jun 25, 2018
@ncdc
Copy link
Contributor Author

ncdc commented Jul 5, 2018

Closing for now. Will reopen if/when necessary.

@ncdc ncdc closed this Jul 5, 2018
@ncdc ncdc reopened this Nov 21, 2018
@ncdc ncdc changed the title WIP add pprof support Add pprof support to ark server Nov 21, 2018
@ncdc
Copy link
Contributor Author

ncdc commented Nov 21, 2018

I have a test image, ncdc/ark:pprof, with this PR. You can use kubectl -n heptio-ark port-forward deploy/ark 6060 and then access the pprof page at http://localhost:6060/debug/pprof/.

@ncdc ncdc force-pushed the pprof branch 2 times, most recently from 094abd0 to 604a6b9 Compare December 4, 2018 17:02
@skriss skriss requested a review from nrb December 4, 2018 17:22
Copy link
Member

@skriss skriss left a comment

Choose a reason for hiding this comment

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

LGTM. @nrb pls review

@skriss
Copy link
Member

skriss commented Dec 4, 2018

@wwitzel3 one thing I'm realizing is that we're gonna end up with a lot of merge conflicts in CHANGELOG.md since every concurrent PR (e.g. this one) will be trying to add a line in the same place. Any ideas?

@ncdc
Copy link
Contributor Author

ncdc commented Dec 4, 2018 via email

@skriss
Copy link
Member

skriss commented Dec 4, 2018

Yeah, I think that's what restic does

@nrb
Copy link
Contributor

nrb commented Dec 4, 2018

Either separate files or delay until ready to merge, but I don't like that.

OpenStack used reno for making the files and managing merges at release time; not advocating it's use here, but something to think about for tooling. https://docs.openstack.org/reno/latest/

Copy link
Contributor

@nrb nrb left a comment

Choose a reason for hiding this comment

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

LGTM once the changelog conflict is resolved.

@nrb
Copy link
Contributor

nrb commented Dec 4, 2018

@skriss Looks like restic does it all in the main file.

If your pull request changes anything that users should be aware of (a bugfix, a new feature, ...) please add an entry to the file 'CHANGELOG.md'. It will be used in the announcement of the next stable release. While writing, ask yourself: If I were the user, what would I need to be aware of with this change.

@skriss
Copy link
Member

skriss commented Dec 4, 2018

@nrb their PR template has you add a changelog entry here: https://github.com/restic/restic/tree/master/changelog/unreleased

With a new file per PR. This is definitely what I did for the one or two PRs I submitted to restic. Then the maintainer updates CHANGELOG.md once per release. Guessing that the CONTRIBUTING.md is just out of date.

@wwitzel3
Copy link
Contributor

wwitzel3 commented Dec 4, 2018

Having an changelog/unreleased folder with a file per PR is easy and common across a lot of projects. I will go ahead and make a new PR that updates the root CHANGELOG.md and our CONTRIBUTING.md.

I'll ticket that up and get that updated. In the meantime, @ncdc if you want to just create the unreleased folder under changelog and add your entry there, I'll take care of the rest.

@ncdc
Copy link
Contributor Author

ncdc commented Dec 5, 2018

I've added the unreleased folder and an initial attempt at an entry for this PR. I went with the "easy" approach for now (see discussion at #1112 (comment))

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
@wwitzel3 wwitzel3 merged commit 5464b3d into vmware-tanzu:master Dec 5, 2018
@ncdc ncdc deleted the pprof branch December 5, 2018 15:31
dymurray pushed a commit to dymurray/velero that referenced this pull request Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement/Dev Internal or Developer-focused Enhancement to Velero
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants