Alexander A. Klimov
35349262ce
Use time.NewTicker(), not time.Tick()
2021-05-28 14:24:36 +02:00
Alexander A. Klimov
5a084ba7a9
Simplify code
2021-05-28 14:24:36 +02:00
Alexander A. Klimov
c636de294a
Un-capitalize error messages
2021-05-28 14:24:36 +02:00
Alexander A. Klimov
dac83f2773
Drop unused stuff
2021-05-28 14:24:36 +02:00
Alexander A. Klimov
c3ea4d9490
Avoid unreachable code
2021-05-28 14:24:36 +02:00
Alexander A. Klimov
621c1b9537
Ensure context cancellation
2021-05-28 14:24:36 +02:00
Alexander A. Klimov
cabcd458ff
Don't "misuse" unsafe.Pointer
2021-05-28 14:24:36 +02:00
Noah Hilverling
42d34797d2
README.md: Fix new config setup step
2021-05-28 14:00:19 +02:00
Feu Mourek
0e8ab58b50
Add a blank issue template with a link to the forum ( #276 )
2021-05-28 13:42:00 +02:00
dependabot[bot]
b822196a76
Bump github.com/go-sql-driver/mysql from 1.5.0 to 1.6.0
...
Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql ) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/go-sql-driver/mysql/releases )
- [Changelog](https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md )
- [Commits](https://github.com/go-sql-driver/mysql/compare/v1.5.0...v1.6.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 11:37:51 +00:00
Noah Hilverling
4e0a225918
Merge pull request #277 from Icinga/v1.0.0-rc2-basis
...
v1.0.0 RC2 Basis
2021-05-28 13:35:48 +02:00
Noah Hilverling
12aecbcd67
README.md: Add information about the config and run command
2021-05-28 13:17:28 +02:00
Noah Hilverling
962141278d
README.md: Add RC2 upgrade information
2021-05-28 12:47:08 +02:00
Eric Lippmann
e1efa23ea4
Update configuration docs
2021-05-27 10:18:33 +02:00
Eric Lippmann
3f26374eac
Move mysql.schema.sql
2021-05-25 23:32:19 +02:00
Eric Lippmann
a5e5adba54
Merge branch 'v1.0.0-rc2-rewrite'
2021-05-25 23:31:13 +02:00
Eric Lippmann
738fa1bddb
Remove obsolete code
2021-05-25 23:29:20 +02:00
Eric Lippmann
d918085fe2
Merge pull request #40 from lippserd/feature/github-actions
...
Include Github Actions
2021-05-25 16:43:43 +02:00
Eric Lippmann
7004e99cb5
Merge pull request #56 from lippserd/feature/ha-and-database-logging
...
Improve database and HA logging
2021-05-25 16:43:20 +02:00
Eric Lippmann
9ba2c01ce2
Reduce "Can't update or insert instance. Retrying" log noise
...
Only log after the third retry with the info level. Also, before
executing the transaction, sleep dependent on the retry count.
2021-05-25 16:35:41 +02:00
Eric Lippmann
372f5cae7c
Also log environment info
2021-05-25 16:25:04 +02:00
Eric Lippmann
a1ffc53998
Log first Redis connection error while retrying
2021-05-25 14:00:06 +02:00
Eric Lippmann
be3180a54c
Log first database connection error while retrying
2021-05-25 14:00:05 +02:00
Alexander A. Klimov
5b3f989f94
gofmt: behave like Goland
2021-05-25 11:09:23 +02:00
Alexander A. Klimov
0c160d2b94
GitHub actions: show what exactly is not well formatted
2021-05-25 11:07:26 +02:00
Alexander A. Klimov
b2b3f2a998
GitHub actions: separate linters
2021-05-25 10:59:10 +02:00
Henrik Triem
decccdda99
Include a Github Actions test
2021-05-25 10:59:10 +02:00
Noah Hilverling
44c734f72d
Improve database and HA logging
2021-05-25 09:49:48 +02:00
Eric Lippmann
ac2810aa6a
Merge pull request #65 from lippserd/bugfix/db-bulk-exec-cursor-leak
...
db.BulkExec(): Use ExecContext() instead of Query()
2021-05-21 11:33:51 +02:00
Julian Brost
37538b891c
db.BulkExec(): Use ExecContext() instead of Query()
...
Query() returns a cursor that has to be closed to not block the underlying
database connection. Use ExecContext() instead to both avoid the cursor leak
and also properly pass the context.
This bug lead to the DB connection pool be blocked completely after a certain
number of runtime delete queries.
2021-05-21 11:24:53 +02:00
Eric Lippmann
c5e875cfce
Merge pull request #64 from lippserd/feature/mysql-retry-5m
...
Re-use Redis dialer logic in retry.WithBackoff() and the SQL driver
2021-05-21 10:39:29 +02:00
Alexander A. Klimov
867d5b67dd
SQL driver: de-duplicate retry.WithBackoff() logic
2021-05-20 13:13:55 +02:00
Alexander A. Klimov
e4e138aaa4
Redis dialer: de-duplicate retry.WithBackoff() logic
2021-05-20 12:10:20 +02:00
Noah Hilverling
7bbc4e931e
Merge pull request #61 from lippserd/bugfix/change-id-fields-to-match-sql-schema
...
Change ID fields to match SQL schema
2021-05-20 10:46:06 +02:00
Eric Lippmann
91052b1f69
Merge pull request #62 from lippserd/feature/wrap-redis-err
...
Wrap Redis errors
2021-05-20 09:05:18 +02:00
Alexander A. Klimov
5bcd5339b4
retry.WithBackoff(): return the most descriptive error
2021-05-19 19:28:22 +02:00
Alexander A. Klimov
f77d394041
retry.WithBackoff(): add optional timeout
2021-05-19 19:12:18 +02:00
Alexander A. Klimov
00fe3fe6f7
retry.WithBackoff(): pass a context to the function to be tried
2021-05-19 19:00:55 +02:00
Noah Hilverling
6b05faaa89
Merge pull request #63 from lippserd/bugfix/runtime-update-remove-concurrency
...
Don't execute runtime update upset queries concurrently
2021-05-19 18:43:04 +02:00
Julian Brost
7056cf2b92
Don't execute runtime update upset queries concurrently
...
These updates must be executed in order, therefore prevent concurrency by using
a separate semaphore.
2021-05-19 18:32:47 +02:00
Eric Lippmann
ff5bded004
Merge pull request #26 from lippserd/feature/redis-retry
...
Survive a Redis restart
2021-05-19 16:57:24 +02:00
Eric Lippmann
417ba462ed
Merge pull request #31 from lippserd/feature/overdue
...
Sync overdue indicators
2021-05-19 16:57:03 +02:00
Alexander A. Klimov
1026d4cabf
Wrap Redis errors
2021-05-19 11:57:58 +02:00
Alexander A. Klimov
d08f32397a
Introduce icingaredis.WrapCmdErr()
2021-05-19 11:57:58 +02:00
Alexander A. Klimov
05c1361f1a
Introduce utils.Ellipsize()
2021-05-19 11:55:17 +02:00
Eric Lippmann
20465d078a
Merge pull request #57 from lippserd/bugfix/include-instance-id-in-ha-query
...
HA: Add own instance ID to responsibility query
2021-05-19 09:48:48 +02:00
Noah Hilverling
26086db211
HA: Add own instance ID to responsibility query
...
Without this PR Icinga DB thinks someone else is responsible, when it is responsible. This leads to Icinga DB only updating the heartbeat after the timeout. This could also cause random responsibility switching.
2021-05-19 09:32:12 +02:00
Alexander A. Klimov
3e45567368
config.Redis#NewClient(): work-around go-redis/redis#1737
...
... by re-trying once more often than there are connections in the pool.
2021-05-18 18:47:41 +02:00
Alexander A. Klimov
45b626c914
Redis: retry dial on syscall.ECONNREFUSED
2021-05-18 18:47:41 +02:00
Eric Lippmann
98b2d3c403
Merge pull request #60 from lippserd/bugfix/acknowledgement_state-fix-state-map
...
types.AcknowledgementState: Fix state map
2021-05-18 18:20:28 +02:00