You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helm/pkg/tiller
Cristian Klein c32c9a510b fix(tiller): Avoid corrupting storage via a lock
If two `helm upgrade`s are executed at the exact same time, then one of
the invocations will fail with "already exists".

If one `helm upgrade` is executed and a second one is started while the
first is in `pending-upgrade`, then the second invocation will create a
new release. Effectively, two helm invocations will simultaneously
change the state of Kubernetes resources -- which is scary -- then two
releases will be in `deployed` state -- which can cause other issues.

This commit fixes the corrupted storage problem, by introducting a poor
person's lock. If the last release is in a pending state, then helm will
abort. If the last release is in a pending state, due to a previously
killed helm, then the user is expected to do `helm rollback`.

This is a port to Helm v2 of #7322.

Signed-off-by: Cristian Klein <cristian.klein@elastisys.com>
4 years ago
..
environment change GetPodLogs to return io.Reader instead of string 5 years ago
hook_sorter.go change copyright to "Copyright The Helm Authors" 6 years ago
hook_sorter_test.go change copyright to "Copyright The Helm Authors" 6 years ago
hooks.go fix wrong spells in hooks.go 5 years ago
hooks_test.go fix(helm): Delete hooks should wait for resource to be removed from etcd before continuing 5 years ago
kind_sorter.go Networkpolicy kind sort (#6266) 5 years ago
kind_sorter_test.go Networkpolicy kind sort (#6266) 5 years ago
release_content.go change copyright to "Copyright The Helm Authors" 6 years ago
release_content_test.go change copyright to "Copyright The Helm Authors" 6 years ago
release_history.go change copyright to "Copyright The Helm Authors" 6 years ago
release_history_test.go change copyright to "Copyright The Helm Authors" 6 years ago
release_install.go Merge branch 'master' into 2751 6 years ago
release_install_test.go Updating to newer versions of dependencies 5 years ago
release_list.go fix-up typo (#6501) 5 years ago
release_list_test.go Fix race condition in `helm list` (#4620) 6 years ago
release_modules.go Fix `no RESOURCE with the name NAME found` 5 years ago
release_rollback.go fix(tiller): rollback deleted release (#3722) (#4820) 6 years ago
release_rollback_test.go fix(tiller): rollback deleted release (#3722) (#4820) 6 years ago
release_server.go fix(tiller): Avoid corrupting storage via a lock 4 years ago
release_server_test.go change GetPodLogs to return io.Reader instead of string 5 years ago
release_status.go change copyright to "Copyright The Helm Authors" 6 years ago
release_status_test.go change copyright to "Copyright The Helm Authors" 6 years ago
release_testing.go TEST: add option to dump logs during helm test 5 years ago
release_testing_test.go change copyright to "Copyright The Helm Authors" 6 years ago
release_uninstall.go change copyright to "Copyright The Helm Authors" 6 years ago
release_uninstall_test.go test(resource-policy): verify behavior of non-standard policy types 5 years ago
release_update.go fix(tiller): Avoid corrupting storage via a lock 4 years ago
release_update_test.go fix(tiller): Avoid corrupting storage via a lock 4 years ago
release_version.go change copyright to "Copyright The Helm Authors" 6 years ago
resource_policy.go feat(resource-policy): delete manifests when policy value is delete 5 years ago
server.go change copyright to "Copyright The Helm Authors" 6 years ago