3 Commits
Author SHA1 Message Date
Jonathan Boulle 9685f37575 *: adjust copyright header
Inspired by a similar change in the Kubernetes project [1], this changes
the copyright header to the more generic "The rkt Authors" rather than
"CoreOS, Inc.", which is only sometimes correct.

https://github.com/GoogleCloudPlatform/kubernetes/commit/6b3a6e6b983f967c88d14d26542ec6e30c49ebd3
2015-05-03 14:29:15 -07:00
Simone Gotti 7c69744267 rkt: add command to remove one or more images from the store.
This adds a new command `rkt rmimage` to remove one or more images from the
store providing a key uniquely resolvable.

The logic is to firstly remove transactional data (the rows in the aciinfo and
remote db tables for the given key) and then remove non transactional data (the
diskv blob and imageManifest stores).

The tree store is removed separately and only if an image hash related to the
tree store key isn't referenced by any preparing/prepared/running pod.
This means that an image can be removed (from the db and the blob/imageManifest
stores) but not from the treestore.

As removal of non transactional data can fail for multiple reasons some data
can remain stale, the same applies if the treestore can't be removed because
referenced by a pod.
A future patch will provide a cas gc to clean the stale files and unreferenced
treestores.

Example:

```
$ rkt rmimage sha512-aa244c542b1b631bbd616bc266909b sha512-aaa wronghash
rkt: successfully removed aci for key: "sha512-aa244c542b1b631bbd616bc266909b"
rkt: key "sha512-aaa" not valid: no keys found
rkt: wrong key "wronghash": badly formatted hash string
rkt: 1 image(s) successfully removed
rkt: 2 image(s) cannot be removed
```
2015-04-30 11:53:13 +02:00
Jesse Dubay 99218f8676 cas: rename to store
The cas package implements more than just a CAS, so this patch gives it
a suitably generic name.

Fixes #707
2015-04-07 18:05:03 -07:00