1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
7 This section gives some guidelines about how to troubleshoot the test cases
10 **IMPORTANT**: As in the previous section, the steps defined below must be
11 executed inside the Functest Docker container and after sourcing the OpenStack
18 source /home/opnfv/functest/conf/openstack.creds
23 This section covers the test cases related to the VIM (healthcheck, vping_ssh,
24 vping_userdata, tempest_smoke_serial, tempest_full_parallel, rally_sanity,
29 For both vPing test cases (**vPing_ssh**, and **vPing_userdata**), the first steps are
34 * Create Security Group
37 After these actions, the test cases differ and will be explained in their
40 These test cases can be run inside the container, using new Functest CLI as follows::
42 $ functest testcase run vping_ssh
43 $ functest testcase run vping_userdata
45 The Functest CLI is designed to route a call to the corresponding internal
46 python scripts, located in paths
47 /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/vping/vping_ssh.py
48 and /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/vping/vping_userdata.py
52 #. There is one difference, between the Functest CLI based test case
53 execution compared to the earlier used Bash shell script, which is
54 relevant to point out in troubleshooting scenarios:
56 The Functest CLI does **not yet** support the option to suppress
57 clean-up of the generated OpenStack resources, following the execution
60 Explanation: After finishing the test execution, the corresponding
61 script will remove, by default, all created resources in OpenStack
62 (image, instances, network and security group). When troubleshooting,
63 it is advisable sometimes to keep those resources in case the test
64 fails and a manual testing is needed.
66 It is actually still possible to invoke test execution, with suppression
67 of OpenStack resource cleanup, however this requires invocation of a
68 **specific Python script:** 'run_tests'.
69 The `OPNFV Functest Developer Guide`_ provides guidance on the use of that
70 Python script in such troubleshooting cases.
72 Some of the common errors that can appear in this test case are::
74 vPing_ssh- ERROR - There has been a problem when creating the neutron network....
76 This means that there has been some problems with Neutron, even before creating the
77 instances. Try to create manually a Neutron network and a Subnet to see if that works.
78 The debug messages will also help to see when it failed (subnet and router creation).
79 Example of Neutron commands (using 10.6.0.0/24 range for example)::
81 neutron net-create net-test
82 neutron subnet-create --name subnet-test --allocation-pool start=10.6.0.2,end=10.6.0.100 \
83 --gateway 10.6.0.254 net-test 10.6.0.0/24
84 neutron router-create test_router
85 neutron router-interface-add <ROUTER_ID> test_subnet
86 neutron router-gateway-set <ROUTER_ID> <EXT_NET_NAME>
88 Another related error can occur while creating the Security Groups for the instances::
90 vPing_ssh- ERROR - Failed to create the security group...
92 In this case, proceed to create it manually. These are some hints::
94 neutron security-group-create sg-test
95 neutron security-group-rule-create sg-test --direction ingress --protocol icmp \
96 --remote-ip-prefix 0.0.0.0/0
97 neutron security-group-rule-create sg-test --direction ingress --ethertype IPv4 \
98 --protocol tcp --port-range-min 80 --port-range-max 80 --remote-ip-prefix 0.0.0.0/0
99 neutron security-group-rule-create sg-test --direction egress --ethertype IPv4 \
100 --protocol tcp --port-range-min 80 --port-range-max 80 --remote-ip-prefix 0.0.0.0/0
102 The next step is to create the instances. The image used is located in
103 */home/opnfv/functest/data/cirros-0.3.5-x86_64-disk.img* and a Glance image is created
104 with the name **functest-vping**. If booting the instances fails (i.e. the status
105 is not **ACTIVE**), you can check why it failed by doing::
108 nova show <INSTANCE_ID>
110 It might show some messages about the booting failure. To try that manually::
112 nova boot --flavor m1.small --image functest-vping --nic net-id=<NET_ID> nova-test
114 This will spawn a VM using the network created previously manually.
115 In all the OPNFV tested scenarios from CI, it never has been a problem with the
116 previous actions. Further possible problems are explained in the following sections.
121 This test case creates a floating IP on the external network and assigns it to
122 the second instance **opnfv-vping-2**. The purpose of this is to establish
123 a SSH connection to that instance and SCP a script that will ping the first
124 instance. This script is located in the repository under
125 /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/vping/ping.sh
126 and takes an IP as a parameter. When the SCP is completed, the test will do a
127 SSH call to that script inside the second instance. Some problems can happen
130 vPing_ssh- ERROR - Cannot establish connection to IP xxx.xxx.xxx.xxx. Aborting
132 If this is displayed, stop the test or wait for it to finish, if you have used
133 the special method of test invocation with specific supression of OpenStack
134 resource clean-up, as explained earler. It means that the Container can not
135 reach the Public/External IP assigned to the instance **opnfv-vping-2**. There
136 are many possible reasons, and they really depend on the chosen scenario. For
137 most of the ODL-L3 and ONOS scenarios this has been noticed and it is a known
140 First, make sure that the instance **opnfv-vping-2** succeeded to get an IP
141 from the DHCP agent. It can be checked by doing::
143 nova console-log opnfv-vping-2
145 If the message *Sending discover* and *No lease, failing* is shown, it probably
146 means that the Neutron dhcp-agent failed to assign an IP or even that it was not
147 responding. At this point it does not make sense to try to ping the floating IP.
149 If the instance got an IP properly, try to ping manually the VM from the container::
155 If the ping does not return anything, try to ping from the Host where the Docker
156 container is running. If that solves the problem, check the iptable rules because
157 there might be some rules rejecting ICMP or TCP traffic coming/going from/to the
160 At this point, if the ping does not work either, try to reproduce the test
161 manually with the steps described above in the vPing common section with the
164 neutron floatingip-create <EXT_NET_NAME>
165 nova floating-ip-associate nova-test <FLOATING_IP>
168 Further troubleshooting is out of scope of this document, as it might be due to
169 problems with the SDN controller. Contact the installer team members or send an
170 email to the corresponding OPNFV mailing list for more information.
176 This test case does not create any floating IP neither establishes an SSH
177 connection. Instead, it uses nova-metadata service when creating an instance
178 to pass the same script as before (ping.sh) but as 1-line text. This script
179 will be executed automatically when the second instance **opnfv-vping-2** is booted.
181 The only known problem here for this test to fail is mainly the lack of support
182 of cloud-init (nova-metadata service). Check the console of the instance::
184 nova console-log opnfv-vping-2
186 If this text or similar is shown::
188 checking http://169.254.169.254/2009-04-04/instance-id
189 failed 1/20: up 1.13. request failed
190 failed 2/20: up 13.18. request failed
191 failed 3/20: up 25.20. request failed
192 failed 4/20: up 37.23. request failed
193 failed 5/20: up 49.25. request failed
194 failed 6/20: up 61.27. request failed
195 failed 7/20: up 73.29. request failed
196 failed 8/20: up 85.32. request failed
197 failed 9/20: up 97.34. request failed
198 failed 10/20: up 109.36. request failed
199 failed 11/20: up 121.38. request failed
200 failed 12/20: up 133.40. request failed
201 failed 13/20: up 145.43. request failed
202 failed 14/20: up 157.45. request failed
203 failed 15/20: up 169.48. request failed
204 failed 16/20: up 181.50. request failed
205 failed 17/20: up 193.52. request failed
206 failed 18/20: up 205.54. request failed
207 failed 19/20: up 217.56. request failed
208 failed 20/20: up 229.58. request failed
209 failed to read iid from metadata. tried 20
211 it means that the instance failed to read from the metadata service. Contact
212 the Functest or installer teams for more information.
218 In the upstream OpenStack CI all the Tempest test cases are supposed to pass.
219 If some test cases fail in an OPNFV deployment, the reason is very probably one
222 +-----------------------------+-----------------------------------------------------+
224 +=============================+=====================================================+
225 | Resources required for test | Such resources could be e.g. an external network |
226 | case execution are missing | and access to the management subnet (adminURL) from |
227 | | the Functest docker container. |
228 +-----------------------------+-----------------------------------------------------+
229 | OpenStack components or | Check running services in the controller and compute|
230 | services are missing or not | nodes (e.g. with "systemctl" or "service" commands).|
231 | configured properly | Configuration parameters can be verified from the |
232 | | related .conf files located under '/etc/<component>'|
234 +-----------------------------+-----------------------------------------------------+
235 | Some resources required for | The tempest.conf file, automatically generated by |
236 | execution test cases are | Rally in Functest, does not contain all the needed |
237 | missing | parameters or some parameters are not set properly. |
238 | | The tempest.conf file is located in directory |
239 | | 'root/.rally/verification/verifier-<UUID> |
240 | | /for-deployment-<UUID>' |
241 | | in the Functest Docker container. Use the "rally |
242 | | deployment list" command in order to check the UUID |
243 | | the UUID of the current deployment. |
244 +-----------------------------+-----------------------------------------------------+
247 When some Tempest test case fails, captured traceback and possibly also the
248 related REST API requests/responses are output to the console. More detailed debug
249 information can be found from tempest.log file stored into related Rally deployment
256 The same error causes which were mentioned above for Tempest test cases, may also
257 lead to errors in Rally as well.
259 Possible scenarios are:
271 To know more about what those scenarios are doing, they are defined in directory:
272 /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/rally/scenario
273 For more info about Rally scenario definition please refer to the Rally official
274 documentation. `[3]`_
276 To check any possible problems with Rally, the logs are stored under
277 */home/opnfv/functest/results/rally/* in the Functest Docker container.
286 If the Basic Restconf test suite fails, check that the ODL controller is
287 reachable and its Restconf module has been installed.
289 If the Neutron Reachability test fails, verify that the modules
290 implementing Neutron requirements have been properly installed.
292 If any of the other test cases fails, check that Neutron and ODL have
293 been correctly configured to work together. Check Neutron configuration
294 files, accounts, IP addresses etc.).
300 Please refer to the dedicated feature user guides for details.
308 vIMS deployment may fail for several reasons, the most frequent ones are
309 described in the following table:
311 +-----------------------------------+------------------------------------+
313 +===================================+====================================+
314 | Keystone admin API not reachable | Impossible to create vIMS user and |
316 +-----------------------------------+------------------------------------+
317 | Impossible to retrieve admin role | Impossible to create vIMS user and |
319 +-----------------------------------+------------------------------------+
320 | Error when uploading image from | impossible to deploy VNF |
321 | OpenStack to glance | |
322 +-----------------------------------+------------------------------------+
323 | Cinder quota cannot be updated | Default quotas not sufficient, they|
324 | | are adapted in the script |
325 +-----------------------------------+------------------------------------+
326 | Impossible to create a volume | VNF cannot be deployed |
327 +-----------------------------------+------------------------------------+
328 | SSH connection issue between the | if vPing test fails, vIMS test will|
329 | Test Docker container and the VM | fail... |
330 +-----------------------------------+------------------------------------+
331 | No Internet access from the VM | the VMs of the VNF must have an |
332 | | external access to Internet |
333 +-----------------------------------+------------------------------------+
334 | No access to OpenStack API from | Orchestrator can be installed but |
335 | the VM | the vIMS VNF installation fails |
336 +-----------------------------------+------------------------------------+
338 Please note that this test case requires resources (8 VM (2Go) + 1 VM (4Go)), it
339 is there fore not recommended to run it on a light configuration.
341 .. _`OPNFV Functest Developer Guide`: http://artifacts.opnfv.org/functest/docs/devguide/#