Skip to content

Commit df102c9

Browse files
committed
DLPX-96312 Resolved review comments
1 parent b886c95 commit df102c9

6 files changed

Lines changed: 15 additions & 21 deletions

File tree

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ Standards-Version: 4.1.2
1313

1414
Package: performance-diagnostics
1515
Architecture: any
16-
Depends: python3-bpfcc, python3-minimal, python3-psutil, telegraf, docker.io, influxdb2
16+
Depends: python3-bpfcc, python3-minimal, python3-psutil, telegraf, docker.io, influxdb2, curl, openssl
1717
Description: eBPF-based Performance Diagnostic Tools
1818
A collection of eBPF-based tools for diagnosing performance issues.

influxdb/delphix-influxdb-init

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#
33
# Copyright (c) 2026 by Delphix. All rights reserved.
44
#
5-
# SPDX-License-Identifier: GPL-2.0-or-later
6-
#
75
# One-time InfluxDB initialization: creates org, bucket, admin token,
86
# a read-only token for DCT Smart Proxy, and appends the
97
# [[outputs.influxdb_v2]] stanza to /etc/telegraf/telegraf.base.
@@ -26,7 +24,7 @@ INFLUXDB_INIT_CONF="$INFLUXDB_CONFIG_DIR/influxdb-init.conf"
2624
source "$INFLUXDB_INIT_CONF"
2725

2826
INFLUXDB_ADMIN_USER="admin"
29-
INFLUXDB_ADMIN_PASSWORD="$(openssl rand -hex 16)"
27+
INFLUXDB_ADMIN_PASSWORD=""
3028

3129
#
3230
# Log a message to stderr with a timestamp.
@@ -102,12 +100,15 @@ if [[ -f "$INFLUXDB_SETUP_STATE_FILE" ]]; then
102100
key="${line%%=*}"
103101
value="${line#*=}"
104102
case "$key" in
105-
ADMIN_TOKEN) ADMIN_TOKEN="$value" ;;
106-
ORG_ID) ORG_ID="$value" ;;
107-
BUCKET_ID) BUCKET_ID="$value" ;;
103+
ADMIN_TOKEN) ADMIN_TOKEN="$value" ;;
104+
ORG_ID) ORG_ID="$value" ;;
105+
BUCKET_ID) BUCKET_ID="$value" ;;
106+
INFLUXDB_ADMIN_PASSWORD) INFLUXDB_ADMIN_PASSWORD="$value" ;;
108107
esac
109108
done <"$INFLUXDB_SETUP_STATE_FILE"
110109
else
110+
# Generate password only when actually running setup for the first time.
111+
INFLUXDB_ADMIN_PASSWORD="$(openssl rand -hex 16)"
111112
SETUP_RESPONSE=$(influx_post "/api/v2/setup" "{
112113
\"username\": \"$INFLUXDB_ADMIN_USER\",
113114
\"password\": \"$INFLUXDB_ADMIN_PASSWORD\",
@@ -120,13 +121,14 @@ else
120121
ORG_ID=$(json_field "$SETUP_RESPONSE" "['org']['id']") || exit 1
121122
BUCKET_ID=$(json_field "$SETUP_RESPONSE" "['bucket']['id']") || exit 1
122123

123-
# Persist admin token + IDs immediately so a subsequent re-run can resume
124-
# without repeating the one-shot setup call.
124+
# Persist admin token + IDs + password immediately so a subsequent re-run
125+
# can resume without repeating the one-shot setup call, and so the password
126+
# stored in influxdb_meta always matches what InfluxDB was initialised with.
125127
old_umask="$(umask)"
126128
umask 077
127129
tmp_state="$(mktemp "${INFLUXDB_SETUP_STATE_FILE}.XXXXXX")"
128-
printf 'ADMIN_TOKEN=%s\nORG_ID=%s\nBUCKET_ID=%s\n' \
129-
"$ADMIN_TOKEN" "$ORG_ID" "$BUCKET_ID" >"$tmp_state"
130+
printf 'ADMIN_TOKEN=%s\nORG_ID=%s\nBUCKET_ID=%s\nINFLUXDB_ADMIN_PASSWORD=%s\n' \
131+
"$ADMIN_TOKEN" "$ORG_ID" "$BUCKET_ID" "$INFLUXDB_ADMIN_PASSWORD" >"$tmp_state"
130132
chmod 600 "$tmp_state"
131133
mv "$tmp_state" "$INFLUXDB_SETUP_STATE_FILE"
132134
umask "$old_umask"

influxdb/delphix-influxdb-service

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#
33
# Copyright (c) 2026 by Delphix. All rights reserved.
44
#
5-
# SPDX-License-Identifier: GPL-2.0-or-later
6-
#
75
# Wrapper script to start InfluxDB 2.x and run first-time initialization.
86
#
97

influxdb/influxdb-init.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#
22
# Copyright (c) 2026 by Delphix. All rights reserved.
33
#
4-
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
64
# Configuration for delphix-influxdb-init.
75
# Sourced by /usr/bin/delphix-influxdb-init at runtime.
86
#

influxdb/influxdb.conf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
#
22
# Copyright 2024 Delphix. All rights reserved.
33
#
4-
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
64
# InfluxDB 2.x Configuration
75
#
86

9-
bolt-path = "/var/lib/influxdb2/influxdb.bolt"
10-
engine-path = "/var/lib/influxdb2/engine"
7+
bolt-path = "/var/lib/influxdb/influxd.bolt"
8+
engine-path = "/var/lib/influxdb/engine"
119
http-bind-address = "127.0.0.1:8086"
1210
log-level = "warn"

influxdb/perf_influxdb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#
33
# Copyright (c) 2026 by Delphix. All rights reserved.
44
#
5-
# SPDX-License-Identifier: GPL-2.0-or-later
6-
#
75
# Script that enables and disables InfluxDB metric output for Telegraf.
86
#
97

0 commit comments

Comments
 (0)