Closed Bug 948533 Opened 11 years ago Closed 10 years ago

refactor CrashData and Priorityjobs middleware services

Categories

(Socorro Graveyard :: Middleware, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lars, Assigned: adrian)

References

Details

(Whiteboard: [config change][qa-])

Attachments

(2 files, 2 obsolete files)

the CrashData service needs to invoke the Priorityjobs service if the requested processed crash is not processed yet.

The filesystem classes were hard coded to use the old Postgres Priorityjobs service while the hbase classes were hard coded to the correct RabbitMQ Priorityjobs service.  The new 'hb' classes didn't even have a CrashData service.

This PR refactors the CrashData service for fs, filesystem, hb and hbase classes adding a Priorityjobs service "discovery".  It then has the middleware default to using the modern hb and fs classes rather than the older filesystem and hbase classes
Attachment #8345417 - Flags: review?(adrian)
Attachment #8345417 - Flags: review?(adrian) → review+
Commit pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/57d67c455e034ce7fc9513dca7a7e22e94fcade9
Merge pull request #1729 from twobraids/refactor-CrashData-PriorityJobs

fixes Bug 948533 (v72) - refactor CrashData and Priorityjobs middleware services
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
the required config change is to comment out this line in the [implementations] section:

#service_overrides='CrashData: hbase, Correlations: http, CorrelationsSignatures: http, SuperSearch: es'
Whiteboard: [config change]
Target Milestone: --- → 71
Target Milestone: 71 → 72
Bumping to verified as [qa-]
Status: RESOLVED → VERIFIED
Whiteboard: [config change] → [config change][qa-]
This was reverted because of problems on stage.
Blocks: 794548
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
The config change that needs to be made:  eliminate all references in config to:
* socorro.external.hbase
* socorro.external.filesytem

in the middleware.ini [resources] section, change:
* [[hbase]] becomes [[hb]]
* [[filesystem]] becomes [[fs]]
* +include ./common_hbase.ini  becomes  +include ./common_hb.ini
* +include ./common_filesystem.ini  becomes  +include ./common_fs.ini
Attachment #8345417 - Attachment is obsolete: true
Attachment #8360502 - Flags: review?(adrian)
the darn PR is failing jenkins again - pushing out to 73 - out of time
Target Milestone: 72 → 73
Comment on attachment 8360502 [details] [review]
PR to refactor the CrashData and Priorityjob services

PR is not ready for review, it doesn't pass jenkins. Please ping me on github when it's ready.
Attachment #8360502 - Flags: review?(adrian)
No longer blocks: 794548
Lars tells me you're going to attempt to work on this instead.
Assignee: lars → adrian
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: 73 → 74
Commit pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/ffcddc74874c75d6a5a548e38afcbe3be46beed5
Merge pull request #1795 from twobraids/refactor-priority

fixes Bug 948533 (v74) - refactor CrashData and Priorityjobs middleware services
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
This was backed out of master yesterday. Why?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
it fell on its face again.  It went to staging, I adjusted the configuration for it, but it still did not run properly.  I got many errors indicative of deeper problems than just configuration, such as:

 [client 10.8.81.216] TypeError: __init__() got an unexpected keyword argument 'all_services'

I did not have time to debug as this stopped other people from working.  I withdrew the patch so that we may work on it in a more leisurely manner without the pressure.
Target Milestone: 74 → 75
Target Milestone: 75 → 76
Following :adrian's request to have :lars' modifications applied to Stage middleware.ini .
Attachment #8379069 - Flags: review?(adrian)
Comment on attachment 8379069 [details] [diff] [review]
proposed config changes to middleware.ini

The last line won't work, we want to keep using elasticsearch for our Search service. Please do the following instead:

     # comma separated list of class overrides, e.g `Crashes: hbase`
-    service_overrides="CrashData: hbase, Correlations: http, CorrelationsSignatures: http, SuperSearch: es, Search: es"
+    service_overrides="CrashData: hbase, Correlations: http, CorrelationsSignatures: http, SuperSearch: es, Priorityjobs: rabbitmq, Search: es"
Attachment #8379069 - Flags: review?(adrian) → review-
Attachment #8379069 - Attachment is obsolete: true
Attachment #8379078 - Flags: review?(adrian)
Attachment #8379078 - Flags: review?(adrian) → review+
Staging middleware.ini patched (Attachment #8379078 [details] [diff]) and committed to Puppet.
I forgot something in the needed config changes:

[implementations]

    # list of packages for service implementations
-    implementation_list='psql: socorro.external.postgresql, hbase: socorro.external.hbase, es: socorro.external.elasticsearch, fs: socorro.external.filesystem, http: socorro.external.http'
+    #implementation_list='psql: socorro.external.postgresql, hbase: socorro.external.hbase, es: socorro.external.elasticsearch, fs: socorro.external.filesystem, http: socorro.external.http'

Please make that change in our stage configuration. And if you can make a diff that has the previous changes as well for reference, that would be awesome!
Index: stage/etc-socorro/middleware.ini
===================================================================
--- stage/etc-socorro/middleware.ini	(revision 82852)
+++ stage/etc-socorro/middleware.ini	(working copy)
@@ -210,7 +210,7 @@
 [implementations]

     # list of packages for service implementations
-    implementation_list='psql: socorro.external.postgresql, hbase: socorro.external.hbase, es: socorro.external.elasticsearch, fs: socorro.external.filesystem, http: socorro.external.http'
+    #implementation_list='psql: socorro.external.postgresql, hbase: socorro.external.hbase, es: socorro.external.elasticsearch, fs: socorro.external.filesystem, http: socorro.external.http'

     # comma separated list of class overrides, e.g `Crashes: hbase`
     service_overrides="CrashData: hbase, Correlations: http, CorrelationsSignatures: http, SuperSearch: es, Priorityjobs: rabbitmq, Search: es"

$ svn commit
Sending        stage/etc-socorro/middleware.ini
Transmitting file data .
Committed revision 82853.
that seems to have fixed staging
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Super Search is broken because of this. Fix is here: https://github.com/mozilla/socorro/pull/1905
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Commits pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/89606a2f8b42e05e21324b991355173dfb0c17c4
Fixes bug 948533 - All services should accept any number of keyword arguments.

https://github.com/mozilla/socorro/commit/b5e162779cb5b9c6de3c5d0683cccb43e72313b0
Merge pull request #1905 from AdrianGaudebert/948533-fix-unavailable-services

Bug 948533 - All services should accept any number of keyword arguments.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
production changes done.

$  svn diff
Index: prod/etc-socorro/middleware.ini
===================================================================
--- prod/etc-socorro/middleware.ini	(revision 83233)
+++ prod/etc-socorro/middleware.ini	(working copy)
@@ -7,13 +7,13 @@

         +include ./common_elasticsearch.ini

-    [[filesystem]]
+    [[fs]]

-        +include ./common_filesystem.ini
+        +include ./common_fs.ini

-    [[hbase]]
+    [[hb]]

-        +include ./common_hbase.ini
+        +include ./common_hb.ini

         # Host to HBase server
         hbase_host=socorro-thrift-single.vlan81.phx.mozilla.com
@@ -210,10 +210,10 @@
 [implementations]

     # list of packages for service implementations
-    implementation_list='psql: socorro.external.postgresql, hbase: socorro.external.hbase, es: socorro.external.elasticsearch, fs: socorro.external.filesystem, http: socorro.external.http'
+    #implementation_list='psql: socorro.external.postgresql, hbase: socorro.external.hbase, es: socorro.external.elasticsearch, fs: socorro.external.filesystem, http: socorro.external.http'

     # comma separated list of class overrides, e.g `Crashes: hbase`
-    service_overrides="CrashData: hbase, Correlations: http, CorrelationsSignatures: http, SuperSearch: es, Search: es"
+    #service_overrides="CrashData: hbase, Correlations: http, CorrelationsSignatures: http, SuperSearch: es, Search: es"

 [logging]

$ svn commit
Sending        prod/etc-socorro/middleware.ini
Transmitting file data .
Committed revision 83234.
there's an error in the above diff. after a revert and some tinkering, applied this:

$ svn diff
Index: files/prod/etc-socorro/middleware.ini
===================================================================
--- files/prod/etc-socorro/middleware.ini	(revision 83274)
+++ files/prod/etc-socorro/middleware.ini	(working copy)
@@ -7,13 +7,13 @@

         +include ./common_elasticsearch.ini

-    [[filesystem]]
+    [[fs]]

-        +include ./common_filesystem.ini
+        +include ./common_fs.ini

-    [[hbase]]
+    [[hb]]

-        +include ./common_hbase.ini
+        +include ./common_hb.ini

         # Host to HBase server
         hbase_host=socorro-thrift-single.vlan81.phx.mozilla.com
@@ -210,10 +210,10 @@
 [implementations]

     # list of packages for service implementations
-    implementation_list='psql: socorro.external.postgresql, hbase: socorro.external.hbase, es: socorro.external.elasticsearch, fs: socorro.external.filesystem, http: socorro.external.http'
+    #implementation_list='psql: socorro.external.postgresql, hbase: socorro.external.hbase, es: socorro.external.elasticsearch, fs: socorro.external.filesystem, http: socorro.external.http'

     # comma separated list of class overrides, e.g `Crashes: hbase`
-    service_overrides="CrashData: hbase, Correlations: http, CorrelationsSignatures: http, SuperSearch: es, Search: es"
+    service_overrides="CrashData: hbase, Correlations: http, CorrelationsSignatures: http, SuperSearch: es, Priorityjobs: rabbitmq, Search: es"

 [logging]
Product: Socorro → Socorro Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: