-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add crash reporter service #1005
base: master
Are you sure you want to change the base?
Conversation
In general our build.servo.org services rely on secrets that need to be provided as part of the submission process (eg: https://github.com/servo/standups/blob/415c2fe2a399575740cd9ce585eeff0b11fafec1/standups/flask_server.py#L90). The crash reporter would need to embed the secret in the binary, which is unavoidable, but it's Good Enough for casual attempts to abuse the server. We would be able to store the secret in taskcluster rather than the repository, so it would only be added to nightly builds, and we could add a simple #define override mechanism to make it easy to add to local builds when necessary. |
crash-reporter/init.sls
Outdated
- upgrade: True | ||
- require: | ||
- virtualenv: crash-reporter | ||
{% if grains.get('virtual_subtype', '') != 'Docker' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conditional (and the corresponding endif) can be removed like in #1006.
|
||
/home/servo/crash-reporter/config.json: | ||
file.managed: | ||
- source: salt://{{ tpldir }}/files/config.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the shared secret, we will want to add:
- context:
secret: {{ pillars['crash-reporter']['secret'] }}
We will also need to add /srv/pillar/crash-reporter.sls on the main machine, and add the following fake crash-reporter.sls to .travis/test_pillars/:
'crash-reporter':
'secret': 'TEST-CRASH-REPORTER-SECRET'
crash-reporter/files/config.json
Outdated
@@ -0,0 +1 @@ | |||
{"port": 5004, "crash_dir": "./crashes/"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need a "secret": "{{ pillar['crash-reporter']['secret'] }}"
entry as well.
crash-reporter/init.sls
Outdated
/lib/systemd/system/tracker.service: | ||
file.managed: | ||
- source: salt://{{ tpldir }}/files/tracker.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need a different name for this file or it will overwrite the existing tracker.service. Let's call it crash-reporter.service
instead.
crash-reporter/init.sls
Outdated
- pip: crash-reporter | ||
- watch: | ||
- file: /home/servo/crash-reporter/config.json | ||
- file: /lib/systemd/system/tracker.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to change if we change the .service file name.
9bf1981
to
d6bc531
Compare
d6bc531
to
2c30fc4
Compare
Note to self: this hasn't been addressed yet. |
☔ The latest upstream changes (presumably #1012) made this pull request unmergeable. Please resolve the merge conflicts. |
Flask: https://github.com/paulrouget/crash-reporter - this will need a review, and be migrated under github.com/servo. Tested and appears to work as expected.
Saltfs configuration is blindly copy/pasted from the intermittent-tracker code.
@jdm can you give a quick a look at the flask code? And do we have any mechanism in place to prevent abuse of the different build.servo.org services?