puppetlabs/razor-server — pull request #135 by ChrisPortman (2014-01-12 23:49:43+00:00)
Title: Adding Support For MK updates

The branch is called custom_facts but it evolved into a system for shipping arbitrary updates to the MK which would include facts.

- There are some /svc endpoints:
- /svc/mkupdates (GET): Gets a list of updates and their details
including where the update should be unpacked.
- /svc/mkupdates/:update.tar.gz (GET): Get the tar file for the
update. The client can set 'If-None-Match' to the hex MD5 of a
previously retrieved TAR so that it will only re download if changes
have been made.

Caveates:
- Re-TAR'ing the same files will result in a new TAR that has a
different MD5 to a previous one due to differing file metadata
(create time etc). Therefore update objects depend on 2 MD5s. The first
being the TAR MD5 which the client and server will use to compare data.
The second is an MD5 of the actual update files. The server will use
this to determine if the TAR on the update object should be rebuilt.
Therefore an update object should not be re-instantiated.
- If the server restarts, all the update objects will be recreated.
This will mean new TAR MD5s and all clients will re-process all
updates.