Bug #2723

Can not use “--cluster” with “--user/--password”

Added by EOLE Team over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:02/10/2014
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:CLI
Target version:Release 4.6
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.4

Description

Hello,

We only test with the onevnet command:

system@nebula:~$ onevnet create --user oneadmin --password xxxxxxxxxx -c MyCluster /tmp/my-vnet
/usr/lib/one/ruby/opennebula/client.rb:76:in `initialize': ONE_AUTH file not present (RuntimeError)
        from /usr/lib/one/ruby/cli/one_helper.rb:289:in `new'
        from /usr/lib/one/ruby/cli/one_helper.rb:289:in `get_client'
        from /usr/lib/one/ruby/cli/one_helper.rb:297:in `client'
        from /usr/lib/one/ruby/cli/one_helper.rb:601:in `rname_to_id'
        from /usr/lib/one/ruby/cli/one_helper/onecluster_helper.rb:28
        from /usr/lib/one/ruby/cli/command_parser.rb:500:in `call'
        from /usr/lib/one/ruby/cli/command_parser.rb:500:in `parse'
        from /usr/lib/one/ruby/cli/command_parser.rb:499:in `each'
        from /usr/lib/one/ruby/cli/command_parser.rb:499:in `parse'
        from /usr/lib/one/ruby/cli/command_parser.rb:442:in `run'
        from /usr/lib/one/ruby/cli/command_parser.rb:76:in `initialize'
        from /usr/bin/onevnet:34:in `new'
        from /usr/bin/onevnet:34

Regards.

Associated revisions

Revision 5ad7d821
Added by Javi Fontan over 7 years ago

bug #2723: fix use of --user with --cluster in the cli

--cluster param needs to create a client to search for the cluster. This
happens while the parameters are being parsed so it fails if there is no
ONE_AUTH. To make it work the parameters user, password and endpoint
are saved as OneHelper class variables as soon as they are parsed. This way
they can be used to create the XMLRPC client before all parameters are parsed.

Revision e0b7b1de
Added by Javi Fontan over 7 years ago

bug #2723: fix use of --user with --cluster in the cli

--cluster param needs to create a client to search for the cluster. This
happens while the parameters are being parsed so it fails if there is no
ONE_AUTH. To make it work the parameters user, password and endpoint
are saved as OneHelper class variables as soon as they are parsed. This way
they can be used to create the XMLRPC client before all parameters are parsed.

(cherry picked from commit 5ad7d82109d3e96db43a98317a8883f3d01c9623)

History

#1 Updated by Ruben S. Montero over 7 years ago

  • Status changed from Pending to New
  • Assignee set to Javi Fontan
  • Target version set to Release 4.6

I can confirm this thanks. The user/password is not considered if ONE_AUTH or ~/.one is not present

#2 Updated by Javi Fontan over 7 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF