Activity log for bug #1240652

Date Who What changed Old value New value Message
2013-10-16 19:04:31 Diogo Matsubara bug added bug
2013-10-16 19:04:54 Diogo Matsubara bug task added simplestreams
2013-10-16 22:35:27 Julian Edwards maas: status New Triaged
2013-10-16 22:35:28 Julian Edwards maas: importance Undecided Critical
2013-10-17 07:00:29 Gavin Panella branch linked lp:~allenap/maas/locking
2013-10-17 07:00:43 Gavin Panella branch linked lp:~allenap/maas/locking-scripts
2013-10-17 09:22:17 Raphaël Badin summary import_ephemerals.py script is not multi process safe maas-import-ephemerals crashes with "unexpected checksum 'sha256'" when using a proxy
2013-10-17 13:10:09 Scott Moser simplestreams: status New Confirmed
2013-10-17 13:10:14 Scott Moser simplestreams: importance Undecided High
2013-10-17 17:53:30 Scott Moser attachment added go-requests.py https://bugs.launchpad.net/maas/+bug/1240652/+attachment/3880571/+files/go-requests.py
2013-10-17 17:54:17 Scott Moser attachment added go-sstreams-mirror https://bugs.launchpad.net/maas/+bug/1240652/+attachment/3880577/+files/go-sstreams-mirror.py
2013-10-17 17:54:39 Scott Moser attachment added go-sstreams.py https://bugs.launchpad.net/maas/+bug/1240652/+attachment/3880578/+files/go-sstreams.py
2013-10-17 17:54:57 Scott Moser attachment added go-urllib.py https://bugs.launchpad.net/maas/+bug/1240652/+attachment/3880579/+files/go-urllib.py
2013-10-17 18:00:28 Launchpad Janitor branch linked lp:simplestreams
2013-10-17 19:40:46 Scott Moser bug task added simplestreams (Ubuntu)
2013-10-17 19:40:57 Scott Moser simplestreams (Ubuntu): status New In Progress
2013-10-17 19:40:59 Scott Moser simplestreams (Ubuntu): importance Undecided Medium
2013-10-17 19:41:06 Scott Moser simplestreams (Ubuntu): importance Medium High
2013-10-17 19:41:12 Scott Moser simplestreams: status Confirmed Fix Committed
2013-10-17 21:03:02 Scott Moser description Since 2013-10-11 we started seeing errors running the MAAS integration tests for saucy[1]. The checksum of the downloaded image wasn't matching the checksum expected[2]. maas-import-pxe-files failed with the following traceback: Traceback (most recent call last): File "/usr/sbin/maas-import-ephemerals", line 26, in <module> main(args) File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/ephemerals_script.py", line 450, in main target.sync(source, args.path) File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 85, in sync return self.sync_index(reader, path, data, content) File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 230, in sync_index self.sync(reader, path=epath) File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 83, in sync return self.sync_products(reader, path, data, content) File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 304, in sync_products self.insert_item(item, src, target, pgree, ipath_cs) File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/ephemerals_script.py", line 249, in insert_item data, src, target, pedigree, contentsource) File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 388, in insert_item size=data.get('size')) File "/usr/lib/python2.7/dist-packages/simplestreams/objectstores/__init__.py", line 147, in insert cksum.hexdigest(), cksum.expected)) Exception: unexpected checksum 'sha256' on precise/release-20131010/precise-daily-maas-amd64.tar.gz (found: 3d99e069e34d031f924689a3c28ea43d4046d8e9a79a2ea9014d35bcbcf57a16 expected: 2c7ab801ffd7e8673b77be828335bac29538f102dbc6baacd4ccc4c0d309a11b) }}} Initially it was thought this could be caused by a misconfigured cache in the QA lab, but after re-installing and reconfiguring (and checking with wget that the cache was returning the correct objects for a given URL, as well as checking the checksum of the file matched the one in the json file), the error was still present. Further investigation[3] raised the suspicion that the downloaded image is being handled by multiple processes. Turns out the code for simplestreams and import_ephemerals.py is not multi process safe, and multiple import-ephemerals processes working with the same datadir can cause problems like this. [1] http://10.189.74.2:8080/view/MAAS/job/saucy-adt-maas-daily/220/ARCH=amd64,label=lenovo-RD230-01/console [2] http://10.189.74.2:8080/view/MAAS/job/saucy-adt-maas-manual/95/ARCH=amd64,label=lenovo-RD230-01/console [3] http://pastebin.ubuntu.com/6247125/ == Begin SRU Info == [Impact] maas-import-ephemerals is the program that is executed to download images from http://maas.ubuntu.com which are then used for the commissioning, enlistment, and curtin install environment. This bug causes that download to fail in most cases with an http proxy between the user and maas.ubuntu.com. It is also reported to fail under cases where there is no http_proxy set (but may be a proxy in between). [Test Case] The bug could be reproduced by simply doing: PROXY=http://localhost:3128 # or some valid proxy http_proxy=$PROXY python /usr/bin/sstream-mirror -vvv http://maas.ubuntu.com/images/ephemeral/daily/streams/v1/index.json out.d arch=amd64 release=quantal You would see the download start and then hang. A suitable proxy can be installed just by 'apt-get install squid3' and then using http://localhost:3128. [Regression Potential] Regression potential should be very small. Previously each connection we made was doing an open and close and then open again. This was wreaking havoc with urllib3 as used by python-requests. Now, we're only opening and closing a single time during the mirror, and even then, a.) the url that is being downloaded will change (by having a '/' inserted into its path) where previously it would be the same url b.) step 'a' will only occur if the base url provided by the user did not already end in '/'. == End SRU Info == Since 2013-10-11 we started seeing errors running the MAAS integration tests for saucy[1]. The checksum of the downloaded image wasn't matching the checksum expected[2]. maas-import-pxe-files failed with the following traceback: Traceback (most recent call last):   File "/usr/sbin/maas-import-ephemerals", line 26, in <module>     main(args)   File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/ephemerals_script.py", line 450, in main     target.sync(source, args.path)   File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 85, in sync     return self.sync_index(reader, path, data, content)   File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 230, in sync_index     self.sync(reader, path=epath)   File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 83, in sync     return self.sync_products(reader, path, data, content)   File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 304, in sync_products     self.insert_item(item, src, target, pgree, ipath_cs)   File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/ephemerals_script.py", line 249, in insert_item     data, src, target, pedigree, contentsource)   File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 388, in insert_item     size=data.get('size'))   File "/usr/lib/python2.7/dist-packages/simplestreams/objectstores/__init__.py", line 147, in insert     cksum.hexdigest(), cksum.expected)) Exception: unexpected checksum 'sha256' on precise/release-20131010/precise-daily-maas-amd64.tar.gz (found: 3d99e069e34d031f924689a3c28ea43d4046d8e9a79a2ea9014d35bcbcf57a16 expected: 2c7ab801ffd7e8673b77be828335bac29538f102dbc6baacd4ccc4c0d309a11b) }}} Initially it was thought this could be caused by a misconfigured cache in the QA lab, but after re-installing and reconfiguring (and checking with wget that the cache was returning the correct objects for a given URL, as well as checking the checksum of the file matched the one in the json file), the error was still present. Further investigation[3] raised the suspicion that the downloaded image is being handled by multiple processes. Turns out the code for simplestreams and import_ephemerals.py is not multi process safe, and multiple import-ephemerals processes working with the same datadir can cause problems like this. [1] http://10.189.74.2:8080/view/MAAS/job/saucy-adt-maas-daily/220/ARCH=amd64,label=lenovo-RD230-01/console [2] http://10.189.74.2:8080/view/MAAS/job/saucy-adt-maas-manual/95/ARCH=amd64,label=lenovo-RD230-01/console [3] http://pastebin.ubuntu.com/6247125/
2013-10-17 21:03:53 Scott Moser nominated for series Ubuntu Saucy
2013-10-17 21:03:53 Scott Moser bug task added simplestreams (Ubuntu Saucy)
2013-10-17 21:03:53 Scott Moser nominated for series Ubuntu T-series
2013-10-17 21:03:53 Scott Moser bug task added simplestreams (Ubuntu T-series)
2013-10-17 21:04:02 Scott Moser simplestreams (Ubuntu T-series): status New In Progress
2013-10-17 21:04:05 Scott Moser simplestreams (Ubuntu T-series): importance Undecided High
2013-10-18 15:46:38 Dave Walker simplestreams (Ubuntu Saucy): status In Progress Fix Committed
2013-10-18 15:46:42 Dave Walker bug added subscriber Ubuntu Stable Release Updates Team
2013-10-18 15:46:46 Dave Walker bug added subscriber SRU Verification
2013-10-18 15:46:50 Dave Walker tags verification-needed
2013-10-21 18:10:54 Raphaël Badin tags verification-needed verification-done
2013-10-23 06:18:57 Launchpad Janitor branch linked lp:ubuntu/saucy-proposed/simplestreams
2013-10-25 18:21:21 Andreas Hasenack bug added subscriber Andreas Hasenack
2013-10-29 23:08:09 Launchpad Janitor simplestreams (Ubuntu Saucy): status Fix Committed Fix Released
2013-10-29 23:08:14 Colin Watson removed subscriber Ubuntu Stable Release Updates Team
2013-10-31 13:03:58 Scott Moser simplestreams (Ubuntu Trusty): status In Progress Fix Released
2013-10-31 13:04:15 Scott Moser bug task added cloud-archive
2013-10-31 13:05:07 Scott Moser cloud-archive: importance Undecided High
2013-10-31 13:05:07 Scott Moser cloud-archive: status New Fix Released
2014-02-05 02:12:07 Julian Edwards maas: status Triaged Invalid
2016-02-19 02:51:12 Anandbabu Samarpathy bug added subscriber Anandbabu Samarpathy
2018-06-25 14:51:52 Scott Moser simplestreams: status Fix Committed Fix Released