lp:~jaypipes/glance/bug713126

Created by Jay Pipes and last modified
Get this branch:
bzr branch lp:~jaypipes/glance/bug713126
Only Jay Pipes can upload to this branch. If you are Jay Pipes please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Jay Pipes
Project:
Glance
Status:
Merged

Recent revisions

83. By Jay Pipes

Remove last vestiges of account in Swift store

82. By Jay Pipes

Fixes for Devin and Rick's reviews

81. By Jay Pipes

Merge trunk

80. By Jay Pipes

Merge trunk

79. By Jay Pipes

Put account in glance.conf.sample's swift_store_auth_address, use real swift.common.client.ClientException, ensure tests work with older installed versions of Swift (which do not have, for example, swift.common.client.Connection.get_auth method)

78. By Jay Pipes

Fixes from Rick's review #1

77. By Jay Pipes

Adds ability for Swift to be used as a full-fledged backend.
Adds POST/PUT capabilities to the SwiftBackend
Adds lots of unit tests for both FilesystemBackend and SwiftBackend
Removes now-unused tests.unit.fakeswifthttp module

76. By Rick Harris

Makes --kernel and --ramdisk required arguments for glance-upload since Nova currently requires them.

The `null_kernel` concept in Nova is slated to be removed, so this is really just a stop gap measure.

75. By Jay Pipes

This adds a test case for LP Bug 704854 -- Exception
raised by Registry server gets eaten by API server.

The test involves spinning up an API server and a registry
server, firing cURL and glance-upload against the API
server with invalid requests, and verifying that appropriate
exception messages are contained in the response.

I should probably rebase this commit considering all the previous
commits weren't actually addressing the issue. The fact that I
had glance-api and glance-registry installed on my local machine
was causing the test runs to improperly return a passing result.

It just so happens that the glance-api and glance-registry that
I had installed to my /usr/local/bin were the very same programs
that were from a previous branch I had locally where I fixed the
root cause of this issue, which was that the sqlalchemy @validates
decorator does NOT fire for *new* objects, only existing ones, which
resulted in image_create() improperly storing NULL data in type, name,
and other non-nullable fields in the database. This then set off
a domino effect which caused the next call from
glance.server._upload_and_activate() to die a horrible death due to
the @validates decorator then firing on the already-created Image
object. This horrible death was improperly being raised from the
glance.client as a BadRequest instead of exception.Invalid, which
caused the API server to ignore the text in the actual Invalid
exception coming from the registry server.

In short, this patch finally fixes the root of the problem by
placing a validate_image() function guard which throws exception.Invalid
for any invalid data coming into the _image_update() method in the db
API. It also adds a bunch of logging statements and ensures that
exceptions throughout the call stack between the API server to the
glance.registry.Client to the Registry server are properly handled and
that the text of those exceptions isn't thrown away willy-nilly.

74. By Rick Harris

Removes image type validation in the Glance registry.

Nova xs-unified-images requires adding a new image type 'vhd' along side of 'machine', 'raw', etc. Since image_type isn't used by Glance itself (it merely stores the value and hands it back to Nova), Glance shouldn't be the arbiter of what values are acceptable-- Nova should. This promotes loose-coupling and ensures that Glance won't have to change in lock-step with Nova.

More to the point, this a stop-gap to make Glance work with the new xs-unified-images branch until we get proper `container_format` and `disk_format` modeling in Glance. When that happens, we may end up ditching `image_type` altogether.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:~glance-coresec/glance/cactus-trunk
This branch contains Public information 
Everyone can see this information.

Subscribers