New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #61713: kubectl: fix a panic when createGeneratedObject failed #62105

Merged
merged 2 commits into from Apr 6, 2018

Conversation

@simonswine
Member

simonswine commented Apr 4, 2018

Cherry pick of #61713 on release-1.10.

#61713: kubectl: fix a panic when createGeneratedObject failed

Release note:

Fix `kubectl run` panic as errors of generated objects were not propagated

mountkin added some commits Mar 28, 2018

kubectl: fix a panic when createGeneratedObject failed
Reproduce:
kubectl run --image=alpine hello -- sleep 1d
kubectl run --image=alpine --stdin --tty --attach hello -- /bin/sh

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
avoid resource leak when both `--rm` and `--expose` are specified
Before this patch, the deployment `leak-test` won't be removed
after the following command exits.
kubectl run --image=nginx:alpine --stdin --attach \
  --rm --expose --port 80 leak-test -- sh
This patch ensures both the deployment and the service are all removed.

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
@janetkuo

This comment has been minimized.

Member

janetkuo commented Apr 4, 2018

/lgtm

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Apr 4, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: janetkuo, simonswine

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Apr 4, 2018

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@janetkuo @simonswine

Pull Request Labels
  • sig/cli: Pull Request will be escalated to these SIGs if needed.
  • priority/important-soon: Escalate to the pull request owners and SIG owner; move out of milestone after several unsuccessful escalation attempts.
  • kind/bug: Fixes a bug discovered during the current release.
Help
@janetkuo

This comment has been minimized.

Member

janetkuo commented Apr 4, 2018

cc @MaciekPytel 1.10 patch release manager

This fixes a bug introduced in 1.10.

@MaciekPytel

This comment has been minimized.

Contributor

MaciekPytel commented Apr 5, 2018

@simonswine Can you add a release note to the base PR (the one to master), so that users can see the bug was fixed in patch release? Preferably one that is understandable to people who don't know what createGeneratedObject function is.

Otherwise looks good to cherrypick.

@simonswine

This comment has been minimized.

Member

simonswine commented Apr 5, 2018

@MaciekPytel added a release note, not too sure if it is 100% correct, as the PR against master did not contain a release-note.

@MaciekPytel

This comment has been minimized.

Contributor

MaciekPytel commented Apr 6, 2018

Sorry, I missed that you're not the author of original PR. Release notes are generated from PRs to master, not cherry-picks. I already commented on the base PR, asking the author to add release note.

I'll approve cherry-pick now, but let's try to get the release note added to base PR before the release is cut.

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Apr 6, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Apr 6, 2018

Automatic merge from submit-queue.

@k8s-merge-robot k8s-merge-robot merged commit 1a8f613 into kubernetes:release-1.10 Apr 6, 2018

13 of 14 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
cla/linuxfoundation mountkin authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment