Merge lp:~caio1982/ubuntu-system-image/sis-skip404 into lp:ubuntu-system-image/server
Status: | Superseded |
---|---|
Proposed branch: | lp:~caio1982/ubuntu-system-image/sis-skip404 |
Merge into: | lp:ubuntu-system-image/server |
Diff against target: |
16 lines (+6/-0) 1 file modified
lib/systemimage/generators.py (+6/-0) |
To merge this branch: | bzr merge lp:~caio1982/ubuntu-system-image/sis-skip404 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Registry Administrators | Pending | ||
Review via email: mp+252579@code.launchpad.net |
This proposal has been superseded by a proposal from 2015-03-11.
Description of the change
Image server goes crazy if the configured image is not there at the time of importing. What happens is that it fetches an Apache error page (HTML) and try to import it, which surprisingly works. Then when the image is finally there it tries to generate a delta, and that obviously fails because one of the files (the source one) is not an image.
The only way to recover from this state is to manually intervene and remove the first processed files, json, images etc. This is very problematic for us in PES.
Although this MR is kind of hackish it does the job for running image server on Prodstack. I understand a more robust solution would be needed to handle corner cases (perhaps using Requests instead of urllib, to start with).
Unmerged revisions
- 265. By Caio Begotti
-
add more debug logging to the methods we are wrapping around
- 264. By Caio Begotti
-
fix flake errors due to leftovers from previous commit
- 263. By Caio Begotti
-
transform all calls to urlopen and urlretrieve in wrapper calls so we catch all timeouts and >= 400 http errors better
- 262. By Caio Begotti
-
catch all http errors above 400 instead and make the logging message more generic to reflect it
- 261. By Caio Begotti
-
make s-i-s a bit smarted by returning none if the actual file was not found, otherwise it will process a dummy html page with a 404 error message inside it... this is more like a hack because using urllib these days seems already wrong and i dont have the time to fully fix how all files are urlopened or urlretrieved in its code