[
https://issues.apache.org/jira/browse/CLOUDSTACK-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rayees Namathponnan updated CLOUDSTACK-7890:
--------------------------------------------
Issue Type: Test (was: Bug)
> [Automation] Fix the script "test_security_groups.py" - Host password is
> hardcoded in the script
> ------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-7890
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7890
> Project: CloudStack
> Issue Type: Test
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Automation, Test
> Affects Versions: 4.5.0
> Reporter: Chandan Purushothama
> Assignee: Gaurav Aradhye
> Priority: Critical
> Fix For: 4.5.0
>
>
> Error Information:
> {noformat}
> Test router services for user account ... === TestName:
> test_01_dhcpOnlyRouter | Status : EXCEPTION ===
> ERROR
> ======================================================================
> ERROR: Test router services for user account
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/root/cloudstack/test/integration/component/test_security_groups.py",
> line 803, in test_01_dhcpOnlyRouter
> "service dnsmasq status"
> File "/usr/local/lib/python2.7/dist-packages/marvin/lib/utils.py", line
> 198, in get_process_status
> ssh = SshClient(hostip, port, username, password)
> File "/usr/local/lib/python2.7/dist-packages/marvin/sshClient.py", line 81,
> in __init__
> raise internalError("SSH Connection Failed")
> internalError: SSH Connection Failed
> -------------------- >> begin captured stdout << ---------------------
> === TestName: test_01_dhcpOnlyRouter | Status : EXCEPTION ===
> .
> .
> .
> test_01_dhcpOnlyRouter
> (integration.component.test_security_groups.TestDhcpOnlyRouter): DEBUG:
> Response : [{cpuwithoverprovisioning : u'57600.0', version :
> u'4.5.0-SNAPSHOT', memorytotal : 7405795840, zoneid :
> u'9cec8ff5-9118-4630-a9a8-39a8f8385d57', cpunumber : 32, managementserverid :
> 151976082488674, cpuallocated : u'1.56%', memoryused : 1666909, id :
> u'a17339b5-b717-4721-9d93-f623b5a2e776', cpuused : u'0.02%',
> hypervisorversion : u'6.2.0', clusterid :
> u'ae8494c4-be80-46ad-931c-d16d26e28f4c', capabilities : u'xen-3.0-x86_64 ,
> xen-3.0-x86_32p , hvm-3.0-x86_32 , hvm-3.0-x86_32p , hvm-3.0-x86_64', state :
> u'Up', memoryallocated : 805306368, networkkbswrite : 7096, cpuspeed : 1800,
> cpusockets : 2, type : u'Routing', events : u'PingTimeout;
> StartAgentRebalance; AgentDisconnected; Remove; AgentConnected;
> ManagementServerDown; ShutdownRequested; HostDown; Ping', zonename :
> u'XenRT-Zone-0', podid : u'a1df9408-4a7f-4aab-b114-492e1c3a3f58', clustertype
> : u'CloudManaged', hahost : False, lastpinged : u'1970-01-17T00:03:38+0000',
> ipaddress : u'10.220.113.7', disconnected : u'2014-11-12T14:20:30+0000', name
> : u'carp', networkkbsread : 7306, created : u'2014-11-12T14:17:53+0000',
> clustername : u'XenRT-Zone-0-Pod-0-Cluster-0', hypervisor : u'XenServer',
> islocalstorageactive : False, resourcestate : u'Enabled', podname :
> u'XenRT-Zone-0-Pod-0'}]
> test_01_dhcpOnlyRouter
> (integration.component.test_security_groups.TestDhcpOnlyRouter): DEBUG:
> Router ID: 35172b4f-8656-48e3-b2a4-c06697785eb2, state: Running
> sshClient: DEBUG: ====Trying SSH Connection: Host:10.220.113.7 User:root
> Port:22 RetryCnt:60===
> paramiko.transport: DEBUG: starting thread (client mode): 0x364be50L
> paramiko.transport: INFO: Connected (version 2.0, client OpenSSH_4.3)
> paramiko.transport: DEBUG: kex algos:[u'diffie-hellman-group-exchange-sha1',
> u'diffie-hellman-group14-sha1', u'diffie-hellman-group1-sha1'] server
> key:[u'ssh-rsa', u'ssh-dss'] client encrypt:[u'aes128-ctr', u'aes192-ctr',
> u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-cbc', u'3des-cbc',
> u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour',
> u'[email protected]'] server encrypt:[u'aes128-ctr', u'aes192-ctr',
> u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-cbc', u'3des-cbc',
> u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour',
> u'[email protected]'] client mac:[u'hmac-md5', u'hmac-sha1',
> u'hmac-ripemd160', u'[email protected]', u'hmac-sha1-96',
> u'hmac-md5-96'] server mac:[u'hmac-md5', u'hmac-sha1', u'hmac-ripemd160',
> u'[email protected]', u'hmac-sha1-96', u'hmac-md5-96'] client
> compress:[u'none', u'[email protected]'] server compress:[u'none',
> u'[email protected]'] client lang:[u''] server lang:[u''] kex follows?False
> paramiko.transport: DEBUG: Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
> paramiko.transport: DEBUG: using kex diffie-hellman-group1-sha1; server key
> type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local
> hmac-sha1, remote hmac-sha1; compression: local none, remote none
> paramiko.transport: DEBUG: Switch to new keys ...
> paramiko.transport: DEBUG: Adding ssh-rsa host key for 10.220.113.7:
> 3bb7765e9dbc2247db28f2ae9c6dcff5
> paramiko.transport: DEBUG: userauth is OK
> paramiko.transport: INFO: Authentication (password) failed.
> sshClient: ERROR: SshClient: Exception under createConnection: ['Traceback
> (most recent call last):\n', ' File
> "/usr/local/lib/python2.7/dist-packages/marvin/sshClient.py", line 121, in
> createConnection\n timeout=self.timeout)\n', ' File
> "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 273, in
> connect\n self._auth(username, password, pkey, key_filenames, allow_agent,
> look_for_keys)\n', ' File
> "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 456, in
> _auth\n raise saved_exception\n', 'AuthenticationException: Authentication
> failed.\n']
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/marvin/sshClient.py", line
> 121, in createConnection
> timeout=self.timeout)
> File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 273,
> in connect
> self._auth(username, password, pkey, key_filenames, allow_agent,
> look_for_keys)
> File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 456,
> in _auth
> raise saved_exception
> AuthenticationException: Authentication failed.
> {noformat}
> Dictionary used in the current script:
> {code}
> self.services = {
> "disk_offering": {
> "displaytext": "Small",
> "name": "Small",
> "disksize": 1
> },
> "account": {
> "email": "[email protected]",
> "firstname": "Test",
> "lastname": "User",
> "username": "test",
> # Random characters are appended in create account to
> # ensure unique username generated each time
> "password": "password",
> },
> "virtual_machine": {
> # Create a small virtual machine instance with disk offering
> "displayname": "Test VM",
> "username": "root", # VM creds for SSH
> "password": "password",
> "ssh_port": 22,
> "hypervisor": 'XenServer',
> "privateport": 22,
> "publicport": 22,
> "protocol": 'TCP',
> "userdata": 'This is sample data',
> },
> "host": {
> "publicport": 22,
> "username": "root", # Host creds for SSH
> "password": "password",
> },
> "service_offering": {
> "name": "Tiny Instance",
> "displaytext": "Tiny Instance",
> "cpunumber": 1,
> "cpuspeed": 100, # in MHz
> "memory": 128, # In MBs
> },
> "security_group": {
> "name": 'SSH',
> "protocol": 'TCP',
> "startport": 22,
> "endport": 22,
> "cidrlist": '0.0.0.0/0',
> },
> "security_group_2": {
> "name": 'ICMP',
> "protocol": 'ICMP',
> "startport": -1,
> "endport": -1,
> "cidrlist": '0.0.0.0/0',
> },
> "ostype": 'CentOS 5.3 (64-bit)',
> # CentOS 5.3 (64-bit)
> "sleep": 60,
> "timeout": 10,
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)