mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04:00
Automatic merge from submit-queue (batch tested with PRs 58008, 58351). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. update-swagger-spec.sh: when API server fails to start, show the last lines of logs **What this PR does / why we need it**: When API server fails to start there is no easy way to know why. You have to read the script where you will find that there is a log file that could have some useful info. This PR simplifies debugging: 1) it includes the path to the log file in the error message 2) it also shows the last 10 lines from this log Before this change: ``` +++ [0116 19:33:49] Starting kube-apiserver !!! [0116 19:34:19] Timed out waiting for apiserver: to answer at 127.0.0.1:8050/healthz; tried 30 waiting 1 between each !!! Error in ./hack/update-swagger-spec.sh:42 Error in ./hack/update-swagger-spec.sh:42. 'return 1' exited with status 1 Call stack: 1: ./hack/update-swagger-spec.sh:42 main(...) Exiting with status 1 +++ [0116 19:34:19] Clean up complete ``` After this change: ``` +++ [0116 19:42:41] Starting kube-apiserver !!! [0116 19:42:51] Timed out waiting for apiserver: to answer at 127.0.0.1:8050/healthz; tried 30 waiting 1 between each !!! [0116 19:42:51] Here are the last 10 lines from kube-apiserver (/tmp/swagger-api-server.log) !!! [0116 19:42:51] === BEGIN OF LOG === I0116 19:42:41.689355 30809 server.go:122] Version: v1.10.0-alpha.1.877+a02cb7c1f7d0d6-dirty I0116 19:42:41.942601 30809 serving.go:295] Generated self-signed cert (/tmp/update-swagger-spec.2Udp/certs/apiserver.crt, /tmp/update-swagger-spec.2Udp/certs/apiserver.key) I0116 19:42:41.942611 30809 server.go:647] external host was not specified, using 10.10.10.10 W0116 19:42:41.942618 30809 authentication.go:378] AnonymousAuth is not allowed with the AllowAll authorizer. Resetting AnonymousAuth to false. You should use a different authorizer error in initializing storage factory: group version podsecuritypolicy.admission.k8s.io/v1beta1 that has not been registered !!! [0116 19:42:51] === END OF LOG === +++ [0116 19:42:51] Clean up complete ``` **Release note**: ```release-note NONE ``` PTAL @cblecker @sttts CC @simo5 |
||
|---|---|---|
| .. | ||
| boilerplate | ||
| cmd/teststale | ||
| e2e-internal | ||
| gen-swagger-doc | ||
| jenkins | ||
| lib | ||
| make-rules | ||
| testdata | ||
| verify-flags | ||
| .golint_failures | ||
| autogenerated_placeholder.txt | ||
| benchmark-go.sh | ||
| BUILD | ||
| build-cross.sh | ||
| build-go.sh | ||
| build-ui.sh | ||
| cherry_pick_pull.sh | ||
| dev-build-and-push.sh | ||
| dev-build-and-up.sh | ||
| dev-push-hyperkube.sh | ||
| e2e-node-test.sh | ||
| e2e.go | ||
| e2e_test.go | ||
| generate-bindata.sh | ||
| generate-docs.sh | ||
| get-build.sh | ||
| ginkgo-e2e.sh | ||
| godep-restore.sh | ||
| godep-save.sh | ||
| grab-profiles.sh | ||
| import-restrictions.yaml | ||
| install-etcd.sh | ||
| list-feature-tests.sh | ||
| local-up-cluster.sh | ||
| lookup_pull.py | ||
| OWNERS | ||
| print-workspace-status.sh | ||
| run-in-gopath.sh | ||
| test-cmd.sh | ||
| test-go.sh | ||
| test-integration.sh | ||
| test-update-storage-objects.sh | ||
| update-all.sh | ||
| update-api-reference-docs.sh | ||
| update-bazel.sh | ||
| update-cloudprovider-gce.sh | ||
| update-codegen.sh | ||
| update-generated-device-plugin-dockerized.sh | ||
| update-generated-device-plugin.sh | ||
| update-generated-docs.sh | ||
| update-generated-protobuf-dockerized.sh | ||
| update-generated-protobuf.sh | ||
| update-generated-runtime-dockerized.sh | ||
| update-generated-runtime.sh | ||
| update-generated-swagger-docs.sh | ||
| update-godep-licenses.sh | ||
| update-gofmt.sh | ||
| update-openapi-spec.sh | ||
| update-staging-godeps-dockerized.sh | ||
| update-staging-godeps.sh | ||
| update-swagger-spec.sh | ||
| update-translations.sh | ||
| update_owners.py | ||
| verify-all.sh | ||
| verify-api-groups.sh | ||
| verify-api-reference-docs.sh | ||
| verify-bazel.sh | ||
| verify-boilerplate.sh | ||
| verify-cli-conventions.sh | ||
| verify-cloudprovider-gce.sh | ||
| verify-codegen.sh | ||
| verify-description.sh | ||
| verify-flags-underscore.py | ||
| verify-generated-device-plugin.sh | ||
| verify-generated-docs.sh | ||
| verify-generated-files-remake.sh | ||
| verify-generated-protobuf.sh | ||
| verify-generated-runtime.sh | ||
| verify-generated-swagger-docs.sh | ||
| verify-godep-licenses.sh | ||
| verify-godeps.sh | ||
| verify-gofmt.sh | ||
| verify-golint.sh | ||
| verify-govet.sh | ||
| verify-import-boss.sh | ||
| verify-imports.sh | ||
| verify-linkcheck.sh | ||
| verify-no-vendor-cycles.sh | ||
| verify-openapi-spec.sh | ||
| verify-pkg-names.sh | ||
| verify-readonly-packages.sh | ||
| verify-staging-godeps.sh | ||
| verify-swagger-spec.sh | ||
| verify-symbols.sh | ||
| verify-test-images.sh | ||
| verify-test-owners.sh | ||