34 Commits

Author SHA1 Message Date
Jenkins
6f23555c95 Merge "Fix error in 'ip netns' parsing" 2017-02-26 21:43:54 +00:00
John L. Villalovos
c6e6939e89 Fix error in 'ip netns' parsing
Sometimes when doing worlddump would see a command line like this:
 sudo ip netns exec (id: ip addr

This would cause an error to be seen in console.log:
  2017-02-07 00:03:03.659570 | /bin/sh: 1: Syntax error: "(" unexpected

This is caused by there sometimes being extra data returned from the
'ip netns' command [1]. For example it might look like:
    qrouter-0805fd7d-c493-4fa6-82ca-1c6c9b23cd9e (id: 1)
    qdhcp-bb2cc6ae-2ae8-474f-adda-a94059b872b5 (id: 0)

[1] https://lwn.net/Articles/629715/

Change-Id: Icece442023125ef55696b8d92a975d37e358b1b4
Closes-Bug: 1653969
2017-02-14 09:29:54 -08:00
John L. Villalovos
09949e0dc6 worlddump: Use __future__ print_function
Commit e7361775c112e32ea517eddc344641897d273d25 changed the code to
use Python 3 style print function, but when doing 'print()' in Python
2.7 it would print '()':
    >>> print()
    ()

Import the __future__ print function so that a blank line will be
printed as expected. This will now work the same in Python 2 & 3.

Change-Id: I61742e107278f2327c18c9ab0de52d1914f16c97
2017-02-06 13:55:52 -08:00
Eric Harney
d8682dbdf9 worlddump: Add cinder-volume guru meditation report
cinder also supports GMR, it would be good
to have this when debugging gate failures.

Change-Id: I4db6dfd810d011faaca084e0dacaec4031b2a4ff
2016-10-14 14:38:10 -04:00
yan.haifeng
6ba17f7d01 Fix ovs-vsctl executed in worlddump.py failed issue
add sudo before ovs-vsctl command.

Change-Id: I1a7dd9504da766beb452bd749e325931678de64e
Closes-Bug: #1576560
2016-05-09 03:02:15 +00:00
Ihar Hrachyshka
ef219bfcaf worlddump: request Guru Mediation reports for neutron agents
Those reports may be helpful when debugging neutron gate issues.

pgrep is backwards compatible with old Solaris tools, which means it
does not match with commands that are longer than 15 characters. To
avoid that for neutron agent names which are longer than that, we need
to pass -f argument to match against the full cmdline.

Also killall instead of kill + pgrep in a subshell.

Change-Id: I9b3801e927c0e80443ed76e38cd8e3618e888e49
2016-04-15 08:27:54 +02:00
Jenkins
6452968cc9 Merge "In worlddump, execute ovs-ofctl for an only existing bridge" 2016-04-13 23:48:51 +00:00
fumihiko kakuma
578459f808 In worlddump, execute ovs-ofctl for an only existing bridge
When devstack fails, some or all bridges may not exist.
This change allows an only existing bridge to executes ovs-ofctl command.
And fix duplicate ofp version specified in protocol option of ovs-ofctl.

Change-Id: Ied01de727ca9b867ce87db358f72ae44838b63af
2016-04-14 07:25:05 +10:00
Jenkins
c93ccfcc1a Merge "print statment has become a function in py3" 2016-04-13 17:17:08 +00:00
Eyal
e7361775c1 print statment has become a function in py3
Change-Id: Ia616e1fdd4c3fc8e1a36b026e0c3e2a568dc6517
2016-04-10 08:30:29 +03:00
fumihiko kakuma
2bd2568bd1 Fix a typo in comment for _get_ofp_version
OpenFlow11 -> OpenFlow10

Change-Id: I2a501ccd32f5f7a39fd4bc746f00ca3f67bd98c1
2016-04-05 10:51:14 +09:00
fumihiko kakuma
6099401e00 In worlddump, cover all supported version of OpenFlow protocol by ovs-ofctl
Currently ovs-ofctl command is executed for only default ofp version
(OpenFlow10).
Some Neutron's plugin uses OpenFlow13 and in that case ovs-ofctl fails.
This chage allows us to get ovs info for all ofp versions supported by ovs.
And adds dump by dump-ports and dump-ports-desc.

Change-Id: I2d3c42835a5ad0f5ebf540e8127762f466347c9c
2016-04-01 12:21:29 +09:00
Ihar Hrachyshka
7976aacdf6 worlddump: log command failure details
If a command we trigger fails for some reason, it's worth logging
details about the failure (like return code).

Change-Id: Ib19aa474eccdd11e138a4f55e125935b621bca05
2016-03-03 15:31:43 +01:00
Chris Dent
57d79673d9 Skip ovs_ and ebtables_dump if needed commands not present
Skip with a notification that a command was not found when trying
to run a dump that relies on optional external command.

Otherwise we produce noise in the error output that is misleading.

Change-Id: I0e3d99da8c54d2912463ecba7c1783864a7c7fc7
Closes-Bug: #1548833
Closes-Bug: #1506873
2016-02-24 02:51:26 +00:00
Jenkins
0afc6db67a Merge "worlddump: collect networking stack info from namespaces" 2016-02-17 15:08:49 +00:00
Jenkins
2da17a0b65 Merge "worlddump: add empty newline after every command output" 2016-02-14 14:42:51 +00:00
Ihar Hrachyshka
c1b7cb1117 worlddump: include Open vSwitch info
This may be useful when debugging neutron gate failures.

Change-Id: Iea3589456d2b05d233ba88523a5bd4ac114a0c86
2016-02-11 16:12:20 +01:00
Ihar Hrachyshka
190b29d45e worlddump: add empty newline after every command output
It makes it a bit easier to read the output since each new command is
now visually separated from the output of the previous one.

Change-Id: If441c61bb6f13f85f771dd31609b10d3dd1ee93c
2016-02-11 16:09:28 +01:00
Ihar Hrachyshka
72c34ee1aa worlddump: collect networking stack info from namespaces
Neutron hugely relies on namespaces, so we should try to dump
internal IP stack state for non-root network namespaces.

Change-Id: Ib980d22fbf3c6b680473754fa2b1684c2ef91b72
2016-02-11 16:08:16 +01:00
Jenkins
c8f3ac23c3 Merge "worlddump: Use SIGUSR2 instead of SIGUSR1" 2016-01-25 15:33:03 +00:00
Sean Dague
5c5e08669c loop all ebtables tables
ebtables has 3 built in tables, if we don't call them out we only get
'filter' (per man page).

Change-Id: I52360cbb3b910cb492b61e2314848cc29dcd8266
2015-11-09 14:08:15 -05:00
Kashyap Chamarthy
8872545a0f worlddump: Use SIGUSR2 instead of SIGUSR1
The function guru_meditation_report() currently uses the User-defined
signal SIGUSR1 to kill a Nova Compute process so that a Guru Meditation
Report is generated.

Testing locally, in a DevStack instance, manually attempting to kill a
Nova compute process [kill -s USR1 `pgrep nova-compute`] does not result
in process being terminated, and no error report generated.

It turns out[1] that SIGUSR1 is used by Apache 'mod_wsgi'.

Using the signal SIGUSR2 resolves this issue (i.e. 'nova-compute'
process is terminated, and the Guru Meditation Report is generated).

So, use USR2, instead of USR1.

Corresponding oslo.reports related commit[2].

[1] https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIRestrictSignal
[2] 45b1c02d113051d147e54ef921ce8e94135542d8 -- guru_meditation_report:
    Use SIGUSR2 instead of SIGUSR1
[3] Original DevStack commit that brought in this change --
    2ebe993b25462919e8aeeb896c9f91b6be7aa573

Change-Id: I8a7eaf71b83edca3c80074d6bf2d471e3db6142b
2015-09-24 18:41:15 +02:00
Sean Dague
2da606da2e add ebtables to world dump
I'm still at a loss about why guests stop being pingable in grenade,
so lets get ourselves some ebtables output as well.

Change-Id: I4e40eff6d0b1ef194e43b151a83206fbd50deb66
2015-08-06 10:02:43 -04:00
Sean Dague
ac9313e5a5 add -n --name flag to worlddump
We're worlddumping at success points in grenade, and it would be much
handier to explain when that happens via a symbolic name in the
filename. Add a --name option to worlddump to allow it.

Change-Id: I644200fe08e404dc7ca2006478ae4e11ca020672
2015-07-27 13:33:30 -04:00
Ian Wienand
3a9df1dab7 Check for nova-compute before running kill
Unconditionally running this can lead to confusing failure output from
kill as the pgrep matches nothing when nova-compute isn't yet running.

Change-Id: I37cb84fe8e0b393f49b8907af16a3e44f82c46a6
2015-07-01 06:18:47 +10:00
Ian Wienand
99440f9d59 Wait for command in worlddump
Wait for the command to complete and catch errors when running
commands.

Change-Id: I2c93b3bdd930ed8564e33bd2d45fe4e3f08f03f5
2015-07-01 06:14:01 +10:00
Amey Bhide
432268b17b Fix NameError in worlddump.py
Change-Id: Ie87e5b5ead777c0153ed7fa5d1db5cc1ae444261
2015-06-30 11:41:13 -07:00
Anandprakash Dnyaneshwar Tandale
bde24cb7c2 Fixing the deprecated library function
os.popen() is deprecated since version 2.6. Resolved with use of
    subprocess module.

Change-Id: Ib6a91ee525e2e57d3901d2c0c1b2d1305bc4566f
2015-06-29 15:04:30 +05:30
Joe Gordon
2ebe993b25 guru meditation report for nova-compute in worlddump
Nova-compute is hanging in the multinode test, and its difficult to
figure out why. So trigger a guru meditation report for nova-compute in
worlddump so we can see what nova-compute is doing when it is hung.

Having a hung nova-compute causes tempest to fail and
I035fe8e3333034e44b403ed0f986220ab5b0e57a runs worlddump whenever
tempest fails.

Bug 1462305 is one of the last issues left before the multinode job is
stable enough to gate on, and this patch should make it much easier to
debug.

Change-Id: I87d7536b5992c47b8082684cc662f953113fd1a8
Related-Bug: #1462305
2015-06-07 17:01:52 +09:00
Sean Dague
737e94202f dump compute consoles on fail as well
This provides a dump of the compute consoles as well on failure.

Change-Id: Ib253537a54a1b9d83a930bbefa4512e039575fd1
2015-05-13 05:58:41 -04:00
Sean Dague
60a140571e add network info to the worlddump
This adds potentially helpful networking info to the world dump.

It also refactors some of the output mechanisms into reusable
functions for cleanliness in the code.

Change-Id: I39f95bd487c152925f8fadd1799149db35cffd52
2015-05-11 14:56:49 -04:00
Sean Dague
168b7c226c dump iptables in the worlddump
If we fail during devstack / grenade runs, it would be nice to have
the map of iptables that are currently active as well. This makes it
handy to start figuring out what's going on when test servers don't
ping.

Change-Id: Ia31736ef2cb0221586d30c089473dfdc1db90e23
2015-05-07 08:57:28 -04:00
Dean Troyer
bba4742e8c Add parent id to worlddump output
Helpful in tracking down some process-doesn't-die problems.

Change-Id: I146910403879c9a85d644bd07a53830ea17ca77d
2015-03-28 13:37:41 -05:00
Sean Dague
97fcc7b27b add worlddump tool to devstack
when we exit poorly, start building a tool for doing a capture
as to why. This tool is expected to be consumed directly from
grenade as well.

Change-Id: Ia1bc1c2e259587035ca7252baceec25fa464cb82
2014-06-22 11:37:51 -04:00