[Libguestfs] [PATCH v2 1/3] rhv-upload: Log params for easier debugging

Richard W.M. Jones rjones at redhat.com
Tue Nov 26 09:45:02 UTC 2019


On Tue, Nov 26, 2019 at 05:07:30AM +0200, Nir Soffer wrote:
> Log the params dict passed from v2v to the plugin for easier debugging.
> 
> Here is an example output:
> 
> using params: {'diskid_file': '/home/nsoffer/src/virt-v2v/tmp/rhvupload.To9y8J/diskid.0',
> 'disk_size': 6442450944, 'disk_format': 'raw', 'disk_name': 'v2v-000', 'output_name': 'v2v',
> 'verbose': True, 'output_conn': 'https://engine/ovirt-engine/api', 'output_password': '/var/tmp/engine-password',

I have verified that this only logs the file containing the password,
not the actual password.

> 'output_storage': 'nfs1-export2', 'output_sparse': True, 'rhv_cafile': '/etc/pki/vdsm/certs/cacert.pem',
> 'rhv_cluster': 'fc30', 'rhv_direct': True, 'insecure': True}
> ---
>  v2v/rhv-upload-plugin.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
> index 7ed521f3..a9e82250 100644
> --- a/v2v/rhv-upload-plugin.py
> +++ b/v2v/rhv-upload-plugin.py
> @@ -46,6 +46,7 @@ def config(key, value):
>      if key == "params":
>          with builtins.open(value, 'r') as fp:
>              params = json.load(fp)
> +        debug("using params: %s" % params)
>      else:
>          raise RuntimeError("unknown configuration key '%s'" % key)
>  

ACK

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list