[ovirt-users] ovirt-shell -- cannot even get started

Juan Hernández jhernand at redhat.com
Thu Mar 16 22:23:28 UTC 2017


On 03/16/2017 09:48 PM, Phil Meyer wrote:
> This is either some very obscure syntax, or it may not be working.
> 
> Difficult to tell, since the error message seems to be generic:
> 
> ...
> 
>   ==================================== ERROR
> =================================
> "https://engine-tst/ovirt-engine/api" is invalid url format, valid
> format is http[s]://server:port/path, where path is usually
> "ovirt-engine/api" or, for older versions of the engine, just "api".
>  
> ============================================================================
> ...
> 
> That error is reported no matter where it is run from, and no matter what
> 
> combination of manual or automated interaction is used.
> 
> 
> It should not be this hard.
> 
> 42 different combinations were tried.
> 
> 
> In one instance when using localhost as the hostname, it actually asked for
> 
> the certificate first, and then gave me the same error as above.
> 
> 
> Lets just say that the command line was very familiar to me when Larry Wall
> 
> wrote the Configure script (that was before the GNU configure scripts).
> 
> 
> A strait up actual example that works would be nice, or an explanation of
> 
> prerequisites, if there are any.  None are stated.
> 
> 
> There is lots of mention of port numbers, but no actual port numbers
> suggested.
> 
> Does not the ovirt-shell talk to the web server at port 443 if https is
> specified?
> 
> 
> The lsof command does not show any listeners that seem likely as a cli
> interface:
> 
> -> sudo lsof  -i | grep -i listen
> systemd       1            root   42u  IPv6   9030      0t0  TCP
> *:sunrpc (LISTEN)
> systemd       1            root   43u  IPv4   9031      0t0  TCP
> *:sunrpc (LISTEN)
> ovirt-ima   582            root    5u  IPv4   9196      0t0  TCP *:54323
> (LISTEN)
> ovirt-web   954           ovirt    4u  IPv4  14915      0t0  TCP
> *:synchronet-db (LISTEN)
> httpd       959            root    4u  IPv6  18622      0t0  TCP *:http
> (LISTEN)
> httpd       959            root    6u  IPv6  18630      0t0  TCP *:https
> (LISTEN)
> sshd        962 ovirt-vmconsole    3u  IPv4  17902      0t0  TCP
> *:EtherNet/IP-1 (LISTEN)
> sshd        962 ovirt-vmconsole    4u  IPv6  17904      0t0  TCP
> *:EtherNet/IP-1 (LISTEN)
> sshd       1048            root    3u  IPv4  19474      0t0  TCP *:ssh
> (LISTEN)
> sshd       1048            root    4u  IPv6  19477      0t0  TCP *:ssh
> (LISTEN)
> postgres   1237        postgres    3u  IPv4  19552      0t0  TCP
> *:postgres (LISTEN)
> postgres   1237        postgres    4u  IPv6  19553      0t0  TCP
> *:postgres (LISTEN)
> java       3042           ovirt  371u  IPv6  20711      0t0  TCP
> localhost:8702 (LISTEN)
> java       3042           ovirt  389u  IPv6  24722      0t0  TCP
> localhost:8706 (LISTEN)
> 
> 
> And yes, the unfamiliar ones were tried. :)
> 
> 
> The last straw was when a packet sniffer failed to capture ANY traffic
> related to these
> 
> attempts.  Apparently the ovirt-shell command fails before even
> attempting a connection.
> 

This is a bug in the CLI:

  Invalid URL format when there are no dots in the host name
  https://bugzilla.redhat.com/1186365

The problem is that the CLI tries to verify the validity of the URL, and
it expects at least one dot in the host name:

  engine-tst.something

It was decided to not fix that bug because the CLI is deprecated since
version 4.0 of the engine, and will be removed in version 4.2.

As a workaround, try to use a fully qualified host name, which will most
probably include a dot anyhow. And you will need that fully qualified
host name anyhow, if you want to safely verify the certificate of the
server. See the bug for details. Alternatively you can use the IP
address directly.

As I said, the CLI is deprecated, so if you are starting from scratch,
I'd suggest you avoid it completely. Use one of the Ansible modules:

  https://docs.ansible.com/ansible/list_of_cloud_modules.html#ovirt

Or one of the SDKs:

  Python:
  https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk

  Ruby:
  https://github.com/oVirt/ovirt-engine-sdk-ruby/tree/master/sdk

  Java:
  https://github.com/oVirt/ovirt-engine-java/tree/master/sdk



More information about the Users mailing list