29 Commits

Author SHA1 Message Date
Stephen Finucane
7f4a6211bf Mark raw strings as such
This is raising warnings now and will be an error in future versions of
Python 3.

Change-Id: I8827cb36ef2ef85e8f245a2a181fb23ee75bfd16
2018-07-06 14:01:28 +01:00
chenpengzi
2b4bf4b4b3 Delete meaningless and unused parameters
Change-Id: I63af79051b6848cf7ed0148bf26b3374f7771fbf
2018-01-29 11:39:06 +08:00
Chandan Kumar
0601be1bfd ported tools/*.py scripts to python3
Change-Id: Ib8dcc8b0c77515f8a302ed5bf03dc8283f36414b
2017-06-13 08:04:59 +05:30
Masayuki Igawa
134d9f748b
Introduce flake8-import-order
This commit introduces flake8-import-order to check import orders
automatically. We shouldn't do it manually.

Depends-On: Ia2140f5566ce169b076ffa5c9ebfbdbfc41e5bed
Change-Id: Iff75ebec42b295870edd1c04001adfb17460a682
2017-02-13 17:16:18 +09:00
Yatin Kumbhare
2e2c83a527 Keep py3.X compatibility for urllib
Change-Id: Iba10637688ada66f2e3003cd87bbba7d4db4abc7
Closes-Bug: #1280105
2016-05-30 22:50:15 +05:30
Ihar Hrachyshka
e43567667b Removed q-vpn from the list of dirty logs
The last gate that was producing the log was kilo. Since it's EOL now,
remove the reference.

Change-Id: I40cf34f53dcd9c3169922dc3b84756dfef09a381
2016-04-29 13:02:12 -07:00
caoyue
ab33302bd9 Replace exit() by sys.exit()
exit() is used for interactive shell, it relies on the site module.
sys.exit() is considered good to use in programs.

Trivial-fix

Change-Id: I9e6e7a53581abefbb6cc3ba6ee6b853cd430d456
2016-01-25 12:23:39 +00:00
Harshada Mangesh Kakad
b3ecf6534f Use six.StringIO/BytesIO instead of StringIO.StringIO
to keep Python 3.x compatibility, use six.StringIO/BytesIO to
replace StringIO.StringIO

StringIO works for unicode
BytesIO works for bytes

Change-Id: I063d62a4f005084f4088da403f348ad97656ad45
Partial-Bug: #1280100
2015-12-23 01:33:08 -08:00
Ihar Hrachyshka
226de0b8f8 Fixed a comment on dirty logs list
We've recently changed default behaviour to forbid any dirty logs for
services outside the list instead of explicitly enabling log checks for
specific services. The comment was not updated to reflect the change
though.

Change-Id: I5d5ba64d156a9b5318cfc2740b2a69d75de3c127
2014-10-31 13:56:36 +01:00
Jenkins
cc6ca0d184 Merge "Make output from check_logs less verbose" 2014-09-20 07:32:35 +00:00
Clark Boylan
a5c669d7f0 Properly detect grenade in check_logs script
The check logs script was not properly detecting grenade and would fail
grenade jobs if the logs were not clean. We don't want to do this
because the upgrade process is not log clean yet. Correct this by
setting grenade flag to true only if the DEVSTACK_GATE_GRENADE variable
has content.

Change-Id: Id8a339d78d981376b9af3a80aae8e4e18a68a85f
2014-09-03 21:48:49 -07:00
Matthew Treinish
1179205dbc Make output from check_logs less verbose
This commit changes the output of check_logs.py to be a bit more
concise and clear. Instead of printing out every instance of errors
found in the log files it will only print out which individual files
had errors. If a file is marked as not allowing ERRORS or TRACES it
also prints that along with the filename. This should hopefully avoid
confusion around the operation of this script running in the gate.

Change-Id: Ib2a9a9736470cd3b445fb51a95a1a6c6696bb2cc
2014-09-03 21:42:59 -04:00
Matthew Treinish
96e9e88dc0 Enable H407,H305,H307,E122 ignore E123
After bumping the hacking version to the 0.9.x series ignores were
added for several rules. This commit fixes the violations for a subset
of these rules and re-enables the checks.

E123 is ignored because this rule is ignored in the default pep8 by
default, due to a lack of consensus around it.

Change-Id: I8f14cd2ca6afc38d3fe8ee758272071111022896
2014-08-12 17:39:16 -04:00
Sean Dague
ef2865af43 remove n-sch from the watch list
we've seen no n-sch errors in passing gate runs in the last week,
I consider this sufficient proof that we're clean on n-sch for now.

Part of bp:clean-logs

Change-Id: Ife0e0602767e155fc645e07546bed36c2c060a20
2014-04-10 07:26:09 -04:00
Sean Dague
e2cda41ad5 ceilometer-collector now has errors
need to add this to the dirty list to make forward progress.

In order to make the results more readable we also need a line
break before the log file stanza.

Change-Id: I863a8a30384edf27a4ba761c707b5cf673c1f86e
2014-03-26 15:39:05 -04:00
Sean Dague
5d407e2125 change dirty logs to work off a whitelist
instead of marking the logs that we think should be clean, mark
the ones we think should be dirty. This means no new services can
come in with unclean logs.

remove the whitelist data, as that's currently obsolete, we'll
remove the code for it later.

Change-Id: I4b15c932b78f54ec371aa67c7b4e8248b3f9c0eb
2014-03-18 18:50:24 -04:00
David Kranz
5274de426f Allow failing logs with errors on a per-log-file basis
Change-Id: I382a173b9e2ad4cf2d6c5761db62722cb8828e55
2014-03-07 15:12:51 -05:00
David Kranz
002d684e0d add TRACE level to the items that are being flagged
Change-Id: I7f13829abe2f5c7a5f0b9173acf43b3c709b1a5e
2014-02-20 17:53:02 -05:00
Jenkins
c86d2e3da8 Merge "Dump all log errors to console" 2014-02-12 03:05:09 +00:00
Masayuki Igawa
e8d31a0b80 Remove vim headers
We don't need to have the vim headers in each source files. We can set
it in our vimrc file instead. Also if set incorrectly, gate (pep8 check)
will catch the mistakes.

More discussions:
http://lists.openstack.org/pipermail/openstack-dev/2013-October/017353.html

Change-Id: I43703e2289212389c7841f44691ae7849ed1f505
Closes-Bug: #1229324
2014-01-20 11:22:45 +09:00
David Kranz
955a9e39ec Dump all log errors to console
Errors that are not whitelisted are tagged for differentiation.

Change-Id: I1a4f392b3fe4276afbe1610af679d5e11ee8acad
2013-12-30 12:04:17 -05:00
Jenkins
69bcb82a7f Merge "Tighten ERROR regexp in log checker" 2013-12-16 03:12:31 +00:00
Sean Dague
1159e52a2c don't fail on dirty logs with grenade
because grenade is upgrading from old to new we might actually
expect the logs to be dirtier than in upstream tempest. The grenade
logs weren't scrubbed in the same ways during the development here
as the tempest regular runs.

Change-Id: Id1bcc2cc85e73a414d382756a65ea1d80dc10b00
Closes-Bug: #1259907
2013-12-13 18:46:21 -05:00
David Kranz
0e9ac35d6d Tighten ERROR regexp in log checker
Because each project uses a slightly different format for logging, and
sometimes different formats within a project, it is hard to match ERROR as
the log level across all log files. There was a failure caused by "ERROR"
actually showing up inside a keystone token. This change will prevent that
though it is still possible something else could slip through.

Change-Id: Ic8b036b4ed7481856231b2d073d273b1df783415
2013-12-11 13:59:05 -05:00
David Kranz
b705d466bd Start failing logs with errors except neutron
Change-Id: Ie9d52cca37fc02cdec506633b055e37c7e35fabe
2013-11-30 04:14:44 +00:00
David Kranz
78dc5abf0c Fix file print logic bug and update whitelist
Change-Id: I723cb28b05fda314fa42c4d9baf5b2d922446867
2013-11-29 14:13:20 -05:00
David Kranz
e07cdb8767 Dump all error messages for neutron
Also, prepare to fail all jobs except neutron if there are errors.

Change-Id: I6e8299b45a8845d9772f37feaf360b9bc1be2675
2013-11-27 10:53:54 -05:00
David Kranz
e8e263115b Script to filter logs for ERRORs based on whitelist
The script will take a directory or url containing log files.
For now all non-whitelisted errors will be dumped to the console but
the script will always return success. Once we are convinced it is reliable
enough we can change it to fail on non-whitelisted errors.

Partially implements blueprint fail-gate-on-log-errors

Change-Id: I30b0eee1055f47aaad7984d886c739ccf5aa6186
2013-10-11 09:27:11 -04:00
David Kranz
852c5c2eb2 Placeholder log check script to be called by devstack-gate
Partially implements blueprint fail-gate-on-log-errors

Change-Id: Ie07b7f95c1aa439ba21431cb08848e8ba6b90336
2013-10-07 11:15:02 -04:00