Skip to content
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

Fix GCP metadata errors crashing Teleport #42696

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Conversation

atburke
Copy link
Contributor

@atburke atburke commented Jun 10, 2024

This change:

  • Fixes Teleport starting up on isolated cloud nodes.
  • Changes imds errors to logs in lib/service, so an unexpected imds error doesn't prevent Teleport from starting.

Fixes #42312.

Changelog: Fixed crashes related to importing GCP labels

lib/cloud/imds/gcp/imds.go Outdated Show resolved Hide resolved
lib/cloud/imds/gcp/imds.go Show resolved Hide resolved
lib/cloud/imds/gcp/imds_test.go Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
return nil, trace.Wrap(err)
if err == nil {
cfg.Logger.InfoContext(supervisor.ExitContext(),
"Found an instance metadata service. Teleport will import labels from this cloud instance",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Since you have 2 sentences here I would keep the full stop, I think it's fine in cases like this.

Suggested change
"Found an instance metadata service. Teleport will import labels from this cloud instance",
"Found an instance metadata service. Teleport will import labels from this cloud instance.",

@zmb3
Copy link
Collaborator

zmb3 commented Jun 11, 2024

/excludeflake *

@atburke atburke force-pushed the atburke/gcp-metadata-fixes branch from ad421d0 to 22a4f65 Compare June 12, 2024 17:06
@atburke atburke enabled auto-merge June 12, 2024 17:06
@atburke atburke added this pull request to the merge queue Jun 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 12, 2024
@atburke atburke added this pull request to the merge queue Jun 12, 2024
Merged via the queue into master with commit 86c6e9e Jun 12, 2024
37 checks passed
@atburke atburke deleted the atburke/gcp-metadata-fixes branch June 12, 2024 18:04
@public-teleport-github-review-bot

@atburke See the table below for backport results.

Branch Result
branch/v15 Create PR
branch/v16 Create PR

ptgott added a commit that referenced this pull request Jun 12, 2024
* Update host user groups for existing users (#41919)

This change fixes a bug in host user creation where Teleport would not
update the groups of a returning user if groups were changed in
the user's role.

* improve dynamodb permission error msg (#42855)

* improve dynamodb permission error msg

* Update lib/backend/dynamo/atomicwrite.go

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Fix GCP metadata errors crashing Teleport (#42696)

* Web: Fix differing duration between unified resource and access request page (#42742)

* Web: refactor and fix anti-pattern in access request

* Update affected teleterm files

* Address CR and fix updating duration should update pending

* Fix test and stories

* Reorganize Access Controls guides

Move Access Controls giudes into References or Admin Guides, as
appropriate.

Also reorganizes the Admin Guides section to reduce the size of the
table of contents page.

---------

Co-authored-by: Andrew Burke <31974658+atburke@users.noreply.github.com>
Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Lisa Kim <lisa@goteleport.com>
ptgott added a commit that referenced this pull request Jun 12, 2024
* Update host user groups for existing users (#41919)

This change fixes a bug in host user creation where Teleport would not
update the groups of a returning user if groups were changed in
the user's role.

* improve dynamodb permission error msg (#42855)

* improve dynamodb permission error msg

* Update lib/backend/dynamo/atomicwrite.go

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Fix GCP metadata errors crashing Teleport (#42696)

* Web: Fix differing duration between unified resource and access request page (#42742)

* Web: refactor and fix anti-pattern in access request

* Update affected teleterm files

* Address CR and fix updating duration should update pending

* Fix test and stories

* Reorganize Access Controls guides

Move Access Controls giudes into References or Admin Guides, as
appropriate.

Also reorganizes the Admin Guides section to reduce the size of the
table of contents page.

---------

Co-authored-by: Andrew Burke <31974658+atburke@users.noreply.github.com>
Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Lisa Kim <lisa@goteleport.com>
ptgott added a commit that referenced this pull request Jun 17, 2024
* Update host user groups for existing users (#41919)

This change fixes a bug in host user creation where Teleport would not
update the groups of a returning user if groups were changed in
the user's role.

* improve dynamodb permission error msg (#42855)

* improve dynamodb permission error msg

* Update lib/backend/dynamo/atomicwrite.go

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Fix GCP metadata errors crashing Teleport (#42696)

* Web: Fix differing duration between unified resource and access request page (#42742)

* Web: refactor and fix anti-pattern in access request

* Update affected teleterm files

* Address CR and fix updating duration should update pending

* Fix test and stories

* Reorganize Access Controls guides

Move Access Controls giudes into References or Admin Guides, as
appropriate.

Also reorganizes the Admin Guides section to reduce the size of the
table of contents page.

---------

Co-authored-by: Andrew Burke <31974658+atburke@users.noreply.github.com>
Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Lisa Kim <lisa@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CrashLoopBackOff in Teleport clusteron GCP with v15.3.7
3 participants