#metabrainz

/

      • alastairp
      • 2016-06-14 16640, 2016

      • alastairp
        3:00 PM <Gentlecat> some parts of the template could look better, I guess
      • 2016-06-14 16600, 2016

      • alastairp
        oh, I like the filters at the top
      • 2016-06-14 16602, 2016

      • alastairp
        I'll do that
      • 2016-06-14 16608, 2016

      • alastairp
        otherwise it's pretty similar, yeah?
      • 2016-06-14 16653, 2016

      • Gentlecat
        yeah, pretty much
      • 2016-06-14 16613, 2016

      • Gentlecat
        table header could use a small update too
      • 2016-06-14 16605, 2016

      • kartikgupta0909
        Gentlecat: is this flask.config same as the config.py or is it some other file which I need to change?
      • 2016-06-14 16613, 2016

      • kartikgupta0909
        I cant really locate flask.config
      • 2016-06-14 16633, 2016

      • Gentlecat
        it's a global config object (dictionary basically)
      • 2016-06-14 16655, 2016

      • Gentlecat
        you can import values into it, which is what happens when the app is created
      • 2016-06-14 16602, 2016

      • Gentlecat
        they are imported from config.py
      • 2016-06-14 16621, 2016

      • kartikgupta0909
        okay is this happening automatically or I need to write it somewhere?
      • 2016-06-14 16626, 2016

      • Gentlecat
      • 2016-06-14 16636, 2016

      • Gentlecat
        what's happening?
      • 2016-06-14 16654, 2016

      • kartikgupta0909
        i did grep flask.config and I got nothing
      • 2016-06-14 16600, 2016

      • kartikgupta0909
        i ll try the link you ve just sent
      • 2016-06-14 16617, 2016

      • Gentlecat
        are you trying to find a module that contains configuration related code?
      • 2016-06-14 16651, 2016

      • Gentlecat
      • 2016-06-14 16608, 2016

      • ruaok
        do we have any grub-reboot experts in the house?
      • 2016-06-14 16613, 2016

      • ruaok
        zas and I are too stupid to use it.
      • 2016-06-14 16629, 2016

      • kartikgupta0909
        No I just wanted to import a variable from config.py to templates/datasets/evaluate.html
      • 2016-06-14 16656, 2016

      • kartikgupta0909
        and when I defined it in the config.py and tried to use it in the template it couldnt get the value
      • 2016-06-14 16659, 2016

      • kartikgupta0909
        nor any error
      • 2016-06-14 16644, 2016

      • kartikgupta0909
        i saw the code which is importing all the values defined in config.py automatically to the app.config
      • 2016-06-14 16601, 2016

      • kartikgupta0909
        but I am still not able to access it in the template for some reason
      • 2016-06-14 16606, 2016

      • Gentlecat
        how are you trying to import it?
      • 2016-06-14 16606, 2016

      • ruaok
        kepstin: ping
      • 2016-06-14 16614, 2016

      • kartikgupta0909
        {% if Eval_location: %}
      • 2016-06-14 16630, 2016

      • Gentlecat
        you need to use global variable
      • 2016-06-14 16632, 2016

      • kartikgupta0909
        Eval_location is a boolean in my config.py
      • 2016-06-14 16638, 2016

      • kepstin
        Hi ruaok
      • 2016-06-14 16644, 2016

      • ruaok
        moin kepstin.
      • 2016-06-14 16645, 2016

      • Gentlecat
        config['Eval_location']
      • 2016-06-14 16600, 2016

      • ruaok
        we're having some issues getting grub-reboot to work so we can test an older kernel on the gateways
      • 2016-06-14 16615, 2016

      • ruaok
        but the setting never takes and we keep booting into the most recent kernel.
      • 2016-06-14 16619, 2016

      • ruaok
        do you have any insights?
      • 2016-06-14 16648, 2016

      • kepstin
        Is /boot on raid? What filesystem?
      • 2016-06-14 16627, 2016

      • ruaok
        no raid at all, ext4
      • 2016-06-14 16635, 2016

      • kepstin
        Hmm. That should be fine I think. You're using stock Ubuntu grub config?
      • 2016-06-14 16647, 2016

      • ruaok
        I believe so.
      • 2016-06-14 16658, 2016

      • ruaok
        zas should confirm when he gets back from his smoke brea
      • 2016-06-14 16600, 2016

      • ruaok
        k
      • 2016-06-14 16602, 2016

      • kartikgupta0909
      • 2016-06-14 16638, 2016

      • kartikgupta0909
        its not even printing anything
      • 2016-06-14 16649, 2016

      • kartikgupta0909
        although it should when it goes to the else statement
      • 2016-06-14 16606, 2016

      • kepstin
        ruaok: confirm that /boot/grub/grub.cfg has load_env and save_env commands in it
      • 2016-06-14 16620, 2016

      • Gentlecat
      • 2016-06-14 16628, 2016

      • ruaok
      • 2016-06-14 16648, 2016

      • ruaok
        the top part of the file that contains all refs to load/save_end
      • 2016-06-14 16649, 2016

      • ruaok
        env
      • 2016-06-14 16625, 2016

      • kepstin
        ok, good
      • 2016-06-14 16635, 2016

      • kartikgupta0909
        still no luck Gentlecat
      • 2016-06-14 16627, 2016

      • Gentlecat
        well, try to output `config` from the template
      • 2016-06-14 16631, 2016

      • Gentlecat
        see what values are there
      • 2016-06-14 16642, 2016

      • Gentlecat
        do some debugging yourself
      • 2016-06-14 16636, 2016

      • kepstin
        so, the issue is that grub-reboot is for old grub (0.9x), but you're using grub 2.0. The correct command is "grub-editenv - set next_entry=4" where 4 is the index in crub.cfg of the kernel you want
      • 2016-06-14 16653, 2016

      • ruaok
        ahhh!
      • 2016-06-14 16600, 2016

      • ruaok
        that explains the very confusing docs. :)
      • 2016-06-14 16611, 2016

      • Slurpee joined the channel
      • 2016-06-14 16657, 2016

      • kartikgupta0909
        ahh, the variable isnt there
      • 2016-06-14 16604, 2016

      • kartikgupta0909
        I ll have a look into it why it isnt there
      • 2016-06-14 16641, 2016

      • kepstin
        ruaok: indexing is 0-based :)
      • 2016-06-14 16600, 2016

      • ruaok
        where do you get the list that it current thinks it has?
      • 2016-06-14 16619, 2016

      • ruaok
        ah, zas is already trying the next go. :)
      • 2016-06-14 16623, 2016

      • kepstin
        ruaok: the generated /boot/grub/grub.cfg has all the kernels in it
      • 2016-06-14 16624, 2016

      • zas
        it didnt work either
      • 2016-06-14 16637, 2016

      • zas
        since booting on default kernel
      • 2016-06-14 16607, 2016

      • Gentlecat
      • 2016-06-14 16615, 2016

      • kepstin
        I have to go to work now, gonna be on a bus for a while :/
      • 2016-06-14 16643, 2016

      • kepstin
        i've only got one box with grub that I can play with to test stuff, and that won't be until this evening :/
      • 2016-06-14 16625, 2016

      • kartikgupta0909
        Gentlecat: It worked. The variable needs to be in capital letters to be imported.
      • 2016-06-14 16655, 2016

      • ruaok
        kepstin: the menuentry items in grub.cfg is a tree.
      • 2016-06-14 16602, 2016

      • ruaok
        how do we get orginals out of that?
      • 2016-06-14 16655, 2016

      • kepstin
        count them in depth-first traversal
      • 2016-06-14 16601, 2016

      • ruaok
      • 2016-06-14 16601, 2016

      • kepstin
        iirc
      • 2016-06-14 16634, 2016

      • ruaok
        ok, we want the 4.2.0 kernel to be default, and the 3.13.x kernel to be next.
      • 2016-06-14 16642, 2016

      • ruaok
        lets both count and see if we arrive at the same values.
      • 2016-06-14 16635, 2016

      • kepstin
        I get '3' for the 'Ubuntu, with Linux 3.16.0-73-generic'
      • 2016-06-14 16648, 2016

      • ruaok
        we want 3.13, so that is 7
      • 2016-06-14 16609, 2016

      • kepstin
        ah, wasn't paying enough attention there ;)
      • 2016-06-14 16645, 2016

      • ruaok
      • 2016-06-14 16655, 2016

      • ruaok
        do we need to run update-grub?
      • 2016-06-14 16641, 2016

      • ruaok
        sanity check, please kepstin
      • 2016-06-14 16617, 2016

      • kepstin
        no, if it boots right now then it should be good
      • 2016-06-14 16630, 2016

      • ruaok
        booted fine, into 4.2.0 kernel.
      • 2016-06-14 16632, 2016

      • ruaok
        :(
      • 2016-06-14 16618, 2016

      • kepstin
        grub loads the env file using its filesystem drivers and fails if it can't write to the file, iirc, which is why it can't be used on software raid or lvm
      • 2016-06-14 16630, 2016

      • kepstin
        but plain ext4 should be ok, I think?
      • 2016-06-14 16653, 2016

      • ruaok
        next_entry was reset, FWIW
      • 2016-06-14 16631, 2016

      • kepstin
        hmm. does the kernel file /boot/vmlinuz-3.13.0-88-generic actually exist on the system?
      • 2016-06-14 16602, 2016

      • ruaok
      • 2016-06-14 16629, 2016

      • kepstin
        cause if the env file is used - and it is, if the next_entry was reset - the only thing I can think of for it not using that entry is that it fails to load for some reason and falls back :/
      • 2016-06-14 16653, 2016

      • ruaok
      • 2016-06-14 16616, 2016

      • kepstin
        so, you *can* manually edit the /boot/grub/grub.cfg file if you understand that it'll get overwritten by update-grub later
      • 2016-06-14 16617, 2016

      • zas
        we are still unsure about the correct syntax, is there a way to test it ?
      • 2016-06-14 16637, 2016

      • kepstin
        you can rewrite it to remove the submenu, and re-arrange the kernel you want to the top
      • 2016-06-14 16648, 2016

      • ruaok
        do we maybe need 1>1 and 1>7 ?
      • 2016-06-14 16650, 2016

      • kepstin
        then it'll work even if the next_entry stuff is all broken
      • 2016-06-14 16659, 2016

      • kepstin
        and update-grub will reset it back to the stock
      • 2016-06-14 16605, 2016

      • kepstin
        just have to be careful not to put in any syntax errors tho, since then you'll just get a grub rescue prompt :/
      • 2016-06-14 16642, 2016

      • kepstin
      • 2016-06-14 16644, 2016

      • kepstin
        hmm.
      • 2016-06-14 16659, 2016

      • kepstin
        ^^ that should be the syntax to use for the variable, I think
      • 2016-06-14 16609, 2016

      • kepstin
        looks like you can use either name or index
      • 2016-06-14 16623, 2016

      • ruaok
        1>1 and 1>7 should work then?
      • 2016-06-14 16628, 2016

      • kepstin
        1>1 should be Ubuntu, with Linux 4.2.0-38-generic (recovery mode)
      • 2016-06-14 16655, 2016

      • kepstin
        i think 1>6 will be the 3.13 kernel
      • 2016-06-14 16629, 2016

      • ruaok
        ah, yes each sub menu is based.
      • 2016-06-14 16651, 2016

      • zas
        ruaok: try "1>6" ?
      • 2016-06-14 16656, 2016

      • kepstin
        I guess grub-reboot should actually work with grub 2.0; it's a shell script or something that runs grub-editenv to update variables. might be distro-specific?
      • 2016-06-14 16602, 2016

      • MBJenkins
        Project musicbrainz-server_beta build #860: SUCCESS in 19 min: https://ci.metabrainz.org/job/musicbrainz-server_…
      • 2016-06-14 16603, 2016

      • MBJenkins
        Michael Wiencek: Update translations from transifex.
      • 2016-06-14 16645, 2016

      • kepstin
        alternately, "Advanced options for Ubuntu>Advanced options for Ubuntu" might work
      • 2016-06-14 16656, 2016

      • kepstin
        er, "Advanced options for Ubuntu>Ubuntu, with Linux 3.13.0-88-generic"
      • 2016-06-14 16621, 2016

      • zas
      • 2016-06-14 16641, 2016

      • ruaok
      • 2016-06-14 16642, 2016

      • zas
        kepstin: we tried already without success
      • 2016-06-14 16611, 2016

      • ruaok
        I've tried single quotes, double quotes.
      • 2016-06-14 16616, 2016

      • ruaok
        all get env block too small
      • 2016-06-14 16616, 2016

      • kepstin
        ... how big is it? do 'ls -l /boot/grub/grubenv'
      • 2016-06-14 16643, 2016

      • ruaok
        -rw-r--r-- 1 root root 1009 Jun 14 13:47 /boot/grub/grubenv
      • 2016-06-14 16658, 2016

      • kartikgupta0909
        alastairp: I have made the changes you suggested in yesterdays review. Please have a look whenever you get time
      • 2016-06-14 16618, 2016

      • kepstin
        so about a kb? that seems like it would be big enough. weird :/
      • 2016-06-14 16640, 2016

      • kepstin
        Could try using grub-editenv - create to blank it, then set the variable again
      • 2016-06-14 16611, 2016

      • kepstin
        Blank will fall back to first kernel, so that should be safe
      • 2016-06-14 16639, 2016

      • ruaok
      • 2016-06-14 16648, 2016

      • ruaok
        create worked. :)
      • 2016-06-14 16620, 2016

      • ruaok
        rebooting
      • 2016-06-14 16609, 2016

      • ruaok
        FINALLY!
      • 2016-06-14 16611, 2016

      • ruaok
        thanks kepstin
      • 2016-06-14 16642, 2016

      • MBJenkins
        Project musicbrainz-server_master build #465: FAILURE in 19 min: https://ci.metabrainz.org/job/musicbrainz-server_…
      • 2016-06-14 16610, 2016

      • MBJenkins
        Project acousticbrainz-server build #93: FAILURE in 2 min 10 sec: https://ci.metabrainz.org/job/acousticbrainz-serv…
      • 2016-06-14 16646, 2016

      • alastairp
        kartikgupta0909: thanks
      • 2016-06-14 16605, 2016

      • kartikgupta0909
        I ll start working on this weeks task
      • 2016-06-14 16612, 2016

      • alastairp
        nice!
      • 2016-06-14 16628, 2016

      • alastairp
        I've been doing some work here to export datasets
      • 2016-06-14 16642, 2016

      • alastairp
        the process is very slow. We;re going to have to do some optimisations
      • 2016-06-14 16650, 2016

      • kartikgupta0909
        oh great. That will be really helpful
      • 2016-06-14 16657, 2016

      • kartikgupta0909
        Yeah I am ready to spend time on that
      • 2016-06-14 16658, 2016

      • ruaok
        kepstin: problem continues on this kernel. :(
      • 2016-06-14 16606, 2016

      • ruaok
        we'll proceed with the switch swap
      • 2016-06-14 16611, 2016

      • kartikgupta0909
        will be an interesting task
      • 2016-06-14 16622, 2016

      • alastairp
        I think the slowest part is that we are exporting 1 item at a time. I think we should increase it to 100/time or maybe more
      • 2016-06-14 16636, 2016

      • alastairp
        we should also look at protobufs
      • 2016-06-14 16602, 2016

      • alastairp
        I have a list of serialization methods I want to try, to see which one is the smallest
      • 2016-06-14 16620, 2016

      • kartikgupta0909
        oh if you want I could spend sometime on that
      • 2016-06-14 16630, 2016

      • kartikgupta0909
        before I start working on that
      • 2016-06-14 16600, 2016

      • MBJenkins
        Project acousticbrainz-server build #94: STILL FAILING in 3 min 12 sec: https://ci.metabrainz.org/job/acousticbrainz-serv…