<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Thanks for reply!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">And if I removed natbox config, I got another error said “Active controller ssh client is not set!”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Yan<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><a name="_____replyseparator"></a><b>From:</b> Liu, Yang [mailto:yang.liu@windriver.com]
<br>
<b>Sent:</b> Friday, August 2, 2019 01:22<br>
<b>To:</b> Chen, Yan <yan.chen@intel.com>; starlingx-discuss@lists.starlingx.io<br>
<b>Subject:</b> RE: How to run stx-test: automated-pytest-suite?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Hi Yan, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">It should be under ~/AUTOMATION_LOGS/<floatingip>/<session_dir>/TIS_AUTOMATION.log<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">To work around it, you can do one of the two things for now.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">1. Remove stx-openstack<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2. In file </span>/home/ec/workspace/codebase/test/automated-pytest-suite/setups.py, modify following function:<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">def setup_natbox_ssh(natbox, con_ssh):<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span style="color:#1F497D">return None<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">BR,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">yang<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif"> Chen, Yan [<a href="mailto:yan.chen@intel.com">mailto:yan.chen@intel.com</a>]
<br>
<b>Sent:</b> August-01-19 4:01 AM<br>
<b>To:</b> <a href="mailto:starlingx-discuss@lists.starlingx.io">starlingx-discuss@lists.starlingx.io</a><br>
<b>Subject:</b> [Starlingx-discuss] How to run stx-test: automated-pytest-suite?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m trying to run the automated-pytest-suite cases under stx-test on a simplex deployment (on a vm created by qemu kvm).<o:p></o:p></p>
<p class="MsoNormal">The controller-0 is already unlocked and stx-openstack applied successfully.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I tried to make my own test.conf following the sample config file (<a href="https://opendev.org/starlingx/test/src/branch/master/automated-pytest-suite/stx-test_template.conf" title="stx-test_template.conf"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#4183C4;background:white;text-decoration:none">stx-test_template.conf</span></a>)
as attached.<o:p></o:p></p>
<p class="MsoNormal">And I tried to run cases with the following command:<o:p></o:p></p>
<p class="MsoNormal">$ pytest -m platform_sanity --testcase-config=./test.conf testcases/<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But I got the following error log at the setup step 1:<o:p></o:p></p>
<p class="MsoNormal">[2019-08-01 07:44:23,466] 1477 INFO MainThread ssh.set_natbox_client:: NatBox localhost ssh client is set<o:p></o:p></p>
<p class="MsoNormal">[2019-08-01 07:44:23,466] 1425 INFO MainThread ssh.get_natbox_client:: Getting NatBox Client...<o:p></o:p></p>
<p class="MsoNormal">[2019-08-01 07:44:25,322] 845 INFO MainThread container_helper.is_stx_openstack_deployed:: ['applied']<o:p></o:p></p>
<p class="MsoNormal">[2019-08-01 07:44:25,322] 109 INFO MainThread setups.setup_keypair:: scp key file from controller to NATBox<o:p></o:p></p>
<p class="MsoNormal">***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.<o:p></o:p></p>
<p class="MsoNormal">ERROR<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m wondering if this NATBox configuration is a must and if I configured it correctly?<o:p></o:p></p>
<p class="MsoNormal">Anyone can help on the test config file?<o:p></o:p></p>
<p class="MsoNormal">Or is there anything I need to do before the test?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks a lot!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>