Page MenuHomePhabricator

Review staging protocol for Wikilabels
Closed, ResolvedPublic

Description

This task is done when the staging-->deploy process is reviewed and there are notes on how we should do testing.

Bonus points: for filing tasks for to-dos based on what is learned.

Event Timeline

Halfak created this task.Apr 25 2016, 4:29 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 25 2016, 4:29 PM
Halfak renamed this task from Review staging review protocol for Wikilabels to Review staging protocol for Wikilabels.Apr 25 2016, 4:41 PM

Here's my review.

  • puppet
    • There is no issue with puppet, it's generalized enough
    • Since both wikilabels and wikilabels-staging coexist in a project, using hiera is not an option
  • wikilables
    • No issue, Generalized enough
  • wikilabels-wikimedia-config
    • in config/00-main.yaml we have "host: labels-wmflabs.org" for wsgi. That's problematic. We made a workaround for that by adding config/55-staging.yaml (which I copied to config/55-experiment.yaml for experiment). It's being done manually and we might be able to do it via puppet (specially if the staging and the main instance go into different projects). Like what we did with ORES but I can see that would be a little bit difficult.
  • Database
    • Databases of wikilabels and staging are different but they both coexist in pgsql.eqiad.wmnet (= labsdb004 If I'm correct). So our tests won't affect the main labeling but we share our database with labels-experiment. At first, it sounds good but it seems postgresql can't handle two master users of one database correctly. The issue I encountered with was adding a new campaign, at first try in labels-experiment, it returns integrity error because it tries to give "id (a primary key) = 1" to the campaign but that is taken (because it was made by labels-staging) and in the second try, it tries id =2 and again, until it hits id = 5 and then it easily adds the campaign. I can imagine when we want to load a campaign from labels-staging we would run into the same issue. We have several options: 1- We make another database in pgsql and assign it to the staging (or experiment). 2- Bear with this issue, I don't think that would be problematic once we know it's happening because of another user 3- check postgresql to see if it can try to insert in a more smooth way and we apply it to our setup. I don't think that would be hard. I check that tomorrow :)
  • Since both wikilabels and wikilabels-staging coexist in a project, using hiera is not an option

You can set hiera options per host as well. Like http://wikitech.wikimedia.org/wiki/Hiera:Wikilabels/host/somehostname

  • Since both wikilabels and wikilabels-staging coexist in a project, using hiera is not an option

You can set hiera options per host as well. Like http://wikitech.wikimedia.org/wiki/Hiera:Wikilabels/host/somehostname

Nice! We probably use it in this case.

Regarding the DB issue, this resolves it: http://dba.stackexchange.com/questions/46125/why-does-postgres-generate-an-already-used-pk-value

SELECT setval('your_sequence_name', (SELECT max(id) FROM your_table));

I'm thinking of a way to implement it.

I think we can code host: in the staging config. I'll look into that and report back.

Halfak closed this task as Resolved.May 3 2016, 3:04 PM