Skip to content

Collect boot logs even when bootstrap fails#1383

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
CecileRobertMichon:boot-logs
May 21, 2021
Merged

Collect boot logs even when bootstrap fails#1383
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
CecileRobertMichon:boot-logs

Conversation

@CecileRobertMichon
Copy link
Copy Markdown
Contributor

@CecileRobertMichon CecileRobertMichon commented May 19, 2021

What type of PR is this?

What this PR does / why we need it:

  1. When the first control plane fails, the result cluster is nil which means we don't collect any logs. This adds an optional attempt to fetch the Cluster using the boostrapClusterProxy so we can proceed and grab logs on that control plane.
  2. When a machine fails to bootstrap, and ssh fail, we're not collecting boot logs because the providerID in the Machine spec has not yet been set (eg https://gcsweb.k8s.io/gcs/kubernetes-jenkins/logs/periodic-cluster-api-provider-azure-e2e-full/1394441682971267072/artifacts/clusters/capz-e2e-4t733z/machines/capz-e2e-4t733z-control-plane-wnkbt/). Fix is to use the AzureMachine spec to get the provider ID of the VM.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 19, 2021
@k8s-ci-robot k8s-ci-robot added area/provider/azure Issues or PRs related to azure provider sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 19, 2021
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

This seems to be working, boot logs were collected for the first control plane machine with failed cloud-init --> https://gcsweb.k8s.io/gcs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-azure/1383/pull-cluster-api-provider-azure-e2e/1395136518770659328/artifacts/clusters/capz-e2e-gdyh7y/machines/capz-e2e-gdyh7y-control-plane-7kbrd/

Will revert the change to fail cloud init on purpose and remove WIP

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 19, 2021
@CecileRobertMichon CecileRobertMichon changed the title [WIP] Collect boot logs even when bootstrap fails Collect boot logs even when bootstrap fails May 19, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 19, 2021
@CecileRobertMichon
Copy link
Copy Markdown
Contributor Author

/assign @chewong @devigned

@nader-ziada
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nader-ziada

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

The pull request process is described here

Details 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-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 21, 2021
@k8s-ci-robot k8s-ci-robot merged commit d026cc3 into kubernetes-sigs:master May 21, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.5.0 milestone May 21, 2021
@CecileRobertMichon CecileRobertMichon deleted the boot-logs branch February 17, 2023 22:59
willie-yao pushed a commit to willie-yao/cluster-api-provider-azure that referenced this pull request Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants