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

vmbackupmanager should check health status of the vmstorage #5859

Closed
dmitryk-dk opened this issue Feb 23, 2024 · 1 comment
Closed

vmbackupmanager should check health status of the vmstorage #5859

dmitryk-dk opened this issue Feb 23, 2024 · 1 comment
Labels
enhancement New feature or request enterprise Enterprise issue, not included in free open source version vmbackup

Comments

@dmitryk-dk
Copy link
Contributor

Is your feature request related to a problem? Please describe

In some cases, when vmstorages has a lot of data, it can start later than vmbackupmanager pod. This may lead to many restarts for vmbackupmnager pod if it starts with the flag runOnStart.
Here is the log message when it happens

{"ts":"2024-02-22T07:19:58.790Z","level":"fatal","caller":"VictoriaMetrics/app/vmbackupmanager/main.go:348","msg":"error creating backup: error creating snapshot: Post \"http://localhost:8482/snapshot/create\": dial tcp 127.0.0.1:8482: connect: connection refused"}

Describe the solution you'd like

The vmbackaupmanager should check the vmstorage pod's health and create a snapshot only when vmstorage is healthy.

Describe alternatives you've considered

No response

Additional information

No response

@dmitryk-dk dmitryk-dk added the enhancement New feature or request label Feb 23, 2024
@valyala valyala added enterprise Enterprise issue, not included in free open source version vmbackup labels Feb 29, 2024
valyala added a commit that referenced this issue Feb 29, 2024
…15e15d1c

- Document the change at docs/CHANGELOG.md
- Give more clear name for maxHealthChecksRetries constant
- Improve logging when storage isn't reachable
- Use http.NewRequestWithContext() instead of setting up a request without context
  and then creating a new request with context vi req.WithContext() call.

Updates #5859
Updates VictoriaMetrics/VictoriaMetrics-enterprise#735
valyala added a commit that referenced this issue Feb 29, 2024
…15e15d1c

- Document the change at docs/CHANGELOG.md
- Give more clear name for maxHealthChecksRetries constant
- Improve logging when storage isn't reachable
- Use http.NewRequestWithContext() instead of setting up a request without context
  and then creating a new request with context vi req.WithContext() call.

Updates #5859
Updates VictoriaMetrics/VictoriaMetrics-enterprise#735
valyala added a commit that referenced this issue Feb 29, 2024
valyala added a commit that referenced this issue Feb 29, 2024
@valyala
Copy link
Collaborator

valyala commented Mar 1, 2024

vmbackupmanager waits for up to 30 seconds before requesting a snapshot from VictoriaMetrics if it is temporarily unavailable, starting from the release v1.99.0. Closing the feature request as done.

@valyala valyala closed this as completed Mar 1, 2024
possibull pushed a commit to possibull/VictoriaMetrics that referenced this issue Mar 27, 2024
…15e15d1c

- Document the change at docs/CHANGELOG.md
- Give more clear name for maxHealthChecksRetries constant
- Improve logging when storage isn't reachable
- Use http.NewRequestWithContext() instead of setting up a request without context
  and then creating a new request with context vi req.WithContext() call.

Updates VictoriaMetrics#5859
Updates https://github.com/VictoriaMetrics/VictoriaMetrics-enterprise/pull/735
possibull pushed a commit to possibull/VictoriaMetrics that referenced this issue Mar 27, 2024
possibull pushed a commit to possibull/VictoriaMetrics that referenced this issue Mar 27, 2024
…15e15d1c

- Document the change at docs/CHANGELOG.md
- Give more clear name for maxHealthChecksRetries constant
- Improve logging when storage isn't reachable
- Use http.NewRequestWithContext() instead of setting up a request without context
  and then creating a new request with context vi req.WithContext() call.

Updates VictoriaMetrics#5859
Updates https://github.com/VictoriaMetrics/VictoriaMetrics-enterprise/pull/735
possibull pushed a commit to possibull/VictoriaMetrics that referenced this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request enterprise Enterprise issue, not included in free open source version vmbackup
Projects
None yet
Development

No branches or pull requests

2 participants