#metabrainz

/

      • zas
        yuo
      • 2017-07-26 20728, 2017

      • zas
        yup with a typo...
      • 2017-07-26 20720, 2017

      • samj1912
        so we are back to square one? :P
      • 2017-07-26 20742, 2017

      • ruaok
        iliekcomputers: invited
      • 2017-07-26 20707, 2017

      • drsaunders joined the channel
      • 2017-07-26 20705, 2017

      • zas
        samj1912: spawning subprocesses to handle read/write (which are mainly done through mutagen) should be simple enough
      • 2017-07-26 20749, 2017

      • iliekcomputers
        looking at the doc
      • 2017-07-26 20700, 2017

      • Sophist-UK
        zas, samj1912: We do that already for most processes. But #604 did more of it.
      • 2017-07-26 20728, 2017

      • ruaok
        iliekcomputers: just follow along. if something comes to mind add it. or add questions.
      • 2017-07-26 20733, 2017

      • ruaok
        if nothing else, sanity check
      • 2017-07-26 20742, 2017

      • iliekcomputers
        hmm, okay
      • 2017-07-26 20709, 2017

      • Sophist-UK
        samj1912: I also thought about running sub-processes (instead of sub-threads) - we could allocate albums to sub-processes to handle the heavy loading. But sending data between threads is by pickling, so we would need to establish what the performance impact would be on sending file objects via pickling.
      • 2017-07-26 20701, 2017

      • Sophist-UK
        Also impact on running plugins.
      • 2017-07-26 20717, 2017

      • Sophist-UK
        BUT, I suspect that multi-processing is only beneficial if Picard uses 100% CPU on one processor.
      • 2017-07-26 20730, 2017

      • Sophist-UK
        I also did a performance profile to see what was using most CPU and it was the code that read the XML stream and turned it into python objects which was by far the heaviest load - and that was running on main thread not a worker thread. But now we use json that measurement is no longer valid.
      • 2017-07-26 20731, 2017

      • zas
        Sophist-UK: i don't think it will cost much, especially compared to the time needed to rewrite a 10 minutes hires flac file due to header resizing
      • 2017-07-26 20714, 2017

      • Sophist-UK
        zas: The question is whether writing a hires flac file has an impact when it it done on a worker thread rather than a separate process.
      • 2017-07-26 20729, 2017

      • zas
        currently it has
      • 2017-07-26 20752, 2017

      • Sophist-UK
        Usually it will be the HDD (or network if on a share) that is the limiting factor.
      • 2017-07-26 20757, 2017

      • samj1912
        lazka said it shouldn't
      • 2017-07-26 20715, 2017

      • lazka joined the channel
      • 2017-07-26 20733, 2017

      • ruaok
        iliekcomputers: I'll detail step 2 for right before switchover.
      • 2017-07-26 20735, 2017

      • Sophist-UK
        Also, writing files is limited to a single thread to avoid multiple Piucard files being mapped to the same actual file and being written simultaneously.
      • 2017-07-26 20742, 2017

      • samj1912
        lazka: can you read the backlogs please ? :)
      • 2017-07-26 20747, 2017

      • samj1912
        I think you can give some input
      • 2017-07-26 20750, 2017

      • iliekcomputers
        ruaok: okay
      • 2017-07-26 20758, 2017

      • lazka
        ok
      • 2017-07-26 20758, 2017

      • iliekcomputers
        should make sure bigquery details are correct too
      • 2017-07-26 20709, 2017

      • samj1912
      • 2017-07-26 20709, 2017

      • ruaok
        please add that.
      • 2017-07-26 20743, 2017

      • ruaok
        iliekcomputers: can you prepare a PR for A.3 ?
      • 2017-07-26 20704, 2017

      • iliekcomputers
        ruaok: that would just involve changing BETA_URL to 'api.listenbrainz.org', yes?
      • 2017-07-26 20733, 2017

      • Sophist-UK
        I have not been following Picard's recent changes in detail, but if master thread uis stable, I can try to rework the core parts of #604 for Py3.
      • 2017-07-26 20751, 2017

      • iliekcomputers
        ALPHA_URL is already set to `alpha.listenbrainz.org` by default
      • 2017-07-26 20756, 2017

      • ruaok
        and ALPHA_URL, and removing the banner and changing "pre-beta test" to "beta"
      • 2017-07-26 20706, 2017

      • iliekcomputers
        okay
      • 2017-07-26 20706, 2017

      • samj1912
        Sophist-UK: picard 2 is pretty stable :)
      • 2017-07-26 20726, 2017

      • ruaok
        which doesn't resolve.
      • 2017-07-26 20729, 2017

      • zas
        Sophist-UK: i don't think much changed in this field, it would be great to have 604 fixed for Picard 2, so we can actually test
      • 2017-07-26 20719, 2017

      • Sophist-UK
        I don't want to retrofit #604 to P2 in one go - it was too big last time. But I can try to extract the key bits.
      • 2017-07-26 20740, 2017

      • Sophist-UK
        I managed to introduce some impossible-to-track-down bug which casused it to hang - so doing it in smaller stable steps is essential.
      • 2017-07-26 20709, 2017

      • kavorka has quit
      • 2017-07-26 20738, 2017

      • ruaok
        bigquery configs are correct, won't need any changes. using production setup there already
      • 2017-07-26 20707, 2017

      • iliekcomputers
        cool, i'll remove that line then
      • 2017-07-26 20730, 2017

      • ruaok
        keep it.
      • 2017-07-26 20739, 2017

      • ruaok
        strike it through.
      • 2017-07-26 20745, 2017

      • kavorka joined the channel
      • 2017-07-26 20750, 2017

      • iliekcomputers
        okay
      • 2017-07-26 20725, 2017

      • ruaok
        bitmap, zas: for moving LB to production: We plan to use the site wide redis, rabbitmq and postgres.
      • 2017-07-26 20733, 2017

      • ruaok
        as previously discussed.
      • 2017-07-26 20712, 2017

      • ruaok
        not sure if rabbitmq or redis need any config changes in order for us to use them. do they?
      • 2017-07-26 20725, 2017

      • black-perl_ joined the channel
      • 2017-07-26 20708, 2017

      • arbenina_ has quit
      • 2017-07-26 20738, 2017

      • lazka
        samj1912, no idea, sorry. I can only tell you that in my experience mutagen is IO bound, so it's not much different that open().read()
      • 2017-07-26 20722, 2017

      • lazka
        best to profile and look what takes longer than expected
      • 2017-07-26 20729, 2017

      • drsaunders has quit
      • 2017-07-26 20730, 2017

      • bitmap
        ruaok: start_rabbitmq in docker-server-configs will require some changes to setup users/vhosts/permissions, and you'll have to insert an entry into the amqp.broker table manually (there are examples in the comment at the end)
      • 2017-07-26 20719, 2017

      • ruaok
        ok. no changes for redis?
      • 2017-07-26 20723, 2017

      • bitmap
        I don't think redis needs any changes, I guess just make sure the keys are in a separate namespace
      • 2017-07-26 20748, 2017

      • ruaok
        what is the namespace pattern that is used now?
      • 2017-07-26 20703, 2017

      • bitmap
        mbs prefixes keys with MB:
      • 2017-07-26 20725, 2017

      • ruaok
        ok, we'll follow suit with LB:
      • 2017-07-26 20720, 2017

      • iliekcomputers
        nice color coding ;)
      • 2017-07-26 20733, 2017

      • bitmap
        though there is not a general redis service at the moment...mbs uses two, musicbrainz-redis-store and musicbrainz-redis-cache, which have different configs because one is used as a permanent store
      • 2017-07-26 20736, 2017

      • ruaok
        any suggestions on what we should do?
      • 2017-07-26 20743, 2017

      • ruaok
        I mean, keeping what we have is super easy.
      • 2017-07-26 20735, 2017

      • bitmap
        keeping redis separate might be easier for now, IMO
      • 2017-07-26 20724, 2017

      • ruaok
        ok
      • 2017-07-26 20725, 2017

      • bitmap
        also easier to wipe the whole cache if you need to, if they're separate instances
      • 2017-07-26 20728, 2017

      • ruaok
        iliekcomputers: ^^
      • 2017-07-26 20734, 2017

      • ruaok
        k
      • 2017-07-26 20726, 2017

      • ruaok
        what sort of caveats apply to moving to production postgres?
      • 2017-07-26 20722, 2017

      • iliekcomputers
        just to be clear, now we want two different redis services in LB too ? one for the cache and another for other stuff.
      • 2017-07-26 20732, 2017

      • github joined the channel
      • 2017-07-26 20732, 2017

      • github
        [listenbrainz-server] paramsingh opened pull request #237: Change header from pre-beta to beta, remove banner warning and update config.BETA_URL. (master...switchover) https://git.io/v73FQ
      • 2017-07-26 20732, 2017

      • github has left the channel
      • 2017-07-26 20701, 2017

      • bitmap
        if you want to make sure certain keys aren't evicted, yes, but if you only use it as a cache, no
      • 2017-07-26 20726, 2017

      • ruaok
        one should be fine for us.
      • 2017-07-26 20756, 2017

      • ruaok
        zas: what was the minimum DNS TTL at gandi?
      • 2017-07-26 20714, 2017

      • zas
        it depends ;)
      • 2017-07-26 20731, 2017

      • zas
        some entries have a 10 minutes TTL, some are still on 24 hours
      • 2017-07-26 20753, 2017

      • ruaok
        but minimum is 10 minutes. ok.
      • 2017-07-26 20737, 2017

      • bitmap
        ruaok: for pg, the users/roles need to be created by hand if they aren't by a script, and we keep track of them in https://github.com/metabrainz/docker-postgres/blo…
      • 2017-07-26 20701, 2017

      • bitmap
        then the users/databases config needs to be updated in https://github.com/metabrainz/docker-server-confi…
      • 2017-07-26 20720, 2017

      • ruaok
        we have a script that does that, but we also have data we wish to migrate.
      • 2017-07-26 20728, 2017

      • bitmap
        that'll make sure pg_hba.conf and pgbouncer.ini get updated automatically
      • 2017-07-26 20738, 2017

      • ruaok
        so, I'm considering the pg_dumpall or whatever it wasl.
      • 2017-07-26 20752, 2017

      • bitmap
        that should take care of it
      • 2017-07-26 20718, 2017

      • ruaok
        great, thanks. PRs coming up.
      • 2017-07-26 20714, 2017

      • ruaok
      • 2017-07-26 20744, 2017

      • ruaok
        bitmap: should I change the others while I am at it?
      • 2017-07-26 20701, 2017

      • bitmap
        sure
      • 2017-07-26 20707, 2017

      • bitmap
        all existing roles in pg have rolcanlogin set, so yeah
      • 2017-07-26 20717, 2017

      • ruaok
        pushed
      • 2017-07-26 20702, 2017

      • bitmap
        thanks :)
      • 2017-07-26 20722, 2017

      • ruaok
        np. safe to merge now or does it need to be done at a specifc time?
      • 2017-07-26 20731, 2017

      • bitmap
        safe to merge now
      • 2017-07-26 20748, 2017

      • ruaok
        done
      • 2017-07-26 20724, 2017

      • ruaok
        does anything need to be restarted for this to take effect, bitmap?
      • 2017-07-26 20717, 2017

      • bitmap
        nope, this file is mostly to document the setup, I guess the proper roles will be created for you when you restore the dump
      • 2017-07-26 20734, 2017

      • bitmap
        and those other roles already have LOGIN set
      • 2017-07-26 20738, 2017

      • ruaok
        ok, and there are no restrictions on which IPs can connect to PG?
      • 2017-07-26 20743, 2017

      • ruaok
        (there used to be)
      • 2017-07-26 20747, 2017

      • ruaok
        OldHost
      • 2017-07-26 20720, 2017

      • bitmap
        "samenet" but other than that, no
      • 2017-07-26 20728, 2017

      • ruaok
        k
      • 2017-07-26 20718, 2017

      • khan____ joined the channel
      • 2017-07-26 20747, 2017

      • ruaok
        man, even this "oh this should be quick and easy to release LB" has a *lot* of steps.
      • 2017-07-26 20705, 2017

      • saifulbkhan has quit
      • 2017-07-26 20718, 2017

      • ruaok
        zas, bitmap: what is the internal DNS for reaching other hetzner machines?
      • 2017-07-26 20739, 2017

      • ruaok
        or do we always use fully qualified domains names?
      • 2017-07-26 20757, 2017

      • zas
        we didn't set a local dns, mostly because we use consul / docker containers
      • 2017-07-26 20702, 2017

      • ruaok
        k
      • 2017-07-26 20711, 2017

      • zas
        and all machines have a fully qualified name (on external interface, not internal)
      • 2017-07-26 20717, 2017

      • ruaok nods
      • 2017-07-26 20706, 2017

      • ruaok
        bitmap: can you please sanity check section C here? https://docs.google.com/document/d/1wd_h96Begxo_W…
      • 2017-07-26 20710, 2017

      • ruaok
        meh
      • 2017-07-26 20714, 2017

      • ruaok
        +[off] :)
      • 2017-07-26 20705, 2017

      • bitmap
        how big is the db? -F c might help there since it's compressed
      • 2017-07-26 20717, 2017

      • ruaok
        teeny
      • 2017-07-26 20726, 2017

      • ruaok
        not bothering with compression.
      • 2017-07-26 20729, 2017

      • bitmap
        ah, cool
      • 2017-07-26 20720, 2017

      • ruaok
        the line
      • 2017-07-26 20722, 2017

      • ruaok
        docker exec rabbitmq rabbitmqctl add_user caa
      • 2017-07-26 20749, 2017

      • ruaok
        in docker-server-configs start_rabbitmq -- the last string is a password?
      • 2017-07-26 20732, 2017

      • bitmap
        yeah
      • 2017-07-26 20748, 2017

      • ruaok
        does the password need to be noted elsewhere?
      • 2017-07-26 20739, 2017

      • bitmap
        does LB generate its config (including rabbitmq credentials) from consul-template? it just needs to be in the consul config then
      • 2017-07-26 20722, 2017

      • chirlu has quit
      • 2017-07-26 20736, 2017

      • ruaok
        yes
      • 2017-07-26 20741, 2017

      • chirlu joined the channel
      • 2017-07-26 20751, 2017

      • ruaok
        I was more wondering about syswiki or so.
      • 2017-07-26 20709, 2017

      • ruaok
        now thw ampq.broker -- is that to connect rabbitmq to postgres?
      • 2017-07-26 20715, 2017

      • ruaok
        *the
      • 2017-07-26 20735, 2017

      • ruaok
        our rabbitmq doesn't touch postgres.
      • 2017-07-26 20752, 2017

      • bitmap
        oh, that's to allow the postgres amqp extension to connect to rabbitmq. you prob don't use that
      • 2017-07-26 20701, 2017

      • bitmap
        so that can be ignored
      • 2017-07-26 20725, 2017

      • ruaok
        k
      • 2017-07-26 20707, 2017

      • bitmap
        and yeah, I don't think rabbitmq is documented well in syswiki yet
      • 2017-07-26 20728, 2017

      • ruaok
        looking at the number of things that would possibly go wrong, I'm going to turn this process on its head, iliekcomputers
      • 2017-07-26 20758, 2017

      • ruaok
        meaning that while we work we'll set vhost entries to point listenbrainz.org to hetzner and then take beta down.
      • 2017-07-26 20730, 2017

      • ruaok
        then start building it back up and only once we're happy with the changes, then we'll switch DNS as opposed to doing it before
      • 2017-07-26 20744, 2017

      • bitmap
        section C looks sane to me, I think
      • 2017-07-26 20719, 2017

      • ruaok
        thanks.
      • 2017-07-26 20732, 2017

      • ruaok
        given my decision to invert the process, I'm buying myself a lot of time.
      • 2017-07-26 20703, 2017

      • ruaok
        bitmap: how serious are we in protecting the passwds for rabbitmq?
      • 2017-07-26 20719, 2017

      • Quesito
        how long does a switch over like this take? (a week? a month?)
      • 2017-07-26 20723, 2017

      • ruaok
        because our repo is public and putting it into the consul template.
      • 2017-07-26 20752, 2017

      • ruaok
        if we're properly prepared minutes.
      • 2017-07-26 20755, 2017

      • ruaok
        reality says a few hours.