[openstack-dev] "tempest.lib.common.ssh AuthenticationException: Authentication failed." error when run“tempest.api.compute.servers.test_create_server.ServersTestJSON.test_host_name_is_same_as_server_name”
李冰
lib78 at chinaunicom.cn
Wed Nov 30 06:39:37 UTC 2016
Hello~ Anyone would concern:
We are running the API tests on our cloud with the refstack-client tool. We have prepared the prerequisites required by the official guide.
However, the results reported the “tempest.lib.common.ssh AuthenticationException: Authentication failed.” error and the test for “tempest.api.compute.servers.test_create_server.ServersTestJSON.test_host_name_is_same_as_server_name” Failed.
We have googled this problem but no useful solutions are found. Would anyone pay attention on our problem and give some advices to solve the error ?
My openstack is Icehouse version,
#nova-manage version
2014.1.3
The official refstack-client guide we refer to is https://github.com/openstack/refstack-client.
More details related to the error are followings:
1、Execute compute cases
# ./refstack-client test -c ~/refstack-client/.tempest/etc/tempest.conf -v -- tempest.api.compute.servers.test_create_server.ServersTestJSON.test_host_name_is_same_as_server_name
2、The test output
==============================
Failed 1 tests - output below:
==============================
tempest.api.compute.servers.test_create_server.ServersTestJSON.test_host_name_is_same_as_server_name[id-ac1ad47f-984b-4441-9274-c9079b7a0666]
---------------------------------------------------------------------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/root/refstack-client/.tempest/tempest/api/compute/servers/test_create_server.py", line 139, in test_host_name_is_same_as_server_name
self.assertTrue(linux_client.hostname_equals_servername(self.name))
File "/root/refstack-client/.tempest/tempest/common/utils/linux/remote_client.py", line 104, in hostname_equals_servername
actual_hostname = self.exec_command("hostname").rstrip()
File "/root/refstack-client/.tempest/tempest/common/utils/linux/remote_client.py", line 55, in wrapper
six.reraise(*original_exception)
File "/root/refstack-client/.tempest/tempest/common/utils/linux/remote_client.py", line 36, in wrapper
return function(self, *args, **kwargs)
File "/root/refstack-client/.tempest/tempest/common/utils/linux/remote_client.py", line 92, in exec_command
return self.ssh_client.exec_command(cmd)
File "/root/refstack-client/.tempest/tempest/lib/common/ssh.py", line 118, in exec_command
ssh = self._get_ssh_connection()
File "/root/refstack-client/.tempest/tempest/lib/common/ssh.py", line 88, in _get_ssh_connection
password=self.password)
tempest.lib.exceptions.SSHTimeout: Connection to the 10.20.14.210 via SSH timed out.
User: root, Password: L7%Md%~Ms_IPk^y
Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
2016-11-30 13:54:45,569 8867 INFO [tempest.lib.common.ssh] Creating ssh connection to '10.20.14.210' as 'root' with public key authentication
2016-11-30 13:55:16,911 8867 INFO [paramiko.transport] Connected (version 2.0, client OpenSSH_5.3)
2016-11-30 13:55:28,209 8867 INFO [paramiko.transport] Authentication (publickey) failed.
2016-11-30 13:55:30,143 8867 INFO [paramiko.transport] Authentication (password) failed.
2016-11-30 13:55:30,167 8867 WARNING [tempest.lib.common.ssh] Failed to establish authenticated ssh connection to root at 10.20.14.210 (Authentication failed.). Number attempts: 1. Retry after 2 seconds.
2016-11-30 13:55:32,683 8867 INFO [paramiko.transport] Connected (version 2.0, client OpenSSH_5.3)
2016-11-30 13:55:42,812 8867 INFO [paramiko.transport] Authentication (publickey) failed.
2016-11-30 13:55:45,175 8867 INFO [paramiko.transport] Authentication (password) failed.
2016-11-30 13:55:45,187 8867 WARNING [tempest.lib.common.ssh] Failed to establish authenticated ssh connection to root at 10.20.14.210 (Authentication failed.). Number attempts: 2. Retry after 3 seconds.
2016-11-30 13:55:48,703 8867 INFO [paramiko.transport] Connected (version 2.0, client OpenSSH_5.3)
2016-11-30 13:55:58,798 8867 INFO [paramiko.transport] Authentication (publickey) failed.
2016-11-30 13:56:00,883 8867 INFO [paramiko.transport] Authentication (password) failed.
2016-11-30 13:56:00,905 8867 WARNING [tempest.lib.common.ssh] Failed to establish authenticated ssh connection to root at 10.20.14.210 (Authentication failed.). Number attempts: 3. Retry after 4 seconds.
……(The same log messages repeat several times)
3.Compute and validation configuration section in tempest.conf file
[compute]
image_ref = c02e19e0-dee2-4d71-bb6b-3246475cd2e9
image_ref_alt = be289150-38ac-41b9-9eb3-bdd27f0ea8bc
flavor_ref = 2
flavor_ref_alt = 4
fixed_network_name = net4
region = RegionOne
endpoint_type = adminURL
[compute-feature-enabled]
allow_port_security_disabled = true
disk_config = true
resize = true
shelve = false
enable_instance_password = false
snapshot = true
[validation]
run_validation = true
connect_method = fixed
image_ssh_password = root
network_for_ssh = net4
[volume]
[volume-feature-enabled]
api_v2 = false
4、Our cloud environment
# nova image-list (the image used in this test)
+--------------------------------------+-------------------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+-------------------------+--------+--------+
| be289150-38ac-41b9-9eb3-bdd27f0ea8bc | centos5.4 | ACTIVE | |
| c02e19e0-dee2-4d71-bb6b-3246475cd2e9 | centos6.4 | ACTIVE | |
# neutron net-show 9dcab88a-8004-4a04-842a-145631227439
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 9dcab88a-8004-4a04-842a-145631227439 |
| name | net4 |
| provider:network_type | vlan |
| provider:physical_network | default |
| provider:segmentation_id | 14 |
| router:external | False |
| shared | True |
| status | ACTIVE |
| subnets | 7b7c5588-c7a7-4112-8ef2-beaead279b98 |
| tenant_id | 6a803a617ad845d682462fa4b59ef7b0 |
+---------------------------+--------------------------------------+
# neutron subnet-show 7b7c5588-c7a7-4112-8ef2-beaead279b98
+------------------+------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------+
| allocation_pools | {"start": "10.20.14.2", "end": "10.20.14.254"} |
| cidr | 10.20.14.0/24 |
| dns_nameservers | 114.114.114.114 |
| enable_dhcp | True |
| gateway_ip | 10.20.14.1 |
| host_routes | |
| id | 7b7c5588-c7a7-4112-8ef2-beaead279b98 |
| ip_version | 4 |
| name | net4 |
| network_id | 9dcab88a-8004-4a04-842a-145631227439 |
| tenant_id | 6a803a617ad845d682462fa4b59ef7b0 |
+------------------+------------------------------------------------+
5、 nova version
#nova-manage version
2014.1.3
Thanks very much. We are looking forward to the reply from anyone would concern.
Sincerely,
Lucy Lee
2016年11月30日
lib78 at chinaunicom.cn
ChinaUnicom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20161130/bfe7435f/attachment.html>
More information about the OpenStack-dev
mailing list