* feature (workers): required schema changes
Changes required for consolidation of worker name, description
and address fields
* fixup! feature (workers): required schema changes
* fixup! feature (workers): required schema changes
* fixup! feature (workers): required schema changes
* Fixing up address constraint.
* last_status_time = now() on insert only if the worker is type = 'kms'
* update last_status_time for pki and kms based on different columns being updated.
* tweaking the constraints on last_status_time and address.
Co-authored-by: Todd <github@quaddi.com>
* Have hclog payloads use `json` tags
Previously a global setting for the `structs` lib was causing the `json`
tag to be used, but this could have side effects from other packages, or
could be affected by other packages' behavior. This behavior was removed
earlier but it means this format call no longer uses `json` tags; this
behavior reverts it.
It also normalizes using mapstructure in a few other places.
* Update some tests
* Fix incorrect op const
* Fix more tests
* refactor (events): tell filter to use json tags (fix related tests)
Explicitly tell the filter to use the "json" tags so we don't have to
re-tag everything with a mapstructure tag via bexpr.WithTagName("json")
Update docs
Co-authored-by: Jim <jlambert@hashicorp.com>
Updated examples to show the common use case of
specifying a directory path and file name for
a file sink. This should hopefully prevent users
from making the mistake of putting a full path
for the file_name field and seeing an error like:
[ERROR] unable to send event: operation="event.(Eventer).retrySend"
warning=
| 1 error occurred:
| * mkdir : no such file or directory
|
perf(session): Improve list response time
Notable changes include:
- Change to not include terminated sessions by default. Use the new
`include_terminated=true` query parameter to return terminated
sessions.
- Remove connections from list response. Connection information is still
returned for a read of an individual session.
- Creates a periodic job that will delete terminated sessions.
It was determined that it is a more common use case for users to request
non-terminated sessions (i.e. sessions in `pending`, `active`, or
`canceling` when requesting sessions. Notably, end users would need
non-terminated sessions to:
- Establish a new connection to a session.
- Terminate a session
So now by default a list request to `/v1/sessions` will *not* include
terminated sessions.
To still enable use cases where terminated sessions are needed, this
adds a new query parameter to include the terminated session:
`/v1/sessions?include_terminated=true`.
Note that this query parameter is considered experimental and subject to
change.
Including the nested connection information in the session list response
had a negative impact on performance as it created a significant
multiplier on the number of rows that needed to be fetched from the
database.
It was also determined that this information was used by neither the
admin ui nor the desktop client.
Note that nested connection information can still be retrieved via a
read request for a specific session.
There is a new periodic job that will delete terminated sessions that
are older than one hour. However, since until now terminated sessions
were not deleted, the first time the job runs there could be a large
number of sessions that need deleted. This could have a negative impact
on a running cluster. To mitigate the operational risk, this adds a
migration to perform an initial delete while the cluster is offline.
* server refuses to start if max_open_connections is below 5
* suggested changes - Update internal/db/db.go
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>