Upgrades for DataStax Enterprise 6.7.x and 6.8.x patch releases
Steps for upgrading DataStax Enterprise 6.7 and 6.8 between patch (point) releases.
dse-env.sh
The default location of the dse-env.sh file depends on the type of installation:Package installations | /etc/dse/dse-env.sh |
Tarball installations | installation_location/bin/dse-env.sh |
dse.yaml
The location of the dse.yaml file depends on the type of installation:Package installations | /etc/dse/dse.yaml |
Tarball installations | installation_location/resources/dse/conf/dse.yaml |
DataStax Enterprise and Apache Cassandra™ configuration files
Configuration file | Installer-Services and package installations | Installer-No Services and tarball installations |
---|---|---|
DataStax Enterprise configuration files | ||
dse | /etc/default/dse (systemd) or /etc/init.d/ (SystemV) | N/A. Node type is set via command line flags. |
byoh-env.sh | /etc/dse/byoh-env.sh | install_location/bin/byoh-env.sh |
dse.yaml | /etc/dse/dse.yaml | install_location/resources/dse/conf/dse.yaml |
logback.xml | /etc/dse/cassandra/logback.xml | install_location/resources/logback.xml |
spark-env.sh | /etc/dse/spark/spark-env.sh | install_location/resources/spark/conf/spark-env.sh |
spark-defaults.conf | /etc/dse/spark/spark-defaults.conf | install_location/resources/spark/conf/spark-defaults.conf |
Cassandra configuration files | ||
cassandra.yaml | /etc/dse/cassandra/cassandra.yaml | install_location/conf/cassandra.yaml |
cassandra.in.sh | /usr/share/cassandra/cassandra.in.sh | install_location/bin/cassandra.in.sh |
cassandra-env.sh | /etc/dse/cassandra/cassandra-env.sh | install_location/conf/cassandra-env.sh |
cassandra-rackdc.properties | /etc/dse/cassandra/cassandra-rackdc.properties | install_location/conf/cassandra-rackdc.properties |
cassandra-topology.properties | /etc/dse/cassandra/cassandra-topology.properties | install_location/conf/cassandra-topology.properties |
jmxremote.password | /etc/cassandra/jmxremote.password | install_location/conf/jmxremote.password |
Tomcat server configuration file | ||
server.xml | /etc/dse/resources/tomcat/conf/server.xml | install_location/resources/tomcat/conf/server.xml |
DataStax driver changes
DataStax drivers come in two types:
- DataStax drivers for DataStax Enterprise — for use by DSE 4.8 and later
- DataStax drivers for Apache Cassandra™ — for use by Apache Cassandra™ and DSE 4.7 and earlier
Upgrade order
Upgrade nodes in this order:- In multiple datacenter clusters, upgrade every node in one datacenter before upgrading another datacenter.
- Upgrade the seed nodes within a datacenter first.
- Upgrade nodes in this order:
- DSE Analytics datacenters
- Transactional/DSE Graph datacenters
- DSE Search datacenters
Review this information on upgrading DataStax Enterprise (DSE) between patch (point) releases, such as upgrading from DataStax Enterprise 6.7.3 to 6.7.5.
Back up your existing installation
Always upgrade to the latest version
bin/dse -v current_dse_version
Upgrade SSTables
Version specific notes
timeAllowed
parameter is enabled by default to prevent long running
shard queries, such as complex facets and Boolean queries, from using system resources
after they have timed out from the DSE Search coordinator. For details, see Limiting queries by timeUpgrade restrictions and limitations
General restrictions
- Do not enable new features.
- Do not run nodetool repair.
- During the upgrade, do not bootstrap new nodes or decommission existing nodes.
- Do not issue TRUNCATE or DDL related queries during the upgrade process.
- Do not alter schemas for any workloads.
- Complete the cluster-wide upgrade before the expiration of
gc_grace_seconds
(approximately 13 days) to ensure any repairs complete successfully. - Do not reindex DSE Search nodes.
- If the DSE Performance Service was disabled before the upgrade, do not enable it during the upgrade. See DSE Performance Service: 6.7 | 6.0 | 5.1 | 5.0 | OpsCenter 6.8 | OpsCenter 6.7 | OpsCenter 6.5.
General restrictions
- Do not enable new features.
- Do not run nodetool repair.
- During the upgrade, do not bootstrap new nodes or decommission existing nodes.
- Do not issue TRUNCATE or DDL related queries during the upgrade process.
- Do not alter schemas for any workloads.
- Complete the cluster-wide upgrade before the expiration of
gc_grace_seconds
(approximately 13 days) to ensure any repairs complete successfully. - Do not reindex DSE Search nodes.
- If the DSE Performance Service was disabled before the upgrade, do not enable it during the upgrade. See DSE Performance Service: 6.7 | 6.0 | 5.1 | 5.0 | OpsCenter 6.8 | OpsCenter 6.7 | OpsCenter 6.5.
Restrictions for nodes using security
- Do not change security credentials or permissions until the upgrade is complete on all nodes.
- If you are not already using Kerberos, do not set up Kerberos authentication before upgrading. First upgrade the cluster, and then set up Kerberos.
Preparing to upgrade
Follow these steps to prepare each node for the upgrade:
- Familiarize yourself with the changes and features in the
new release:
- DataStax Enterprise 6.7 release notes | 6.8 release notes.
- General upgrading advice for any version. Be sure to read 6.7 NEWS.txt | 6.8 NEWS.txt all the way back to your current version.
- DataStax Enterprise changes in 6.7 CHANGES.txt | 6.8 CHANGES.txt.
- DataStax driver changes.
- Stop the OpsCenter Repair Service (DSE 6.7) | OpsCenter Repair Service (DSE 6.8) if enabled.
- Before upgrading, be sure that each node has adequate free disk
space. Determine current DSE data disk space usage:
sudo du -sh /var/lib/cassandra/data/ 3.9G /var/lib/cassandra/data/
Determine available disk space:sudo df -hT / Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 ext4 59G 16G 41G 28% /
Important: The required space depends on the compaction strategy. See Disk space - Run nodetool repair (6.7) | nodetool repair (6.8) to ensure that data on each
replica is consistent with data on other
nodes:
nodetool repair -pr
- DSE Search nodes: Ensure that the
catalina.properties and context.xml files
are present in the Tomcat conf dir. DSE will not start
after upgrade if these files are missing. The default location of the Tomcat
conf directory depends on the type of installation:
- Package installations: /etc/dse/tomcat/conf
- Tarball installations: installation_location/resources/tomcat/conf
- Back up any customized
configuration files since they may be overwritten with
default values during installation of the new version. Tip: If you backed up your installation using instructions in Backing up and restoring DSE, your original configuration files are included in the archive.
- Upgrade the SSTables on each node to ensure that all
SSTables are on the current version:
nodetool upgradesstables
Warning: Failure to upgrade SSTables when required results in a significant performance impact and increased disk usage.Tip: Use the--jobs
option to set the number of SSTables that upgrade simultaneously. The default setting is 2, which minimizes impact on the cluster. Set to 0 to use all available compaction threads. DataStax recommends running theupgradesstables
command on one node at a time or when using racks, one rack at a time.If the SSTables are already on the current version, the command returns immediately and no action is taken.
Upgrade steps
- DSE Analytics nodes only: Kill all Spark worker
processes:
for pid in $(jps | grep Worker | awk '{print $1}'); do kill -9 $pid; done
- Flush the commit log of the current
installation:
nodetool drain
- Stop the node:
- Package
installations:
sudo service dse stop
- Tarball
installations:
installation_dir/bin/dse cassandra-stop
- Package
installations:
- Use the appropriate method to install the new product version on a
supported platform:
- Package installer using YUM (6.7) | Package installer using YUM (6.8)
- Package installer using APT (6.7) | Package installer using APT (6.8)
- Binary tarball installer (6.7) | Binary tarball installer (6.8)
Warning: Install the new product version using the same installation type that is on the system, otherwise problems might result. -
Compare changes in the new configuration files with the backup configuration files after the upgrade but before restarting, remove deprecated settings, and update any new settings if required.Tip: Use the DSE yaml_diff tool (6.7) | yaml_diff tool (6.8) to compare backup YAML files with the upgraded YAML files:
cd /usr/share/dse/tools/yamls
./yaml_diff path/to/yaml-file-old path/to/yaml-file-new ... CHANGES ========= authenticator: - AllowAllAuthenticator + com.datastax.bdp.cassandra.auth.DseAuthenticator authorizer: - AllowAllAuthorizer + com.datastax.bdp.cassandra.auth.DseAuthorizer roles_validity_in_ms: - 2000 + 120000 ...
- When upgrading DSE to versions earlier than 5.1.16, 6.0.8, or
6.7.4 inclusive, if any tables are using DSE Tiered Storage, remove all
txn_compaction
log files from second-level tiers and lower. For example, given the following dse.yaml configuration, removetxn_compaction
log files from/mnt2
and/mnt3
directories:tiered_storage_options: strategy1: tiers: - paths: - /mnt1 - paths: - /mnt2 - paths: - /mnt3
The following example removes the files using the find command:
find /mnt2 -name "*_txn_compaction_*.log" -type f -delete && find /mnt3 -name "*_txn_compaction_*.log" -type f -delete
Warning: Failure to complete this step may result in data loss. - Start the node.
- Package installations (6.7) | Package installations
(6.8):
sudo service dse start
- Tarball installations (6.7) | Tarball installations
(6.8):
installation_dir/bin/dse cassandra
- Package installations (6.7) | Package installations
(6.8):
- Verify that the upgraded datacenter names match the
datacenter names in the keyspace schema definition:
- Get the node's datacenter
name:
nodetool status | grep "Datacenter" Datacenter: datacenter-name
- Verify that the node's datacenter name matches the datacenter name for a
keyspace:
cqlsh --execute "DESCRIBE KEYSPACE keyspace-name;" | grep "replication" CREATE KEYSPACE keyspace-name WITH replication = {'class': 'NetworkTopologyStrategy, 'datacenter-name': '3'};
- Get the node's datacenter
name:
- Review the logs for warnings, errors, and
exceptions:
grep -w 'WARNING\|ERROR\|exception' /var/log/cassandra/*.log
Warnings, errors, and exceptions are frequently found in the logs when starting an upgraded node. Some of these log entries are informational to help you execute specific upgrade-related steps. If you find unexpected warnings, errors, or exceptions, contact DataStax Support.Tip: Non standard log locations are configured in dse-env.sh. - Repeat the upgrade process on each node in the cluster following the recommended order.
- If you use the OpsCenter Repair Service, turn on the Repair Service (6.7) | turn on the Repair Service (6.8).
- After the entire cluster upgrade is complete: upgrade
the SSTables on one node at a time or, when using racks, one rack at a time.Warning: Failure to upgrade SSTables when required results in a significant performance impact and increased disk usage and possible data loss. Upgrading is not complete until the SSTables are upgraded.
nodetool upgradesstables
Tip: Use the--jobs
option to set the number of SSTables that upgrade simultaneously. The default setting is 2, which minimizes impact on the cluster. Set to 0 to use all available compaction threads. DataStax recommends running theupgradesstables
command on one node at a time or when using racks, one rack at a time.Important: You can run theupgradesstables
command before all the nodes are upgraded as long as you run the command on only one node at a time or when using racks, one rack at a time. Runningupgradesstables
on too many nodes at once will degrade performance.