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

Enable debug service on default config #45464

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

gabrielcorado
Copy link
Contributor

Closes #45462.

When Teleport does not use a configuration file (either by providing a --config flag or using the file at the default location), the configuration comes from MakeDefaultConfig. When the debug service was added, its default value (enabled) was only added to the FileConfig, which is not used when creating the default configuration.

This PR adds the missing debug service configuration to the default configuration.

changelog: Fixed debug service not enabled by default when not using a configuration file.

@stevenGravy
Copy link
Contributor

I'm getting that the debug level is INFO when teleport start is done directly. Then I ran teleport debug get-log-level

But it'. not actually running the log at that. It's still on ERROR and not putting out any messages.

You are able to set it a different level and then it works to go to that level.

@rosstimothy
Copy link
Contributor

I'm getting that the debug level is INFO when teleport start is done directly. Then I ran teleport debug get-log-level

But it'. not actually running the log at that. It's still on ERROR and not putting out any messages.

You are able to set it a different level and then it works to go to that level.

I don't think this is related to this PR or the issue it is fixing.

@gabrielcorado
Copy link
Contributor Author

Update: I had to update the tsh test setup to turn off the debug service. Otherwise, the tests would fail due to the long data-dir path (which causes the socket listener to fail).

@gabrielcorado gabrielcorado added this pull request to the merge queue Aug 14, 2024
Merged via the queue into master with commit a9df5e9 Aug 14, 2024
34 checks passed
@gabrielcorado gabrielcorado deleted the gabrielcorado/enable-debug-service-default-cfg branch August 14, 2024 15:26
@public-teleport-github-review-bot

@gabrielcorado See the table below for backport results.

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

@@ -594,6 +594,9 @@ func ApplyDefaults(cfg *Config) {
cfg.MaxRetryPeriod = defaults.MaxWatcherBackoff
cfg.Testing.ConnectFailureC = make(chan time.Duration, 1)
cfg.CircuitBreakerConfig = breaker.DefaultBreakerConfig(cfg.Clock)

// Debug service defaults.
cfg.DebugService.Enabled = true
Copy link
Member

Choose a reason for hiding this comment

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

This introduced a regression. I believe it's now impossible to turn off the debug service through the config.

Connect My Computer turns off the debug service through the config to work around the problem with the path for the debug service socket being too long (see #43250 and #43267). Starting in v16.1.8, despite debug_service.enabled being set to false, the agent attempts to start the debug service which causes the error shown in #43250.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened a PR to solve this (#46032). Thanks for reporting it 👍

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.

Debug service not available without Teleport configuration file
5 participants