Commit Graph

119 Commits

Author SHA1 Message Date
Tim Abbott 68dcc760c3 Clean up some unused imports.
(imported from commit 0c5d8e2a55ba1b8909ba807fee3afe863dcdc226)
2013-11-04 11:51:17 -05:00
Tim Abbott b7c1686501 Initial IRC mirror prototype.
(imported from commit fb1c482aaebc317b8b071346cb3bf54d4c7d2c8d)
2013-10-29 16:49:42 -04:00
Tim Abbott 7faceb2d2d zmirror: Add some more non-world-readable Zephyr classes.
These are from a list that Camilla Fox sent me of all
non-world-readable Zephyr classes currently configured.

(imported from commit 6246a981402b47056b28cd14be688e15224aacd1)
2013-10-28 15:44:34 -04:00
Tim Abbott 901a5c342c Use os.path directly rather than sometimes importing it separately.
(imported from commit 48486c4ea64d02a15faeebb0f490d31e9b113d62)
2013-10-28 15:44:13 -04:00
Tim Abbott fffd4f3c59 Move zulip_tools library to root of repository.
(imported from commit 2fada9d2acbcf81f8e2b3de8caadbf335141dfaa)
2013-10-28 10:54:48 -04:00
Luke Faraone d5d0ef809b [manual] Deconfigure standalone feedback bot, replacing it with a worker.
Steps needed:
 - puppet apply on staging/prod when deployed to respective sites
 - puppet apply on bots.z.n when deployed to prod
 - copy /var/tmp/.feedback-bot-ticket-number from bots to staging

(imported from commit 2c943dac8d871809b0997a4484f508ec5b078bcd)
2013-10-25 14:13:30 -04:00
Luke Faraone 52309b5789 Enable absolute imports for non-third-party code where it was omitted previously
(imported from commit 34856ac32c6b94b614273a6fe46c87a314058d9b)
2013-10-25 14:13:30 -04:00
Zev Benjamin 16a8bce60c Remove redundant return statement
(imported from commit eac3298f3004d2dd519c5444755e729111d13482)
2013-10-22 13:19:00 -04:00
Zev Benjamin b961c16265 zephyr_mirror: Make outgoing zephyrs to ctl instead go to golem
This makes zulips to ctl@mit.edu cause the mirroring system to zephyr
golem@mit.edu.

(imported from commit 9059a92ba51fa87e45feae2f0d5549b36b048e8b)
2013-10-17 23:20:57 -04:00
Zev Benjamin 630ce40e29 zephyr_mirror: Hack to let golem receive mirrored personals
(imported from commit 68539e45dbdfd70a037405dd2760474bf46dff76)
2013-10-11 17:50:19 -04:00
Steve Howell e6d1453e5f Provide more info in support requests.
Have the Feedback Bot provide the sender's full name.
Put the email in the message to help searching.
Generate a ticket number to make it easier to refer to the message from
elsewhere.

(imported from commit 4d789135a0097bade50b4d980f49ca596d85b73b)
2013-10-11 11:45:46 -04:00
Luke Faraone 7d03614a1b Store the feedback bot key in local_settings.py
(imported from commit 3322d8976328db61cd382acb06775c6a6df3fea0)
2013-10-10 11:31:15 -04:00
Tim Abbott ac01b0ed19 git integration: Linkify our commits to point to GitLab.
(imported from commit e8d3c107842680dec9bc6aa84f9548c0f879785d)
2013-10-08 17:21:57 -04:00
Tim Abbott 2b5d036e34 Use events API in our Nagios monitoring scripts
(imported from commit 9b370e420095f17fbb7e9d1e466d51dd2e145de1)
2013-10-08 17:21:57 -04:00
Tim Abbott f9c6b7f2aa Use the 'test: Zulip monitoring' client string for our Nagios stuff.
(imported from commit 02618a4724e1ab64c05f95f60b83b7593b3fe62b)
2013-10-08 08:57:30 -04:00
Tim Abbott f3fd1a2c44 [manual] puppet: Rename humbug user to zulip.
(imported from commit 90e517a4a657d2821b371c833e557c2003c9340c)
2013-10-08 08:57:30 -04:00
Tim Abbott 3d89ee20f7 Rename humbug => zulip in tddium integration.
(imported from commit f48dd9f7ddc8221c90373300eedf87077d9e5874)
2013-10-08 08:57:30 -04:00
Tim Abbott b8b0eb4508 Some zulip => humbug updates in comments and print statements.
(imported from commit 9253569a1df7f96fda81ab162d710cdda03f30ca)
2013-10-08 08:57:29 -04:00
Tim Abbott e11ae77ba6 [manual] Rename /home/humbug to /home/zulip.
This may require just doing an mv on the home directory, plus changing
the home directory in /etc/passwd.  It should of course be done carefully.

(imported from commit 660997d897ee6d33563af74f0fc5d4267a911755)
2013-10-08 08:57:29 -04:00
Tim Abbott 9677ce8920 [manual] Move git checkouts from /home/humbug/humbug to /home/humbug/zulip.
(imported from commit d58be28e57fcb3b5585c0018f1dbb53adf5067df)
2013-10-08 08:57:28 -04:00
Tim Abbott f10be187bd zephyr_mirror: Fix support for forwarding mail zephyrs.
(imported from commit 4ab2c810d3ccff6058e6c0be2e172a78e216d0a5)
2013-10-01 14:52:20 -04:00
Tim Abbott 2fab8ab8f5 Write zephyr mirroring logs to /var/log/zulip rather than ~/.
(imported from commit 7b76fa7834fb82fe3967f9e5ef963f26b7ff7184)
2013-09-25 16:52:41 -04:00
Tim Abbott 4be5d81af1 [manual] Write logs to /var/log/zulip rather than /var/log/humbug.
This requires a puppet apply to update the supervisor configuration.

(imported from commit f2836b6d9c53791af6f6ceb1650d0e0740df70ab)
2013-09-25 16:52:41 -04:00
Tim Abbott d38b8364a8 zephyr_mirror: Clear all notices from the queue before selecting.
We were having problems where we were suspiciously processing notices
at a rate of 1 notice per 15s, which suggests that we the select was
timing out even though there were notices to be fetched immediately.
We fix this by clearing the queue each time our select loop ends.

(imported from commit 7e7bfbb2126d1f4170d65d1483a0b799dcab80b9)
2013-09-25 15:40:21 -04:00
Zev Benjamin 11a503667d Replace configuration references to trac.humbughq.com with trac.zulip.net
(imported from commit aa042a10ada3f04205fd8d3e94c2b13f12a5a1a7)
2013-09-05 15:43:08 -04:00
Tim Abbott 371654adb3 zephyr_mirror: Make Webathena work for golem.
(imported from commit 6f8bf1f44c521b22c9fc990711d2821e5a60761d)
2013-08-28 18:56:54 -04:00
Zev Benjamin 724ce3744c zephyr_mirror: Tweak error text
(imported from commit 7bb9d42a261e08d3abe5d80b9ba2e88f1d0b03bf)
2013-08-28 10:41:53 -04:00
Tim Abbott 77dbbe7f23 zephyr_mirror: Require zcrypt when mirroring to invite-only streams.
(imported from commit 1b88a8fc9bc26f2f9b1bb3f037093f85255feb17)
2013-08-27 18:26:12 -04:00
Tim Abbott 314d0fc053 zephyr_mirror: Subscribe to mail zephyrs even if we're not using them.
This should enabled us, in the future, to enable support for mail
zephyrs without requiring users to re-auth.

(imported from commit 2665743212da567fe85742d30cca42b902e41a0d)
2013-08-27 16:21:41 -04:00
Tim Abbott 611955e9fa zephyr_mirror: Use the new reasonable --log-path option.
(imported from commit 2208e4c47cf49e3005cc3b93314b8c2a0ffc23c6)
2013-08-27 14:21:26 -04:00
Tim Abbott 6707ed4270 zephyr_mirror: Rename confusing log path variables.
(imported from commit a120f653c1b9283b91f339cccea52bd5ad89b69f)
2013-08-27 14:21:26 -04:00
Tim Abbott 1ece1c17c3 zephyr_mirror: Stop logging to the old resend log.
We were intending to just be directing the logger logs, not logging
every message for potentially resending.

(imported from commit 9dd53e3968880745a8c01244db5d2c2247dfe85c)
2013-08-27 14:21:26 -04:00
Tim Abbott 7014a661d2 zmirror: Add monitoring for personals mirrors.
(imported from commit acb7f2222076d2f3884a2e52c7032cb48fde1757)
2013-08-26 18:17:26 -04:00
Tim Abbott 732de3faf1 zephyr_mirror: Ignore expired Kerberos tickets for personals mirror.
(imported from commit 094755feacd299255f078432465f11a609df9aef)
2013-08-26 18:17:26 -04:00
Tim Abbott af372b2401 zephyr_mirror: Allow running multiple zephyr mirroring scripts under one user.
(imported from commit ecec50ee0e51736487358ef9f5847000d35f327a)
2013-08-26 18:17:26 -04:00
Tim Abbott 134da30fdf Add webathena authentication button for Zephyr users.
This shows up when you're not running a Zephyr mirroring bot and lets
you use Webathena to have us run it.  Obviously needs more docs.

Current problems include:

* supervisorctl reload ends up recreating /var/run/supervisor.sock
  with the wrong permissions, so it only works once in a row before
  you need to chmod that.

* /etc/supervisor/conf.d needs to be humbug-writeable; this is a clear
  local root vulnerability

* This uses SSH and thus is kinda slow.

(imported from commit 7029979615ffd50b10f126ce2cf9a85a5eefd7a2)
2013-08-26 18:17:25 -04:00
Tim Abbott d584629971 zephyr_mirror: Add options to save/restore sessions.
The davidben-patched-for-roost Zephyr branch (available at
https://github.com/davidben/zephyr/tree/roost) adds Zephyr support for
these options.  We also patch python-zephyr to expose them.  These
basically let you save your Zephyr tickets and port number to a file,
so that you can later restore them (even potentially after the machine
rebooted).  Basically because Zephyr is UDP, the Zephyr server will
continue trying to deliver messages to a particular port number that
was registered for up to 20 minutes after getting an error; so we can
even have downtime and reboot and still get our packets so long as we
restore the sessions within 20 minutes.

(imported from commit 986cbb157ddfa57aa4b644cd826f8418e9876dc7)
2013-08-26 18:17:25 -04:00
Tim Abbott f5f95e5f43 [manual] Extend /api/v1/streams API endpoint.
Previously it only provided the list of all public streams; now it
allows one to specify any union of some of the following:
* all public streams
* all streams the user subscribed to

(the most relevant being the union of those two, which is what we want
for the "streams" page).

Or:
* all streams in realm (superuser only)

The manual task required is that when this is pushed to prod, we need
to also deploy the new sync-public-streams version to zmirror.

(imported from commit 27848b8bd136e2777f399b7d05b2fdcec35e4e21)
2013-08-22 12:29:04 -04:00
Tim Abbott 0a0cb9e70e zephyr_mirror: Finish outgoing zcrypt.
(imported from commit dfef23feb8e0f6a0a8ba775b6cccd391cb307adb)
2013-08-22 12:29:04 -04:00
Tim Abbott 97e85e80bd check-mirroring: Move log file under /home/humbug/logs/.
This is for consistency with where one goes for server logs on our
normal frontends.

(imported from commit 094f4cd1ca6c64497594827e12d8100bbb9bd6ab)
2013-08-20 17:09:09 -04:00
Tim Abbott 6253483003 zephyr_mirror: Send outgoing messages encrypted when zcrypt would.
Our .crypt-table parsing code isn't quite correct, in that we don't
handle either the "zcrypt default" or "zcrypt by class/instance" pair
options (for sending messages in either direction) -- you have to be
zcrypting for an entire class.  I think this makes sense given that on
the Zulip end we can only enforce anything on a stream level.

(imported from commit a7901b1dc025a04a23ee71ecdd499e3f150ba614)
2013-08-20 17:09:09 -04:00
Tim Abbott 605171d1da zephyr_mirror: Renew kerberos tickets when starting up class mirror.
(imported from commit 34b0a78558c6f20043efe986a16064387f36f1c0)
2013-08-20 15:27:24 -04:00
Tim Abbott 65520d99b8 zephyr_mirror: Fix zephyr/zerver path conversion.
(imported from commit bb895bac50754a601a09639cba596ed65956dc9b)
2013-08-20 15:27:24 -04:00
Tim Abbott 6850f25907 [manual] puppet: Move rabbitmq cron jobs into puppet.
When we deploy this, we should remove the relevant jobs from root's
crontab on our app servers.

(imported from commit 749be952d504f5a4d243cf59f6430acc689fc821)
2013-08-20 15:27:24 -04:00
Tim Abbott b4adabfaf0 zephyr_mirror: Auto-detect Python version for pyzephyr path.
(imported from commit e2aca3a08f8aa12b43d71acffcc0e2249feb7ca7)
2013-08-20 15:27:23 -04:00
Tim Abbott 1a7d946bd1 puppet: Move zephyr_mirror crontab into /etc/cron.d.
(imported from commit e93e630704ce7e85346f54f095c642010058fc09)
2013-08-20 15:27:21 -04:00
Tim Abbott 52cbbdfc2f zephyr_mirror: De-zcrypt messages for which we have the key.
For now we only support the AES encryption type since the DES one is
probably not used anymore.

(imported from commit 222606db9f704917e74159e7d07a110187a236e6)
2013-08-20 15:02:07 -04:00
Tim Abbott c5fcbe103c zephyr_mirror: Handle syncing subs with invite-only streams.
(imported from commit ec8d0c0d13ff0a81fa4a5e1225e94e6dad997356)
2013-08-20 15:02:04 -04:00
Tim Abbott f446b72233 zephyr_mirror: Add option to control path to streams file.
This makes it easy to test the class mirror on just a single test
stream.

(imported from commit 3decb1ced54507683f1c0634df14f73e693104ef)
2013-08-20 14:57:13 -04:00
Tim Abbott e00efa4665 Rename Humbug-based variables in check-mirroring.
(imported from commit cdfc9a1c15db7bd6de099e6403dc65bfaff337b0)
2013-08-08 10:22:32 -04:00