Sean Dague 42e3402806 refactor templates into query_builder
as part of trying to simplify the core elasticRecheck, refactor
the query creation into a separate set of query_builder routines.
This takes away some of the duplication between the queries, and
attempts to add documentation to the uses for each of them.

add elasticRecheck fake pyelasticsearch testing

build basic fixtures for unit testing that let us fake out the
interaction to pyelasticsearch. This uses the json samples added
for previous testing as the return results should an inbound
query match one of the queries we know about.

If the query is unknown to us, return an empty result set. Unit
testing for both cases included going all the way from the top
level Classifier class.

Change-Id: I0d23b649274b31e8f281aaac588c4c6113a11a47
2013-10-21 13:46:57 -04:00

84 lines
3.7 KiB
YAML

- bug: 1226337
query: >
( @message:"NovaException: iSCSI device not found at"
OR message:"NovaException: iSCSI device not found at" )
AND filename:"logs/screen-n-cpu.txt"
- bug: 1211915
query: >
( @message:"ConnectionFailed: Connection to neutron failed: Maximum attempts reached"
OR message:"ConnectionFailed: Connection to neutron failed: Maximum attempts reached" )
AND filename:"console.html"
- bug: 1217734
query: >
( @message:"CalledProcessError: Command 'openssl' returned non-zero exit status"
OR message:"CalledProcessError: Command 'openssl' returned non-zero exit status" )
- bug: 1191960
query: >
(( @message:"Exit code: 5"
AND @message:" sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvremove -f" )
OR ( message:"Exit code: 5"
AND message:" sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvremove -f" ))
AND filename:"logs/screen-c-vol.txt"
- bug: 1225664
query: >
( @message:"Details: Time Limit Exceeded! (400s)while waiting for active, but we got killed."
OR message:"Details: Time Limit Exceeded! (400s)while waiting for active, but we got killed." )
AND filename:"console.html"
- bug: 1218391
query: >
( @message:"Cannot 'createImage'"
OR message:"Cannot 'createImage'" )
AND filename:"console.html"
- bug: 1229475
query: >
( @message:"Second simultaneous read on fileno"
OR message:"Second simultaneous read on fileno" )
- bug: 1230407
query: >
( @message:"Lock wait timeout exceeded; try restarting transaction"
OR message:"Lock wait timeout exceeded; try restarting transaction" )
AND filename:"logs/screen-q-svc.txt"
- bug: 1224001
query: >
( @message:"tempest.scenario.test_network_basic_ops AssertionError: Timed out waiting for"
OR message:"tempest.scenario.test_network_basic_ops AssertionError: Timed out waiting for" )
AND filename:"console.html"
- bug: 1235486
query: >
( @message:"update or delete on table \"networks\" violates foreign key constraint"
OR message:"update or delete on table \"networks\" violates foreign key constraint" )
AND filename:"logs/screen-q-svc.txt"
- bug: 1232748
query: >
( @message:"OperationalError: (OperationalError) could not translate host name \"localhost\" to address"
OR message:"OperationalError: (OperationalError) could not translate host name \"localhost\" to address" )
AND filename:"logs/screen-n-api.txt"
- bug: 1235435
query: >
(( @message:"One or more ports have an IP allocation from this subnet"
AND @message:" SubnetInUse: Unable to complete operation on subnet" )
OR ( message:"One or more ports have an IP allocation from this subnet"
AND message:" SubnetInUse: Unable to complete operation on subnet" ))
AND filename:"logs/screen-q-svc.txt"
- bug: 1235437
query: >
( @message:"failed to reach ACTIVE status within the required time (400 s). Current status: BUILD"
OR message:"failed to reach ACTIVE status within the required time (400 s). Current status: BUILD" )
AND filename:"console.html"
- bug: 1239637
query: >
( @message:"DBError: (IntegrityError) null value in column \"network_id\" violates not-null constraint"
OR message:"DBError: (IntegrityError) null value in column \"network_id\" violates not-null constraint" )
AND filename:"logs/screen-q-svc.txt"
- bug: 1239856
query: >
(( @message:"tempest/services" AND @message:"/images_client.py" AND @message:"wait_for_image_status" )
OR (message:"tempest/services" AND message:"/images_client.py" AND message:"wait_for_image_status" ))
AND filename:"console.html"
- bug: 1240256
query: >
( @message:" 503"
OR message:" 503" )
AND filename:"logs/syslog.txt"
AND syslog_program:"proxy-server"