/srv/irclogs.ubuntu.com/2013/10/17/#maas.txt

=== freeflying is now known as freeflying_away
=== freeflying_away is now known as freeflying
=== freeflying is now known as freeflying_away
=== CyberJacob|Away is now known as CyberJacob
bigjoolsjamespage:07:14
bigjoolsah07:14
bigjoolsjtv: this one07:14
jtvOK07:14
bigjoolsso let's discuss the actual symptoms07:15
bigjoolsrvba has the most experience so far07:15
bigjoolsand we can fill out the bug report as it's one of those "report the solution" rather than "report the bug"07:15
jtvI guess a broken download could easily be hidden behind a retry...07:15
rvbasymptoms: you run the import-pxe-files and you get: http://paste.ubuntu.com/6244329/07:15
jtvMight be worth keeping the failed download, and seeing what "strings" and "cmp" can tell us.07:17
bigjoolsrvba: ok and is the file obviously the wrong size, or just corrupt>?07:18
bigjoolsall useful info missing from the bug :(07:18
jtvBecause the file itself is missing by the time we see it.07:18
rvbabigjools: obviously the wrong size, very small whilst the file should be 200M or so07:18
bigjoolsok, so maybe it crapped out early07:18
bigjoolshas it ever worked?07:18
rvbaYes.  I worked at some point.07:19
rvbaIt*07:19
rvbaLet's see if we can reproduce it in a clean environment like a fresh canonistack instance.07:19
bigjoolsthere's a start.  we need to find a scenario to recreate first then07:19
bigjoolsI'll play there too07:19
rvbaYes.07:19
rvbaThen we need to report a proper bug with all the relevant info.07:20
jtvI guess we should also check which seems to be the correct checksum — for all we know we could be getting the wrong one from the index.07:20
bigjoolsvery very very unlikely :)07:21
jtvAll of this is, isn't it?07:22
jtvAnyway, we should learn more as soon as we can compare files.07:22
bigjoolsI used debtree on the maas package today.  Holy cow.07:22
jtvTry to compare to other, similar applictions before judging.  :)07:24
bigjoolsnot judging just noting07:24
bigjoolsso maas-import-ephemerals - not a sausage of debug output?07:25
bigjoolsor any indication it's doing anything07:25
bigjoolsIIRC smoser filed a bug about it07:25
jtvI'm looking for the retry/partial-downlod logic.  Should find out how to get more information out of it.07:26
bigjoolsrvba: this happened for you in the lab, right?07:26
rvbaCorrect.07:27
bigjoolsrvba: is it still failing there?07:27
rvbaDefine "still" :)07:27
rvbaLast time I used the lab, it failed.07:27
rvbaLast time Diogo used the lab, it failed.07:27
bigjoolscan you try removing the ephemerals completely and try again?07:28
jtvProxy weirdness could be involved...07:28
jtvThat still fails.07:28
bigjoolsI still think we need a lock BTW07:28
rvbabigjools: you mean removing the existing ephemerals?07:28
bigjoolsrvba: yes07:28
bigjoolsrm -rf /var/lib/maas/ephemerals/*07:29
rvbaIn the lab, we create a new VM every time we run tests.07:29
rvbaSo this is long gone.07:29
bigjoolsoh!07:29
bigjoolsok07:29
bigjoolsthought you were playing around on one instance07:29
rvbaNo.  Yesterday, I saw it on one instance, then Diogo saw the same problem on a completely different instance.07:30
bigjoolsdandy07:30
jtvNor is it anything like a single, incidental flipped bit in the proxy — we've seen it on different images.07:30
rvbajtv: it's clearly related to using a proxy.07:30
rvbaI ran the script without problems on canonistack instances yesterday (without using proxies).07:30
jtvI believe you — but it's not a single, incidental flipped bit in its cache.07:30
rvbaNow I'm trying again on a canonistack instance but with a proxy this time.07:31
jtvNow, proxies may easily do weird things with partial downloads, right?07:31
rvbaMaybe.07:31
rvbaI suspect the weirdness in on simplestreams' side.07:31
rvbaBut I could be wrong.07:31
jtvI wonder if it could be something like "proxy may not be sending exactly the same segment that you asked for, but script assumes that it does."07:32
rvbaMaybe.  Let's first reproduce the problem in a clean environment.  Then we can start reasoning about the problem.07:32
bigjoolsrvba: install the same proxy in canonistack and get maas to use it07:33
bigjoolsin fact we install a deb proxy by default anyway07:33
rvbaThat's precisely what I've done :).07:34
bigjoolsha!07:34
bigjoolsalso is it my imagination or is the python script really slow?07:34
jtvIt's doing humongous downloads.07:35
rvbaIt is painfully slow.  But it has huge files to download.07:35
bigjoolsI mean, it's taken 8 minutes to do two distroarchseries so far and the old script took about 1 minute TOTAL07:35
jtvQuarter-gig files.07:35
bigjools(on canonistack)07:35
bigjoolsI smell a rat07:35
bigjoolsI'm going to look at the simplestreams code07:35
rvbaHum, I got a TCP_MISS_TIMEDOUT in squid and the script failed with unexpected checksum 'sha256'.07:36
rvbaBut I don't remember seeing TCP_MISS_TIMEDOUT in the lab…07:36
bigjoolshmmmmm07:36
rvbaI probably need to configure the proxy better.07:36
bigjoolsthis is all related07:36
rvbaSo that it can cope with very long downloads.07:36
jtvbigjools: look for contentsource.py07:36
jtvUnfortunately it has a lot of different ways of doing things.07:37
jtvFundamentally, it creates a file-like object with the URL, and does a seek() for the offset of the current batch.07:37
jtvOh, that's for "file://" URLs.07:38
jtvThere's a lot of different data paths here.07:38
rvbabigjools: http://paste.ubuntu.com/6249803/ this is squid's logs07:38
rvbaThe first request is made by simplestreams.07:38
rvbaThe second one by wget.07:38
bigjoolsbatch?07:38
rvbaAnd simplestreams explodes with the checksum error right after the download occurs.07:39
bigjoolsmy conclusion is that it's buggy as hell07:39
bigjoolsrvba: the log doesn't say if it's using Range:07:40
jtvIf we're going to look at the source, we'll need to know which method it chooses for reading URLs.07:40
jtvFile size for that first download is rather small, isn't it?07:41
jtvI'm surprised that gets a 200 response.07:41
bigjoolsthe fact that this is slow as hell means it's doing something stupid07:41
jtvAnd the wget request was faster?07:42
rvbabigjools: you're right about the download time as well… it takes 11s to download an image with wget (without any proxy).07:42
bigjoolsmassively07:42
jtvActually, I've been assuming that the really huge number is the response size... what's that number right before the IP address?07:42
rvbaSo simplestreams is really doing something stupid.07:42
jtvI'm also a bit concerned about there being a deflate-aware version of the URL reading stuff.07:44
jtvThe combination with batches is one of those things that look like they could easily go wrong07:44
jtvOuch.  The code that selects the http download mechanism is nontrivial, but quietly swallows any error and makes assumptions about the reason.07:48
jtvNot a recipe for failure at all, that.07:48
bigjoolsIOError: [Errno 28] No space left on device07:50
bigjoolscrap07:50
rvbabigjools: yeah, you need a large instance, and use /mnt instead of /var/lib/maas07:50
bigjoolswhat are you putting on /mnt?07:51
rvbaI create a symlink so that the images are stored on /mnt07:51
bigjoolsis it already mounted then?07:52
rvbabigjools: cd /mnt/ ; mv /var/lib/maas .; cd /var/lib/; ln -s /mnt/maas/07:52
rvbabigjools: yes07:52
bigjoolsok07:52
bigjoolsoh I already have a /mnt with lots of space07:53
rvbabigjools: yes you do :)07:53
* bigjools moves 10Gb over07:53
jtvWe really should sabotage the code that cleans up the broken file.07:55
jtvI think that's simplestreams/objectstores/__init__.py:07:56
jtv        if not cksum.check():07:56
jtv            os.unlink(partfile)07:56
jtv            if orig_part_size:07:56
jtv                LOG.warn("resumed download of '%s' had bad checksum.", path)07:56
bigjoolshttps://bugs.launchpad.net/simplestreams/+bug/124083807:59
ubot5Ubuntu bug 1240838 in simplestreams "simplestreams is several orders of magnitude slower at downloading than wget" [Undecided,New]07:59
rvbaYay!07:59
bigjoolsahem08:00
jtvWe've got batching, checksumming, and compression all handled at more or less the same level in the code.  It'd be nice to have a clear indication of what's happening.08:03
jtvI can think of horror scenarios for any combination.08:03
bigjoolsjtv: prefer functions to do one simple thing08:06
jtvDoesn't that lead to a puzzle of lots of small functions?  :)08:08
bigjoolsthe puzzle remains the same - the reading it becomes easier08:09
bigjoolsof it*08:09
jtvIn that case I shall give less attention to complaints about my small functions.  :)08:09
bigjoolsjtv: I like them :)08:10
bigjoolsit's a trade-off of course08:10
jtvDown with spaghetti code, yay for macaroni code.08:11
bigjoolsmore like lasagna08:11
* jtv wonders whether it's a good idea to define "pizza code" in any detail08:11
rvbabigjools:  I really wonder what that script is doing… it takes minutes before I see a single hit in the proxy's cache.08:12
bigjools!08:12
bigjoolsplease add that as a data point to the bug08:12
jtvThe proxy only reports at the end of the request, not the start.08:13
rvbabigjools: of course the log entry is written *after* the download but since we know that the download itself it pretty quick, it does not explain anything…08:13
jtvOr so it seems to me — Apache does that, plus, it reports a return code doesn't it?08:13
rvbabigjools: I will, of course.08:13
bigjoolsrvba: or is it quick ...08:14
bigjoolswe need debugging in the main script08:14
rvbaYeah, that's the only option left…08:14
rvba:/08:14
jtvI think we need debugging code in the simplestreams code... For starters, which "opener" we get.08:16
jtvWell no, for _starters_, we need that file so we can look at it.08:16
gmballenap: When you wrote the comment on line 248 of http://bazaar.launchpad.net/~maas-maintainers/maas/trunk/view/head:/src/maascli/api.py#L248, what were you actually meaning?08:26
* bigjools guesses unicode08:27
bigjoolsand print leaves a \n IIRC08:28
bigjoolsgmb: he's not around today BTW08:28
gmbbigjools: Right, hence the "files downloaded with the API get an extra newline"08:28
gmbOIC.08:28
bigjoolsyeah - easy to fix I reckon :)08:29
gmbbigjools: Oh, definitely :). Question: do we _want_ that extra newline for prettification of textual output to stdout?08:29
gmb(If so, I'll put it on stderr, which is what we do for headers when printing those out)08:29
bigjoolsthere's a fun question08:29
bigjoolswe probably do08:30
bigjoolsand that's a neat solution08:30
gmbCool beans.08:30
allenapgmb: I think it was two things, "trailing newline" and "might encode", but you seem to be there already.08:34
gmballenap: Right - I'm on dangling modifier patrol today, so I didn't know if it was two statements or one.08:40
rvbasmoser: ping11:28
=== freeflying_away is now known as freeflying
smoserrvba, here.12:33
rvbaHi smoser, I'd like to talk about bug 1240652.12:33
ubot5bug 1240652 in MAAS "maas-import-ephemerals crashes with "unexpected checksum 'sha256'" when using a proxy" [Critical,Triaged] https://launchpad.net/bugs/124065212:33
rvbasmoser: my testing shows that simplestreams is simply stuck in contentsource.py:RequestsUrlReader.read12:34
smoserrvba, can i see a system where you reproduced ?12:35
rvbaAfter a while, the proxy times out, closes the request;  then simplestreams tries to checksum a partial file and that fails.12:35
rvbasmoser: yes, one sec12:35
smoseri can follow your doc its fine in comment f4 excetp for squid config.  that'd be the only part dependent on maas.12:35
rvbasmoser: right, I didn't do any modification to the config, so it's whatever maas ships.12:36
rvbasmoser: and we also saw the same problem in the lab, using a different proxy (i.e. not the one shipped with maas).12:37
rvbasmoser: ssh ubuntu@10.55.61.2312:38
rvbasmoser: join the byobu session there, I'll show you around12:38
smoserrvba, k. there are 2 things.12:39
smoserwhich url reader are we using.12:39
rvbasmoser: the default one, python-requests12:40
rvbasmoser: I put lots of debugging output :)12:41
smoseryeah. so i got rid of that, and now it seems functional.12:41
smoserthis sucks.12:41
smoserrvba, so, it uses python-requests if it is found with sufficient version.12:43
smoserthe reason for using it is that  it supports compressed encoding12:43
smoser(which clearly isn't useful on already compressed data, but for metadata it is)12:43
rvbasmoser: I see… well, using a different url reader it seems to work indeed.12:44
rvbaWhich, like you said, sucks.12:44
smoserrvba, i found http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=71291512:51
ubot5Debian bug 712915 in python-requests "python-requests: adapters.py uses undefined name ProxyManager" [Important,Fixed]12:51
smoserearlier in the cycle.12:51
smoserso its fairly clear that this is unfortunately not really well tested code12:51
smoseri'll debug, rvba12:51
smoserthanks for your debugging.12:51
smoserwhats weird is that we could not reproduce in the lab after the first time.12:52
rvbaThanks for your help smoser.12:52
rvbaI think that's because the partial download stuff hides the problem somehow.12:52
smoserrvba,14:15
smoserwhy cann't i reproduce with14:16
smoserhttp://paste.ubuntu.com/6251217/14:16
smoserany ideas? the "this fails" doesn't really fail.14:17
rvbasmoser: let me try and see if I can spot a difference with when we run maas-import-ephemerals…14:25
smoserfound it14:25
smoserpython2 -> python3 fixes14:26
smoserjoy.14:26
rvbaGreat joy indeed :)14:26
smoserrvba, fwiw, https://bugs.launchpad.net/simplestreams/+bug/124083814:53
ubot5Ubuntu bug 1240838 in simplestreams "simplestreams is slower at downloading than wget" [Undecided,Triaged]14:53
smoser"it takes several minutes before the proxy is actually used" is probably wrong14:54
smoseri've been confused by this before.14:54
smosersquid prints to log only after downloading14:54
rvbasmoser: yeah, that's the same isse.14:54
rvbaissue*14:54
rvbaYep.14:54
smoserit is very confusing when you're tailing logs :)14:54
smoserand downloading large files.14:54
rvbaBut since the download was supposed to take 10 seconds, it didn't make sense for the script to be blocked for several minutes.14:54
rvbaNow we know this is all because of python-requests acting up.14:55
jpdssmoser: Hey.15:01
smosermatsubara, rvba fudge.15:01
smoserhttps://bugs.launchpad.net/maas/+bug/124065215:01
ubot5Ubuntu bug 1240652 in MAAS "maas-import-ephemerals crashes with "unexpected checksum 'sha256'" when using a proxy" [Critical,Triaged]15:01
smoser"15:01
smoserFWIW, I ran into this bug yesterday while testing the ISO and there was no proxy involved.15:01
smoser"15:01
smoseri sort of dont believe that. as i cannot recreate it, and *with* a proxy, its trivial to recreate.15:01
smoseroh. wait. that is the locking bug.15:01
smoserthat is basically unerstood.15:02
smosernever mind.15:02
smoserjpds, whats up?15:02
jpdssmoser: You heard any reports about pserv failing to come back up on an upgrade from yesterday's package?15:02
rvbasmoser: really?  There is no cron-like system running the script at the moment, so I don't believe in the locking thing :)15:02
rvbasmoser: I don't see why the bug we saw couldn't be triggered from time to time without the usage of a proxy.15:03
jpdssmoser: I just upgraded, and maas-pserv went away: http://paste.ubuntu.com/6251438/15:03
jpdssmoser: But doing: service maas-pserv start --- made it come back.15:03
rvbaWe just know it can be reproduced with a proxy.  We're not sure it only happens with a proxy.15:03
smoserroaksoax, ^ see jpds above, thoughts?15:05
jpdsI can see in line 86 that pserv was suppose to come back, but then it disappeared...15:05
smoserjpds, /var/log/upstart/maas-pserv.log have nything?15:07
roaksoaxuhmmm15:07
roaksoaxyeah the upstartlog should show more15:08
jpdshttp://paste.ubuntu.com/6251469/15:08
smoserrelease week is fun.15:10
roaksoaxyeah15:11
roaksoaxuhmm thays a new message ive never seen before15:13
jpdsOf course, there's no timestamp which helps.15:13
smosertimestamps are for weenies15:16
smoserhm..15:31
smoserit would seem that if maas is expecting any value out of squid3 that it needs to configure it.15:31
smoser#Default:15:31
smoser# maximum_object_size 4 MB15:31
smoseranything over that size (from /etc/squid3/squid.conf)  is not getting cached.15:32
smoserso small debs will get cached. but images not nor large debs.15:32
matsubarasmoser, the proxy in the qa lab have maximum_object_size 1000 MB which should be enough to cache the images (not sure if your comments above are related to bug 1240652)15:35
ubot5bug 1240652 in MAAS "maas-import-ephemerals crashes with "unexpected checksum 'sha256'" when using a proxy" [Critical,Triaged] https://launchpad.net/bugs/124065215:35
smoserwell, they are related.15:36
smoserbut the point still stands.15:36
smosersquid3 default config is basically useless to maas.15:36
smoserso if we're installing it, we need to be configuring it15:36
smoser(also, default is no on disk cache, memory only)15:36
matsubarasmoser, in any case, when I tested the ISO and got the checksum error, I wasn't using a proxy but my connection to the datacenter is not so great. Could it be that I managed to trigger the bug locally without a proxy because m-i-e was waiting for data, didn't get it for some time, then it retried the download, triggering the bug?15:38
matsubarasmoser, I think squid3 is part of the dependencies for maas because of the s-d-p. I don't think we require the default install of MAAS to have any proxy configured.15:39
smoserah. i forgot that we have squid-deb-proxy15:40
smoseryeah, the dfeault config of that should make more sense.15:40
smoserbut still wont help for images15:40
=== freeflying is now known as freeflying_away
=== freeflying_away is now known as freeflying
=== freeflying is now known as freeflying_away
smoseri think i have a fix for bug16:19
smoserhttp://paste.ubuntu.com/6251802/16:19
smosermatsubara, where did you do this test ?16:20
smoserwhere you saw it from the iso16:20
smoseri think there is a proxy in your path16:20
smoserin your network path16:20
matsubarasmoser, locally on my laptop. I have a proxy running on my laptop too but I didn't use it during the install (i.e. the installer asks if I want to use a http proxy for which I answered no)16:21
smoseryou could be proxied along your path16:22
smoser?16:22
smoserie, another transparent proxy.16:22
roaksoaxRuetobas: ping16:24
roaksoaxerr16:24
roaksoaxsorry16:24
roaksoaxrvba: ping16:24
matsubarasmoser, I might. I'm pretty sure there's no transparent proxy inside my network. If my ISP has a tranparent proxy running, then it's beyond my power to change any config (and would make this bug even more critical). Is there any way to check if I'm going through a transparent proxy? I guess not right, that's the point of it being transparent16:29
smosermatsubara, only to find bugs like this :)16:29
roaksoaxallenap: around?16:30
smoseryou're right. clealy its not your fault, and you have no control. i was just trying to explain what i think is wrong but didn't make sense for your path.16:30
roaksoaxadam_g: where's the wikipage that you were maintining showing how to install openstack with maas& juju? https://help.ubuntu.com/community/UbuntuCloudInfrastructure ?17:09
adam_groaksoax, here? https://wiki.ubuntu.com/ServerTeam/OpenStackHA17:10
roaksoaxadam_g: that's for the HA stuff.. i mean the one you were maintaining on help.ubuntu.com/community?17:11
adam_groaksoax, there was one at the URL you posted, dunno where it got moved to17:14
adam_groaksoax, jorge also started https://help.ubuntu.com/community/UbuntuCloudInfrastructure/JujuBundle.17:14
roaksoaxadam_g: thanks!17:14
Spideymandoes anyone here have much experience with MAAS restful API? What authentication header do I need to send with the key?19:52
SpideymanAuthorization: Basic"19:52
Spideyman?19:52
SpideymanX-Auth?19:53
smoserSpideyman, i'd look at maas-cli19:56
smoser(as in look there for the details)19:56
Spideymansmoser got it, thanks19:58
=== Spideyman is now known as Spideyman_afk
=== Spideyman_afk is now known as Spideyman
=== CyberJacob is now known as CyberJacob|Away
bigjoolssmoser: please can you help debug https://bugs.launchpad.net/bugs/1240838, it makes ephemeral download practically unusable22:52
ubot5Ubuntu bug 1240838 in simplestreams "simplestreams is slower at downloading than wget" [Undecided,Triaged]22:52

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