This patch does two things:
1. We modify the restar policy from never to "OnFailure" for the
Importer (we already did this for Upload, and we don't want to do it yet
for the Clone pods)
2. Upon succesful completion delete our worker pods
We're not doing this on failed pods right now because in general an
admin will likely want to inspect the pod to see why it failed.
The first question someone will likely ask is "well what about a node
failure", well in the case of a node failure for CDI we have a bigger
outstanding issue remaining to figure out how to deal with volume
connections. We can't just simply reschedule the job.
This change just updates the common package to pass golint. Of course
that has some reaching implications into other packages with renaming of
constants.
I've intentionally kept this patch set to the bare minimum for the lint
test, I do think that we should put some effort into our use of
constants (especially those in common.go) in the future.
Ideally we'd declare constants where they're used, and we wouldn't
export them if they don't need to be. There are some in here that
are only used in one or two packages, and that can be cleaned up pretty
easily however it's likely that there might be plans to use them
elsewhere in the future.
* Pull in expectations code from kubevirt
Signed-off-by: David Vossel <davidvossel@gmail.com>
* add expectations to datavolume controller
Signed-off-by: David Vossel <davidvossel@gmail.com>
* Refactor importer pod to use single queue and expectations
Signed-off-by: David Vossel <davidvossel@gmail.com>
* update utils tests to use single queue
Signed-off-by: David Vossel <davidvossel@gmail.com>
* re-introduce import controller test suite
Signed-off-by: David Vossel <davidvossel@gmail.com>
* make clone controllers pass after utils refactor
Signed-off-by: David Vossel <davidvossel@gmail.com>
* Use log level constants in cdi controllers
Signed-off-by: David Vossel <davidvossel@gmail.com>
* Remove useless shadow variables in expectations pkg
Signed-off-by: David Vossel <davidvossel@gmail.com>
* required changes to get owner references working with openshift 1.10
Signed-off-by: David Vossel <davidvossel@gmail.com>
* update functional tests to work with importer controller refactor
Signed-off-by: David Vossel <davidvossel@gmail.com>
* Rename AnnImportPVC to LabelImportPvc in order to reflect its use
Signed-off-by: David Vossel <davidvossel@gmail.com>
* Add comment about expectations code
Signed-off-by: David Vossel <davidvossel@gmail.com>
* Place cdi packages under the top level kubevirt.io project path
Signed-off-by: David Vossel <davidvossel@gmail.com>
* Change all references to cdi.io to cdi.kubevirt.io
Signed-off-by: David Vossel <davidvossel@gmail.com>
* Add go_import_path to travis config
Signed-off-by: David Vossel <davidvossel@gmail.com>
* update test package imports
Signed-off-by: David Vossel <davidvossel@gmail.com>