Commit Graph

99 Commits (65f42deec4523e48d81a251c6e5c7afd2d71e9c2)

Author SHA1 Message Date
Daniel Moran 518098e4f3
fix(cmd/influxd): suggest running with -h on error instead of printing usage (#19995) 2020-11-11 16:37:36 -05:00
Adrian Thurston 37ef9d2791
fix: use fluxinit package to init flux library instead of builtin (#19887)
* fix: use fluxinit package to init flux library instead of builtin

The builtin package performs costly initialization work in the go init()
function, which causes the work to be performed for all paths of the main
executables that need it, including help screens. This patch uses the fluxinit
package, which requires a call to do the costly work. It allows help screens
and other code paths to execute quickly.

* fix: need to draw in the influxdb-specific standard library in fluxinit
2020-11-03 13:07:41 -08:00
vlastahajek 999660ae2e feat(upgrade): upgrade command basic skeleton 2020-10-01 08:06:42 -07:00
Christopher M. Wolff e7cbbaa722
feat: upgrade Flux to v0.83.2 (#19569) 2020-09-16 17:59:15 -07:00
Stuart Carnie 0f1b7fdafb
feat: Create initial stubs for influxd upgrade command
Includes some example sub commands for dumping v1 and v2 metadata

* `influxd upgrade v1-dump-meta`
* `influxd upgrade v2-dump-meta`

Closes #19495
2020-09-03 14:23:51 -07:00
Stuart Carnie dee8977d2c
chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07:00
Stuart Carnie 262023ae4a
fix(launcher): influxd inspect commands now start instantly
Lazily initialize flux, which increases startup time considerably
2020-08-03 15:16:36 -07:00
Stuart Carnie 26c18ac0a5
chore: Converging on 1.x tsdb 2020-08-03 09:20:48 -07:00
Edd Robinson 2b175291be
refactor: WIP removing tsbd 2020-08-03 09:18:34 -07:00
Russ Savage 3009579b85
fix(migrate): remove cli migrate command (#19004) 2020-07-22 08:35:57 -07:00
greg linton e4d33f1066 fix: don't overwrite build date set via ldflags 2020-07-07 16:15:00 -06:00
Johnny Steenbergen 84723e15d2 feat(influxd): refactor run command to use cli.Program to respect config file 2020-06-18 15:59:53 -07:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Edd Robinson bbe40aeb82 feat: prototype 1.x - 2.x migration tool 2020-03-13 11:00:28 +00:00
Jacob Marble b836ab9c17
feat(storage): implement backup and restore (#16504)
* feat(backup): `influx backup` creates data backup

* feat(backup): initial restore work

* feat(restore): initial restore impl

Adds a restore tool which does offline restore of data and metadata.

* fix(restore): pr cleanup

* fix(restore): fix data dir creation

* fix(restore): pr cleanup

* chore: amend CHANGELOG

* fix: restore to empty dir fails differently

* feat(backup): backup and restore credentials

Saves the credentials file to backups and restores it from backups.

Additionally adds some logging for errors when fetching backup files.

* fix(restore): add missed commit

* fix(restore): pr cleanup

* fix(restore): fix default credentials restore path

* fix(backup): actually copy the credentials file for the backup

* fix: dirs get 0777, files get 0666

* fix: small review feedback

Co-authored-by: tmgordeeva <tanya@influxdata.com>
2020-01-21 14:22:45 -08:00
Yiqun Zhang 74ba877cb9
feat: opentracing in query execution runtime 2020-01-08 11:16:13 -05:00
Greg b2531c1f97
fix: improve date in `version` command (#16365)
set date in go like a sane person
2019-12-30 17:56:58 -07:00
Greg 56973b8dc5
fix: add 'version' command to match github bug report template (#15629) 2019-12-30 12:53:52 -07:00
Stuart Carnie 8669e94904
feat(influxd): Add the generate subcommand 2019-03-19 21:52:26 -07:00
Edd Robinson 70e5a33bff Add inspect sub-command 2019-03-19 14:25:51 +00:00
Stuart Carnie e8045ae187
feat(influxd): Migrate influxd binary to cobra Command package
This commit consists of several improvements or changes:

* migrate the influxd binary to cobra.Command
* introduce a default run sub-command to start the server
* register the run sub-command flags with viper
  to maintain compatibility with the existing behavior of automatic
  binding of flags to environment variables.

Closes #12602
2019-03-14 09:23:53 -07:00
Chris Goller d9f5e84d6a feat(telemetry): add telemetry server handler 2019-01-21 13:05:58 -06:00
Chris Goller 2d00eb18c5 feat(telemetry): add telemetry handler 2019-01-21 13:05:58 -06:00
Chris Goller af8f698490 feat(telemetry): add initial telemetry metrics 2019-01-21 13:05:58 -06:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Edd Robinson 42ff769f1c Wire up storage.Engine to HTTP BucketService 2019-01-09 15:09:56 +00:00
Adam 30b2d9ca00
refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused. (#2089) 2018-12-20 17:05:36 -05:00
Adam ad38ad8c3f Revert "refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused (#2077)"
This reverts commit c3c12d1517.
2018-12-20 16:29:28 -05:00
Adam c3c12d1517
refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused (#2077)
* refactor(cmd/influxd): move driver code for influxd main package to sub-package so it can be reused.

* chore(query/influxql): moved query_test.go and requisite files to the influxql dir to be closer to the code it tests. (#2013)
2018-12-20 16:15:40 -05:00
Ben Johnson 846192c066
Merge pull request #1886 from influxdata/bj-refactor-test-cancellation
fix(cmd/influxd): Refactor test cancellation out of main path.
2018-12-14 10:43:15 -07:00
Lyon Hill f7ae8c3524
feat(api/task): Add validation for both tasks and buckets on task create (#1900)
fixes #1622
2018-12-12 16:07:40 -07:00
Ben Johnson 89bf9765cc
fix(cmd/influxd): Refactor test cancellation out of main path.
This commit moves the `Main.cancel()` execution to the `main_test.go`
file so it's only executed for tests. This was interfering with the
shutdown process on the regular `influxd` binary.
2018-12-12 10:53:10 -07:00
Ben Johnson 8d071f85fd
Fix hang on help command. 2018-12-11 11:07:54 -07:00
Edd Robinson 3ea3d90e10
Merge pull request #1623 from influxdata/er-storage-metrics
Add storage engine metrics
2018-12-07 17:50:13 +00:00
Mark Rushakoff 2e81dd31b4 refactor(task): enable high-frequency WithTicker option
Previously, the WithTicker option would call TickScheduler.Tick every
time the underlying time.Ticker sent a time on its channel. This meant
we used a 1s period, which meant that in the worst case, we would see a
tick at about 999ms after the second rollover.

This change increases the underlying time.Ticker frequency, but only
calls TickScheduler.Tick after a second rolls over. Since we now use a
tick frequency of 100ms, during normal operation, TickScheduler.Tick
will be called within 0.1s after the second rolls over.
2018-12-07 08:38:59 -08:00
Edd Robinson 93892c20ab Fix test 2018-12-07 14:32:34 +00:00
Edd Robinson c76626accf Fix rebase 2018-12-07 14:32:34 +00:00
Edd Robinson f56bc0853f Convert TSM compaction stats to Prom metrics
This commits converts all the 1.x TSM compaction statistics, which
previously were written to an _internal db, to Prometheus metrics.
2018-12-07 14:32:34 +00:00
Jade McGough 8c961e12bb
Labels (#1668)
* feat(platform): add label struct

* feat(platform): add label service interface

* WIP label service

* chore(http): simplify URMapping validation

* WIP label service skeleton

* add new GET labels handler

* feat(http): add POST handler for label service

* feat(http): add label delete handler

* fix json tag

* add happy path testing

* feat(http): add label endpoints to dashboard service

* make fmt

* add label delete handler

* make fmt again :(

* feat(bolt): add label implementation

* wire boltdb implementation of labels

* feat(mock): add mock for label service

* fix tests, add delete test

* add remaining tests, flesh out GET params

* unused code

* remove comments

* add labels endpoints

* clean up labels after deleting a dashboard

* fix issues from code review

* WIP remove type from labels

* feat(http): add label cli functions

* fixes

* make fmt

* feat(http): add labels to tasks and buckets

* feat(bolt): remove labels if their resources are deleted

* remove bolt cleanup for now

* make fmt

* type conversion magic

* feat(inmem): implement label service

* prevent race conditions

* remove labels from inmem if their resources are deleted

* fix race condition

* fix formatting
2018-12-03 08:07:08 -08:00
Jade McGough 873aae3fad
Revert "feat(http): add label service" (#1667)
This reverts commit 70a430c599.
2018-12-03 04:27:27 -08:00
Jade McGough 70a430c599
feat(http): add label service (#1346) 2018-11-30 21:08:35 -08:00
Edd Robinson 9403c1ec8e Ensure error strings not capitalised ST1005 2018-11-30 10:54:24 +00:00
Mark Rushakoff a06d4dea16 refactor(query): explicitly shut down query controller
The flux query controller was updated to include a Shutdown method a
while ago. Explicitly handle query controller creation and shutdown
where applicable.

In influxd, this ensures that outstanding queries are handled before the
process dies. In tests, this ensures that query controller goroutines
aren't leaked, which drastically simplifies reading full stack traces.

This change also registers query controller metrics with the prometheus
registry in influxd.
2018-11-26 16:13:19 -08:00
Mark Rushakoff b0b0d965ff feat(task): integrate task logs with system buckets
- Brought over enterprise's QueryLogReader, with small adjustments
  - Time filters are for the run's ScheduledFor field, per spec
- Adjusted run log timestamps for consistent formatting:
  - ScheduledFor is RFC3339 because it's a whole-second timestamp
  - StartedAt, FinishedAt use RFC3339Nano for high precision
- Several test adjustments to use relative time, for easier integration
  with storage retention
2018-11-15 08:59:15 -08:00
Ben Johnson 37be1e9219
Add end-to-end write/query integration testing. 2018-11-15 09:08:36 -07:00
Jeff Wendling 2cbc2ee896 refactor wal out, paths, and options 2018-11-08 11:39:36 -07:00
Jeff Wendling 0d411023f2 config: clean up
- Breaks the weird cycle that existed with the EngineOptions
- Removes a bunch of useless parameters
- Moves around a bunch of defaults
2018-11-08 11:39:36 -07:00
Michael Desa 459f2cbfbb feat(cmd/influx): add local flag for operating directly with boltdb
feat(internal/fs): move influxDir function to internal package in base of repo

feat(cmd/influx): add local flag that operates on local file system

feat(cmd/influx): add local support for org command

feat(cmd/influx): add local support for user command

eat(cmd/influx): add local support for bucket command

feat(cmd/influx): add error for local with query/task/setup cmds

fix(cmd/influx): unshadow error in delete bucket command

fix(cmd/influx): update copy for local flag commands
2018-11-02 14:34:48 -04:00
Michael Desa 7227bf8fa2 feat(platform): add operation log for resources
feat(platform): add dashboard operation log interface

feat(bolt): add dashboard operation log to bolt client

feat(platform): add links to dashboard load response

fix(http): update links in json response of dashboards

feat(bolt): add operation logs for each resource

feat(http): add routes for operation logs

feat(cmd/influxd): set operation logs on http api backend
2018-11-02 14:21:14 -04:00
Jorge Landivar 34ab06634f
Merge pull request #1266 from influxdata/opentracing
open tracing context handling for tasks and for HTTP endpoints for tasks and query
2018-11-01 16:33:19 -05:00