1. -r/--rhevm argument passing example is bogus since socket should be passed and not single ip 2. full command line example will be appreciated [root@dhcp-3-187 c53d1c87-5ce9-4134-b6a9-4b9d590840cb]# rhevm-image-uploader -u admin@internal -r leonid_rhevm.qa.lab.tlv.redhat.com:443 -e test_one upload /home/art_template.ovf Please provide the REST API password for the admin@internal RHEV-M user (CTRL+D to abort): ERROR: <urlopen error [Errno 113] No route to host> INFO: Use the -h option to see usage. Usage: rhevm-image-uploader [options] list rhevm-image-uploader [options] upload [file] The image uploader can be used to list export storage domains and upload OVF files to export storage domains. This tool only supports OVF files created by RHEV. OVF archives should have the following characteristics: 1. The OVF archive must be created with gzip compression. 2. The archive must have the following internal layout: |-- images | |-- <Image Group UUID> | |--- <Image UUID (this is the disk image)> | |--- <Image UUID (this is the disk image)>.meta |-- master | |---vms | |--- <UUID> | |--- <UUID>.ovf Options: -h, --help show this help message and exit --quiet intended to be used with "upload" operations to reduce console output. (default=False) --log-file=PATH path to log file (default=/var/log/rhevm/rhevm-image- uploader.log) --conf-file=PATH path to configuration file (default=/etc/rhevm/imageuploader.conf) -v, --verbose -f, --force replace like named files on the target file server (default=off) RHEV-M Configuration: The options in the RHEV-M group are used by the tool to gain authorization to the RHEV-M REST API. The options in this group are available for both list and upload commands. -u user.com, --user=user.com username to use with the RHEV-M REST API. This should be in UPN format. -r rhevm.example.com, --rhevm=rhevm.example.com hostname or IP address of the RHEV-M (default=localhost:8443). Export Storage Domain Configuration: The options in the upload configuration group should be provided to specify the export storage domain to which OVF files should be uploaded. -e EXPORT_STORAGE_DOMAIN, --export-domain=EXPORT_STORAGE_DOMAIN the export storage domain to which the file(s) should be uploaded -n NFSSERVER, --nfs-server=NFSSERVER the NFS server to which the file(s) should be uploaded. This option is an alternative to export- domain and should not be combined with export-domain. Use this when you want to upload files to a specific NFS server (e.g.--nfs- server=example.com:/path/to/some/dir) -i, --ovf-id use this option if you do not want to update the UUID of the image. By default, the tool will generate a new UUID for the image. This ensures that there is no conflict between the id of the incoming image and those already in RHEV-M. -d, --disk-instance-id use this option if do not you want to rename the instance ID for each disk (i.e. InstanceId) in the image. By default, this tool will generate new UUIDs for disks within the image to be imported. This ensures that there are no conflicts between the disks on the imported image and those within RHEV-M. -m, --mac-address use this option if do not you want to remove the network components from the image that will be imported. By default, this tool will remove any network interface cards from the image to prevent conflicts with NICs on other VMs within the RHEV-M. Once the image has been imported, simply use the RHEV-M to add NICs back and the RHEV-M will ensure that there are no MAC address conflicts. -N NEW_IMAGE_NAME, --name=NEW_IMAGE_NAME supply this option if you want to rename the image Return values: 0: The program ran to completion with no errors. 1: The program encountered a critical failure and stopped. 2: The program did not discover any export domains. 3: The program encountered a problem uploading to an export domain. 4: The program encountered a problem un-mounting and removing the temporary directory.
The command line example is not bogus. The error [1] is telling you that the RHEV-M is *unreachable* from your host. That is the real problem. [1] ERROR: <urlopen error [Errno 113] No route to host> Working example: [root@rhev3test2 ~]# rhevm-image-uploader -r rhev3test2.rhev.gsslab.rdu.redhat.com:8443 list Please provide the REST API username for RHEV-M (CTRL+D to abort): admin@internal Please provide the REST API password for the admin@internal RHEV-M user (CTRL+D to abort): Export Storage Domain Name | Datacenter | Export Domain Status mku-export | Default | active
I agree with you, but user is not aware of socket stuff, user will do ping to ip/hostname that he provided and see that ping is passing OK. So it will take time for user to understand that port is not OK. also we need to change "REST API" message to something different (maybe RHEVM user) since user may not be aware to REST API (for example administrator that is working only from GUI).
Keith, What needs to be done is to list the exact location you've tried to access, IE https://<host>:<port>/api This will give an indication to what may have gone wrong (Firewall, Service down, etc) And, we may need to finally get rid of the full usage message after an Error that is not related to wrong provided switches. The usage message is long and hides the error.
(In reply to comment #3) > Keith, > > What needs to be done is to list the exact location you've tried to access, > IE > https://<host>:<port>/api > > This will give an indication to what may have gone wrong (Firewall, Service > down, etc) > > > And, we may need to finally get rid of the full usage message after an Error > that is not related to wrong provided switches. The usage message is long > and hides the error. Printing of help was addressed by bug 858970. Will address error print improvement in this bug.
Duplicating this bug to a similar bug reported 10 minutes earlier. *** This bug has been marked as a duplicate of bug 858968 ***