commit
279bf1bf13
|
@ -6,6 +6,7 @@ This release includes our initial ARM64 "preview" build.
|
|||
|
||||
### Breaking Changes
|
||||
|
||||
#### influxd upgrade
|
||||
Previously, `influxd upgrade` would attempt to write upgraded `config.toml` files into the same directory as the source
|
||||
`influxdb.conf` file. If this failed, a warning would be logged and `config.toml` would be written into the `HOME` directory.
|
||||
|
||||
|
@ -16,6 +17,11 @@ This release breaks this behavior in two ways:
|
|||
Users can use the new `--v2-config-path` option to override the output path for upgraded config if they can't or don't
|
||||
want to use the default.
|
||||
|
||||
#### v2 packaging
|
||||
Based on community feedback, the v2 deb and rpm packaging has been improved to avoid confusion between versions. The package
|
||||
name is now influxdb2 and conflicts with any previous influxdb package (including initial 2.0.0, 2.0.1, and 2.0.2 packages).
|
||||
Additionally, v2 specific path defaults are now defined and helper scripts are provided for `influxd upgrade` and cleanup cases.
|
||||
|
||||
### Features
|
||||
|
||||
1. [20123](https://github.com/influxdata/influxdb/pull/20123): Allow password to be specified as a CLI option in `influx v1 auth create`.
|
||||
|
@ -36,6 +42,7 @@ want to use the default.
|
|||
1. [20201](https://github.com/influxdata/influxdb/pull/20201): Optimize shard lookup in groups containing only one shard. Thanks @StoneYunZhao!
|
||||
1. [20155](https://github.com/influxdata/influxdb/pull/20155): Respect the `--name` option in `influx setup` whether configs already exist or not.
|
||||
1. [20155](https://github.com/influxdata/influxdb/pull/20155): Allow for 0 (infinite) values for `--retention` in `influx setup`.
|
||||
1. [20305](https://github.com/influxdata/influxdb/pull/20305): Set v2 default paths and provide upgrade helper scripts in release packages
|
||||
|
||||
## v2.0.2 [2020-11-19]
|
||||
|
||||
|
@ -117,7 +124,7 @@ want to use the default.
|
|||
1. [19819](https://github.com/influxdata/influxdb/pull/19819): Isolate telegraf config service and remove URM interactions
|
||||
1. [19853](https://github.com/influxdata/influxdb/pull/19853): Use updated HTTP client for authorization service
|
||||
1. [19856](https://github.com/influxdata/influxdb/pull/19856): Make tagKeys and tagValues work for edge cases involving fields
|
||||
1. [19870](https://github.com/influxdata/influxdb/pull/19870): Correctly parse float as 64-bits
|
||||
1. [19870](https://github.com/influxdata/influxdb/pull/19870): Correctly parse float as 64-bits
|
||||
1. [19873](https://github.com/influxdata/influxdb/pull/19873): Add simple metrics related to installed templates
|
||||
1. [19885](https://github.com/influxdata/influxdb/pull/19885): Remove extra multiplication of retention policies in onboarding
|
||||
1. [19887](https://github.com/influxdata/influxdb/pull/19887): Use fluxinit package to init flux library instead of builtin
|
||||
|
|
|
@ -9,7 +9,7 @@ After=network-online.target
|
|||
User=influxdb
|
||||
Group=influxdb
|
||||
LimitNOFILE=65536
|
||||
EnvironmentFile=-/etc/default/influxdb
|
||||
EnvironmentFile=-/etc/default/influxdb2
|
||||
ExecStart=/usr/bin/influxd
|
||||
KillMode=control-group
|
||||
Restart=on-failure
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Environment defaults
|
||||
INFLUXD_CONFIG_PATH=/etc/influxdb/config.toml
|
||||
INFLUXD_BOLT_PATH=/var/lib/influxdb/influxd.bolt
|
||||
INFLUXD_ENGINE_PATH=/var/lib/influxdb/engine
|
||||
|
||||
export INFLUXD_CONFIG_PATH INFLUXD_BOLT_PATH INFLUXD_ENGINE_PATH
|
||||
|
||||
# Check upgrade status
|
||||
bolt_dir="/root/.influxdbv2 /var/lib/influxdb/.influxdbv2 /var/lib/influxdb"
|
||||
for bolt in $bolt_dir
|
||||
do
|
||||
if [[ -s ${bolt}/influxd.bolt ]]; then
|
||||
echo "An existing ${bolt}/influxd.bolt file was found indicating InfluxDB is"
|
||||
echo "already upgraded to v2. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Perform upgrade
|
||||
sudo /usr/bin/influxd upgrade \
|
||||
--config-file=/etc/influxdb/influxdb.conf \
|
||||
--log-path=/var/log/influxdb/upgrade.log \
|
||||
--continuous-query-export-path=/var/lib/influxdb/continuous_queries.txt \
|
||||
--v2-config-path=${INFLUXD_CONFIG_PATH} \
|
||||
-m $INFLUXD_BOLT_PATH -e $INFLUXD_ENGINE_PATH
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
|
||||
cat << EOF
|
||||
|
||||
The upgrade completed successfully. Execute the following to start InfluxDB:
|
||||
|
||||
sudo systemctl start influxdb
|
||||
|
||||
A complete copy of v1 data was created as part of the upgrade process.
|
||||
After confirming v2 is functioning as intended, removal of v1 data can be
|
||||
performed by executing:
|
||||
|
||||
sudo /var/tmp/influxdbv1-remove.sh
|
||||
|
||||
NOTE: This script will erase all previous v1 data and config files!
|
||||
|
||||
EOF
|
||||
|
||||
cat << EOF > /var/tmp/influxdbv1-remove.sh
|
||||
#!/bin/bash
|
||||
sudo rm -f /etc/influxdb/influxdb.conf
|
||||
sudo rm -rf /var/lib/influxdb/data
|
||||
sudo rm -rf /var/lib/influxdb/wal
|
||||
sudo rm -rf /var/lib/influxdb/meta
|
||||
EOF
|
||||
sudo chmod +x /var/tmp/influxdbv1-remove.sh
|
||||
|
||||
sudo cp /root/.influxdbv2/configs /var/lib/influxdb
|
||||
sudo chown influxdb:influxdb /var/lib/influxdb/influxd.bolt /var/lib/influxdb/configs
|
||||
sudo chown -R influxdb:influxdb /var/lib/influxdb/engine
|
||||
|
||||
else
|
||||
|
||||
cat << EOF
|
||||
|
||||
The upgrade encountered an error. Please review the
|
||||
/var/log/influxdb/upgrade.log file for more information. Before attempting
|
||||
another upgrade, removal of v2 data should be performed by executing:
|
||||
|
||||
sudo /var/tmp/influxdbv2-remove.sh
|
||||
|
||||
NOTE: This script will erase all previous v2 data and config files!
|
||||
|
||||
EOF
|
||||
|
||||
cat << EOF > /var/tmp/influxdbv2-remove.sh
|
||||
#!/bin/bash
|
||||
sudo rm -f /etc/influxdb/config.toml /var/lib/influxdb/influxd.bolt
|
||||
sudo rm -f /var/lib/influxdb/configs /root/.influxdbv2/configs
|
||||
sudo rm -f /var/lib/influxdb/continuous_queries.txt
|
||||
sudo rm -rf /var/lib/influxdb/engine
|
||||
EOF
|
||||
sudo chmod +x /var/tmp/influxdbv2-remove.sh
|
||||
|
||||
fi
|
|
@ -5,6 +5,7 @@ DATA_DIR=/var/lib/influxdb
|
|||
LOG_DIR=/var/log/influxdb
|
||||
SCRIPT_DIR=/usr/lib/influxdb/scripts
|
||||
LOGROTATE_DIR=/etc/logrotate.d
|
||||
INFLUXD_CONFIG_PATH=/etc/influxdb/config.toml
|
||||
|
||||
function install_init {
|
||||
cp -f $SCRIPT_DIR/init.sh /etc/init.d/influxdb
|
||||
|
@ -24,9 +25,39 @@ function install_chkconfig {
|
|||
chkconfig --add influxdb
|
||||
}
|
||||
|
||||
function upgrade_notice {
|
||||
cat << EOF
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
! Important 1.x to 2.x Upgrade Notice !
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
Thank you for installing InfluxDB v2. Due to significant changes between
|
||||
the v1 and v2 versions, upgrading to v2 requires additional steps. If
|
||||
upgrading to v2 was not intended, simply re-install the v1 package now.
|
||||
|
||||
An upgrade helper script is available that should be reviewed and executed
|
||||
prior to starting the influxdb systemd service. In order to start the v2
|
||||
upgrade, execute the following:
|
||||
|
||||
sudo /usr/share/influxdb/influxdb2-upgrade.sh
|
||||
|
||||
Visit our website for complete details on the v1 to v2 upgrade process:
|
||||
https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/
|
||||
|
||||
For new or upgrade installations, please review the getting started guide:
|
||||
https://docs.influxdata.com/influxdb/v2.0/get-started/
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# Add defaults file, if it doesn't exist
|
||||
if [[ ! -f /etc/default/influxdb ]]; then
|
||||
touch /etc/default/influxdb
|
||||
if [[ ! -s /etc/default/influxdb2 ]]; then
|
||||
cat << EOF > /etc/default/influxdb2
|
||||
INFLUXD_CONFIG_PATH=/etc/influxdb/config.toml
|
||||
INFLUXD_BOLT_PATH=/var/lib/influxdb/influxd.bolt
|
||||
INFLUXD_ENGINE_PATH=/var/lib/influxdb/engine
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Remove legacy symlink, if it exists
|
||||
|
@ -73,27 +104,14 @@ elif [[ -f /etc/os-release ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Upgrade notice
|
||||
cat << EOF
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
! Important 1.x to 2.x Upgrade Notice !
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
# Check upgrade status
|
||||
bolt_dir="/root/.influxdbv2 /var/lib/influxdb/.influxdbv2 /var/lib/influxdb"
|
||||
for bolt in $bolt_dir
|
||||
do
|
||||
if [[ -s ${bolt}/influxd.bolt ]]; then
|
||||
# Found a bolt file, assume previous v2 upgrade
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
Thank you for installing InfluxDB v2. Due to significant changes between
|
||||
the v1 and v2 versions, upgrading to v2 requires additional steps. If
|
||||
upgrading to v2 was not intended, please simply re-install the v1 package now.
|
||||
|
||||
Please review the complete upgrade procedure:
|
||||
|
||||
https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/
|
||||
|
||||
Minimally, the following steps will be necessary:
|
||||
|
||||
* Make a copy of all underlying v1 data (typically under /var/lib/influxdb)
|
||||
* Run the 'influxd upgrade' command
|
||||
* Follow the prompts to complete the upgrade process
|
||||
|
||||
For new or upgrade installations, please also review the getting started guide:
|
||||
|
||||
https://docs.influxdata.com/influxdb/v2.0/get-started/
|
||||
EOF
|
||||
upgrade_notice
|
||||
|
|
Loading…
Reference in New Issue