test_network_basic_ops could not ssh into instance with password

Bug #1400638 reported by Wang Bo
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Wishlist
Jason Wong

Bug Description

In case tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops, function self.check_public_network_connectivity(should_connect=True) called following function to ssh into the booted instance to verify the network connectivity. https://github.com/openstack/tempest/blob/master/tempest/scenario/manager.py#L485.

However, there is no "password" parameter but only "private_key" which resulted in that It could not ssh into instance with password. The configuration item "ssh_auth_method" in tempest.conf doesn't work.I think we should add a password parameter into this function to enable it.

Masayuki Igawa (igawa)
Changed in tempest:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Jason Wong (wantwatering) wrote :

Yes I've met the same issue.

ssh_auth_method is only used to check if it's set as 'disabled'. The default value is 'keypair' and other options such as 'configured' doesn't work. So there is no way to test SSH with username and password although this kind of testing is rare.

Revision history for this message
Jason Wong (wantwatering) wrote :

Also the SSH username is retrieved from different config for different test cases.

e.g. test_network_basic_ops gets the username from 'image_ssh_user' and test_server_basic_ops gets it from 'ssh_user_regex' such as '[["^.*[Cc]irros.*$", "cirros"]]'.

I'll try to change a bit to use ssh_auth_method for choosing different SSH method.

Changed in tempest:
status: Confirmed → In Progress
assignee: nobody → j.w. (wantwatering)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/168253

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/169317

Changed in tempest:
assignee: Jason Wong (wantwatering) → Hugh Saunders (hughsaunders)
Revision history for this message
Hugh Saunders (hughsaunders) wrote :

Apologies Jason, I didn't mean to steal this bug, however I don't seem to have permissions to assign it back to you.

Changed in tempest:
assignee: Hugh Saunders (hughsaunders) → nobody
Revision history for this message
Jason Wong (wantwatering) wrote :

Never mind Saunders:) It doesn't matter.

Changed in tempest:
assignee: nobody → Jason Wong (wantwatering)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/168253
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=896300ca7cd13749ad10609ade557b3140b2c269
Submitter: Jenkins
Branch: master

commit 896300ca7cd13749ad10609ade557b3140b2c269
Author: wantwatering <email address hidden>
Date: Fri Mar 27 15:17:42 2015 +0800

    Allow SSH instance with username and password in scenario cases

    Current scenario test cases only allow SSH with keypair.
    Here we change the entrance where call SSH client:
    scenario.manager.get_remote_client(). Check the ssh_auth_method to
    decide which way should be picked, pass a None private to paramiko
    if username/password has been chosen and vice versa.

    Since disable ssh_auth_method makes most of the scenario test cases
    meaningless, here the disable flag is not checked and the SSH method
    is either username/password or private key.

    TO test the modification for username/password authentication with
    cirros, set tempest.conf as below and run senario test cases:

    [compute]
    ...
    image_ssh_user = cirros
    image_ssh_password = cubswin:)
    ssh_auth_method = configured #default is keypair
    run_ssh = True #If want to test scenario.test_server_basic_opts
    ...

    [scenario]
    ...
    ssh_user = cirros
    ...

    TODO in the next:
    SSH username and password come from different config options.
    e.g. some of the scenario cases use compute.image_ssh_password and
    compute.image_ssh_user, some of them use scenario.ssh_user or
    input-scenario.ssh_user_regex. And the rest use all of them. It's
    hard for user to configure for all the cases since they need to
    modify many places for username, password etc. It's better to use the
    same place to configure them.

    Change-Id: I48e3689c4040b18e887284b8eec3a6537c6adb50
    Closes-Bug: #1400638

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by Ken'ichi Ohmichi (<email address hidden>) on branch: master
Review: https://review.openstack.org/169317
Reason: As http://lists.openstack.org/pipermail/openstack-dev/2016-May/096204.html , we start abandoning patches have gotten old without any updating after negative feedback. Please restore if necessary to restart this again.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.