Hi Yan,

 

You seems to set the test config file correctly.

I was able to reproduce the issue in my environment, basically it’s a bug in the test framework where the example given in consts/lab.py happened to have the same controller-0 IP as yours while the rest of the OAM IPs are different, so it got confused.

To work around it, you need to comment out the example in class Labs in consts/lab.py as following:

 

class Labs:

 

    # EXAMPLE = {

    #     'short_name': 'my_server',

    #     'name': 'my_server.com',

    #     'floating ip': '10.10.10.2',

    #     'controller-0 ip': '10.10.10.3',

    #     'controller-1 ip': '10.10.10.4',

    # }

pass

 

I will upload a fix for this issue.

 

BR,

Yang

 

 

From: Chen, Yan [mailto:yan.chen@intel.com]
Sent: August-04-19 11:07 PM
To: Liu, Yang; starlingx-discuss@lists.starlingx.io
Subject: RE: How to run stx-test: automated-pytest-suite?

 

Thanks for reply!

 

I tried to remove and delete stx-openstack application but natbox will still be configured if I don’t remove the natbox config from my test.conf.

And if I removed natbox config, I got another error said “Active controller ssh client is not set!”

 

I’m wondering if I configured the test correctly, is there any document for this test suite? I tried to follow the readme under the stx-test repo, but I’m not sure that’s updated.

 

 

Yan

 

From: Liu, Yang [mailto:yang.liu@windriver.com]
Sent: Friday, August 2, 2019 01:22
To: Chen, Yan <yan.chen@intel.com>; starlingx-discuss@lists.starlingx.io
Subject: RE: How to run stx-test: automated-pytest-suite?

 

Hi Yan,

 

Could you please attach the full log? The active controller client should have been set while pytest is collecting the test cases prior to setup step 1 even started.  

It should be under ~/AUTOMATION_LOGS/<floatingip>/<session_dir>/TIS_AUTOMATION.log

 

Also assuming we figured out above issue, seems your goal is to run platform sanity that is not dependent on stx-openstack, at the moment, the setup automatically detects stx-openstack, and if it’s applied, it will also expect the tenants,users,neutron routers,networks to have been created to prepare for stx-openstack test.

To work around it, you can do one of the two things for now.

1. Remove stx-openstack

2. In file /home/ec/workspace/codebase/test/automated-pytest-suite/setups.py, modify following function:

def setup_natbox_ssh(natbox, con_ssh):

return None

 

To fix it properly,  we can add a configurable option to the test config file to skip the setup even if stx-openstack is present.

 

BR,

yang

 

From: Chen, Yan [mailto:yan.chen@intel.com]
Sent: August-01-19 4:01 AM
To: starlingx-discuss@lists.starlingx.io
Subject: [Starlingx-discuss] How to run stx-test: automated-pytest-suite?

 

Hi,

 

I’m trying to run the automated-pytest-suite cases under stx-test on a simplex deployment (on a vm created by qemu kvm).

The controller-0 is already unlocked and stx-openstack applied successfully.

 

I tried to make my own test.conf following the sample config file (stx-test_template.conf) as attached.

And I tried to run cases with the following command:

$ pytest -m platform_sanity --testcase-config=./test.conf testcases/

 

But I got the following error log at the setup step 1:

[2019-08-01 07:44:23,466] 1477 INFO  MainThread ssh.set_natbox_client:: NatBox localhost ssh client is set

[2019-08-01 07:44:23,466] 1425 INFO  MainThread ssh.get_natbox_client:: Getting NatBox Client...

[2019-08-01 07:44:25,322] 845  INFO  MainThread container_helper.is_stx_openstack_deployed:: ['applied']

[2019-08-01 07:44:25,322] 109  INFO  MainThread setups.setup_keypair:: scp key file from controller to NATBox

***Failure at test setup: /home/ec/workspace/codebase/test/automated-pytest-suite/utils/clients/ssh.py:1549: utils.exceptions.ActiveControllerUnsetException: Active controller ssh client is not set! Please use ControllerClient.set_active_controller(ssh_client) to set an active controller client.

ERROR

 

I’m wondering if this NATBox configuration is a must and if I configured it correctly?

Anyone can help on the test config file?

Or is there anything I need to do before the test?

 

Thanks a lot!

 

 

Yan