In case that CDIConfig already exists, create call will return the
object with empty fields. Calling update will result with an error
updating empty resource.
Signed-off-by: Irit goihman <igoihman@redhat.com>
Combined code from PR#489 and PR#490 by
@gites and
@danielerez
Added some tests and rebased on current master.
Signed-off-by: Alexander Wels <awels@redhat.com>
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.
[WIP] CDI: expectations and single queue - cloning refactoring
Adding 'expectPodCreate' call before creating target pod
minor change
Adding 'expectPodCreate' call before creating target pod
updating according feedback
Adding cloner unit test
code updates
Signed-off-by: tavni <tavni@redhat.com>
more updates
Signed-off-by: tavni <tavni@redhat.com>
minor change for util_test.go
Signed-off-by: tavni <tavni@redhat.com>
updating unit tests
Signed-off-by: tavni <tavni@redhat.com>
finished unit test for cloning refactoring
Signed-off-by: tavni <tavni@redhat.com>
rebase
Signed-off-by: tavni <tavni@redhat.com>
updating unit test after rebase
Signed-off-by: tavni <tavni@redhat.com>
gofmt errors
Signed-off-by: tavni <tavni@redhat.com>
- Updated controller to use ENTRYPOINT (no cmd) instead of /bin/sh
- Updated Dockerfile to set path to /usr/bin/cloner_startup.sh instead of /tmp
- Updated Dockerfile to use ENTRYPOINT.
Fixed issue #374
Signed-off-by: Alexander Wels <awels@redhat.com>