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

a verbose/trace mode for the govc CLI that says what action, request, and response is being done #1124

Closed
jtarchie opened this issue May 11, 2018 · 7 comments · Fixed by #2263

Comments

@jtarchie
Copy link

We were using the cli for import.ova and had it sit there with a blank screen. We discovered that it was user error, as the VM name and VM folder had been specified inversely.

It took us a whole morning to find that out though.

The CLI provided no feedback that something was wrong besides it not exiting and obviously in some waiting state.

In our steps to debug, we used the --debug flag. It provided no immediate feedback to stdout/stderr of what the CLI was doing. We did eventually find that the hundreds of xml files in a directory.

From a user perspective, we assumed that --debug was similar to --verbose (ie curl --verbose http://google.com). Where it would give an indication of what action the CLI was trying to do. An action is something that the CLI is performing on your behalf -- interacting with a third party CLI, retrying in N seconds, etc.

This would be extremely useful for future debugging.

In our use case with import.ova, a verbose option turned on with our error might look like:

$ govc --verbose import.ova -options=options.json
* Attemping to create VM "OM_NAME" in "OM_FOLDER"
* Folder "OM_FOLDER" does not exist
* Retrying in 10 seconds
* Folder "OM_FOLDER" does not exist
* Retrying in 10 seconds
# ....
@jtarchie
Copy link
Author

We experienced this with another issue when trying to create a folder with govc folder.create "testing_folder_name", the CLI just waits, with no output of what is happening to the user.

@dougm
Copy link
Member

dougm commented May 16, 2018

Agreed. We need to make --debug more usable. There is a script to help, but we shouldn't need a script: https://github.com/vmware/govmomi/blob/master/scripts/debug-xmlformat.sh

I like the idea of a new --verbose flag, this would be separate from --debug.

It also sounds like there's also an issue with the progress package and/or import.ova command, it should have errored out in this case.

@jtarchie
Copy link
Author

cc: @kcboyle

@kcboyle
Copy link

kcboyle commented Oct 4, 2018

@dougm Is this being actively worked on? If not we are happy to do the work and submit a PR?

@dougm
Copy link
Member

dougm commented Oct 5, 2018

@kcboyle haven't had a chance myself and don't think anyone else is working on it. That would be great if you can work on it and submit a PR!

@dougm dougm modified the milestones: 2018.09, 2018.12 Oct 9, 2018
@dougm dougm removed this from the 2018.12 milestone Feb 7, 2019
@mooperd
Copy link

mooperd commented Dec 1, 2019

+1 - govc is very blackboxy and difficult to debug.

@dougm
Copy link
Member

dougm commented Jan 10, 2020

#1648 might be useful, but likely too verbose in many cases.

@dougm dougm added this to the 0.24 milestone Jun 12, 2020
@dougm dougm modified the milestones: 0.24, 0.25 Dec 18, 2020
dougm added a commit to dougm/govmomi that referenced this issue Jan 31, 2021
This flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

Fixes vmware#1124
dougm added a commit to dougm/govmomi that referenced this issue Feb 1, 2021
This flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

Fixes vmware#1124
dougm added a commit to dougm/govmomi that referenced this issue Feb 1, 2021
This flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

Fixes vmware#1124
dougm added a commit to dougm/govmomi that referenced this issue Feb 7, 2021
This flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

Fixes vmware#1124
dougm added a commit to dougm/govmomi that referenced this issue Mar 15, 2021
This flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

Fixes vmware#1124
dougm added a commit to dougm/govmomi that referenced this issue Mar 21, 2021
This flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

Fixes vmware#1124
dougm added a commit to dougm/govmomi that referenced this issue Mar 21, 2021
The '-trace' flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

The '-verbose' flag logs request/response in a more compact format.

Fixes vmware#1124
protochron pushed a commit to protochron/govmomi that referenced this issue Aug 31, 2021
The '-trace' flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

The '-verbose' flag logs request/response in a more compact format.

Fixes vmware#1124
nikhaild pushed a commit to nikhaild/govmomi that referenced this issue Sep 13, 2021
The '-trace' flag piggy backs the '-debug' flag, writing formatted SOAP and REST traffic to stderr.

The '-verbose' flag logs request/response in a more compact format.

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

Successfully merging a pull request may close this issue.

4 participants