IRC logs for #cip for Wednesday, 2017-02-01

*** rajm has joined #cip08:13
*** toscalix has joined #cip08:29
*** kristerman has joined #cip09:54
*** christoskaramits has joined #cip11:01
*** kristerman has quit IRC11:05
*** christoskaramits has quit IRC11:46
*** christoskaramits has joined #cip12:03
*** christoskaramits has quit IRC12:05
*** kristerman has joined #cip12:05
*** toscalix has quit IRC12:24
*** toscalix has joined #cip12:25
*** toscalix has quit IRC12:25
*** toscalix has joined #cip12:25
kristermanHi Gwaihir12:31
Gwaihirkristerman, hi12:33
kristermanI have a question,  I noticed that for accessing files stored in /var/www/images/kernel-ci/<tree-name>/<arch-deconfig>/, links start with storage.kernelci.org12:34
*** toscalix has quit IRC12:34
kristermanDoes this mean there is second server used for storage?12:34
Gwaihirkristerman, yes, more precisely there is a second domain, the server right now is the same12:34
kristermansecond domain? can you elaborate please, because I didn't quite understand12:36
Gwaihirthe server is the same, we store the artifacts always on the same machine running kernelci.org12:37
Gwaihirthe web server is setup in order to serve kernelci.org, api.kernelci.org and storage.kernelci.org12:37
Gwaihirthe latter, is just the indexing of that filesystem directory12:37
Gwaihirthe "root" where the artifacts are stored: /var/www/images/kernel-ci12:38
kristermanyes, our problem seems to be that, all artifacts cannot be accessed from root12:38
kristermanat least when ran locally12:39
kristermanand the only thing we changed in front-end is in file server.py, to make sure host='0.0.0.0'12:39
Gwaihirif you use the same URL when making up the artifacts URL, yes, that is a problem, since localhost:5000 will just be the "frontend" side, not the "storage" side of things12:39
kristermanaha12:40
kristermanI think we are getting somewhere now12:40
kristermanso this means, it cannot be ran locally? using the code as it is12:40
Gwaihiryes, it can, but they are two different things: kernelci.org (what runs on localhost:5000 for you) is not the same code as storage.kernelci.org12:41
Gwaihirin the kernelci.org app there is no routing logic to handle the requests to show you the content of the filesystem12:42
Gwaihirso, if your artifacts URL have localhost:5000 as the base, they will always give you 40412:42
kristermanokay, so you are saying there is a way to access the artifacts even then ran locally?12:43
kristermans/then/when12:44
kristermanand if so, why is localhost:5000 used as the base?12:46
kristermanin our case12:46
Gwaihiryes, you need to run another server/webapp on a different port, even "python -m SimpleHTTPServer 6000" run directly into the /var/www/images/kernel-ci/ dir should work, then on your frontend side give "localhost:6000" as the storage file URL12:46
wagihurray, irc from work12:46
kristermanok Gwaihir so from what I understand, what we need to add is what you said about running another server12:47
kristermanand then the change on frontend side would be for variable fileserverURL?12:48
Gwaihiryes12:49
kristermanhttps://github.com/kernelci/kernelci-frontend/blob/master/app/dashboard/static/js/app/view-builds-id.2016.6.1.js12:49
kristermanin this file right?12:49
Gwaihirmaybe port 6000 is not a good option for the python HTTP server, but port 8000 should work12:49
kristermanalright thank you Gwaihir , that was really helpful clarification12:49
kristermanbecause this was something vital missing from my thinking, the second server12:49
Gwaihiryou need to update this value: https://github.com/kernelci/kernelci-frontend/blob/master/app/dashboard/default_settings.py#L2812:50
Gwaihirand add there "localhost:8000/" (assuming you run the second server on localhost and on port 8000)12:50
kristermanaha12:51
kristermanand when this is not ran locally?12:51
Gwaihirpoint that variable to the domain:port you setup12:51
kristermanthank you very much12:52
Gwaihirbut it needs to be accessible in some way or the other12:52
Gwaihirreally, if you have the system running already, from /var/www/images/kernel-ci/, run: python -m SimpleHTTPServer 800012:52
kristermanafter changing the fileserver url variable12:53
Gwaihirpoint that variable to "http://localhost:8000/" and restart the frontend app12:53
Gwaihiryep12:53
kristermanI will try shortly and let you know of the results, but what you say makes a lot of sense12:54
kristermanhmm, still 40412:59
kristermandoes it matter that for the kernelci-frontend/app/server.py  we have added the argument host='0.0.0.0' ?13:00
Gwaihirhmmm... no, it shouldn't13:01
kristermanlet met try port 600013:01
Gwaihirhow are the URL built now?13:01
Gwaihirwhat is the URL for the articats you see on the UI13:01
kristermansame as before13:01
Gwaihirweird... it shouldn't be if you changed the file_server_url13:03
kristermanin default_settings.py right13:03
kristermanI changed FILE_SERVER_URL to http://localhost:8000/13:04
Gwaihiryeah, did you restart the app as well afterwards?13:04
kristermanmeaning run start_webserver.sh13:04
kristermanyes13:04
Gwaihirdon't know what scriptdoes, but probably yes13:05
kristermanit runs frontend server.py13:05
kristermanand bin/activate13:05
Gwaihircan you open the developer console of your browser on the page, and look for a "file-server" element in the page?13:06
kristermanyes one sec13:06
Gwaihirit's an input element, sorry; it's id is "file-server"13:06
kristermanon page with build log right?13:07
Gwaihiryeah, on the page where you have all the artifact links13:07
kristermanfile-server element has value 'localhost'13:08
kristermanso that's the problem13:08
Gwaihirit's not picking up the change in that file13:09
Gwaihirdo you have other settings file around?13:10
Gwaihirthe order the apps read those is: default_settings, then the hardcoded path at /etc/linaro/kernelci-frontend.cfg, then whatever is defined in the FLASK_SETTINGS env variable13:11
kristermannot that I know of, from my understanding there is only one line of code altered in both backend and frontend13:11
kristermanthe host argument13:11
kristermanand default_settings.py is run everytime server.py is ran, right?13:12
kristermanOkay Gwaihir, I will try and investigate more, I think I am closer to get to the bottom of this13:13
kristermanif I manage to change the file-server variable to http://ocalhost:8000 it should work13:13
Gwaihiryeah, default_settings is the first file the app loads config from whenever you start it13:13
*** toscalix has joined #cip13:13
kristermanokay, I will trace what happens from then and on13:16
kristermanand thanks again!13:16
Gwaihirkristerman, you're welcome! if you need more help, ping me13:18
toscalixwe are getting close to the solution...13:28
kristermanGwaihir, managed to change the urls! I needed to change the config file in etc/linaro too13:34
Gwaihirkristerman, cool! you actually only need to change it in /etc/linaro then, since that file is read after the default_settings one13:34
kristermanthis is the url I get: http://localhost:8000/cip-triceratops/v4.4.27/arm-allnoconfig/build.log13:34
Gwaihirlooks better, yeah13:35
kristermanit looks right, but I get 'Unable to connect error'13:35
kristermanFirefox can’t establish a connection to the server at localhost:8000.13:36
kristermanI ran the python -m simpleHTTPServer command on /var/www/images/kernel-ci13:36
kristermanand have this: Serving HTTP on 0.0.0.0 port 8000 ...13:37
kristermangetting warmer..13:38
*** toscalix has quit IRC13:38
kristermancould it be that, the file server is running from VM?13:39
*** toscalix has joined #cip13:40
Gwaihirhmmm... if I run that http server, I can see any directory I ran it into13:44
Gwaihirif your files are stored in the VM where you run the frontend app, make sure your local port 8000 is connected to the VM one13:45
kristermanfor port 6000 I get "This adress is restricted"13:45
kristermanah, how do I do this?13:46
Gwaihiryeah, port 6000 is restricted, I think it's the X Window one...13:46
Gwaihirkristerman, have no idea of how your setup is working, but if "localhost:5000" is pointing to the VM that is serving the frontend website, I would say in the same way13:47
kristermanokay, I will trace how this is happening and mirror13:47
Gwaihirin VirtualBox, under its preferences, you need to set port forwarding13:47
kristermanwe are using vagrant13:48
kristermanI think it is set in VagrantFile13:49
kristermanfound it13:50
*** toscalix has quit IRC14:36
*** toscalix has joined #cip14:37
*** toscalix has quit IRC16:23
kristermanGwaihir, works now! \o/16:38
Gwaihirgreat! :-)16:38
kristermanhad to make a new vagrant version with the new forwarded port16:39
kristermanand clone kernel repo again, that's why it took me so long16:39
*** rajm has quit IRC16:50
kristermanthanks again for support provided Gwaihir17:02
Gwaihiryou're welcome! :-)17:13
*** kristerman has quit IRC18:01

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!