PRECHECKS
# vsh status => Check all Running
# nodetool status => Check all UN
# cli >show system package-info => 16.1R2S6 or above, You need to have these nodes running S6 for DSE upgrade to work.
# df -h => Verify enough disk is present
# free -h => Verify enough memory is present
# Pre check DSE version confirmation Operation at : All server in the Analytics cluster # dse -v =>4.5.2
# Configuration backup , Operation at :All server in the Analytics cluster # cd /opt/versa/scripts/van-scripts => # cp -pi vansetup.conf vansetup.conf.YYYYMMDD
# Go to vi /opt/versa/scripts/van-scripts/vansetup.conf and note down the management (rpc address) and internal address , also cluster name from each node.
# Match cluster name in vansetup.conf with vi /etc/dse/cassandra/cassandra.yaml
UPGRADE PROCEDURE
# The DB upgrade tar and scripts can be downloaded from one of the below links:
https://versanetworks.app.box.com/s/l74eyfgjq82ml41t28nw6xf1q97ezc49
or
https://upload.versa-networks.com/index.php/s/arOb4fNbVd9N7qE
# Transfer tar file to Director> scp dse_migration.tar versa@<ipaddr>:/var/tmp/
# Transfer tar file to Search nodes=> scp dse_migration.tar versa@<ipaddr>:/var/tmp/
# Extract tar file ,Operation at : Director => # cd /var/tmp # tar xvf dse_migration.tar
# Extract tar file, Operation at: search nodes =># cd /var/tmp # tar xvf dse_migration.tar
# Export Alarm Logs, Operation at: Search nodes
First export the alarm logs before dse upgrade:
The raw logs are not going to be lost. Only data stored in search engine is going to be truncated as the upgrade does not support some solr schema which was present in DSE 4.5. We can recover the alarm data as the volume is not typically high. We can upgrade to 4.8. It would require us to drop the search node data. Analytics (historical) data will not be impacted.
The export & import scripts are present in the package downloaded from Box under ‘analytics_backup_scripts’.
Exporting the data: only from search nodes
cd dse_upgrade
Exporting the data:
# cd /var/tmp/dse_migration/analytics_backup_scripts
# mkdir -p /var/tmp/dse_migration/alarm_backup
sudo python vandb-export.py -o <location-to-export> -d search -f alarmLog -v E -s <#-of-days>30daysAgo
(for #-of-days you can set it to 30; most customers accepted 30 days of data)
sudo python vandb-export.py -o /var/tmp/dse_migration/alarm_backup -d search -f alarmLog -v E -s 30daysAgo
--------------
Check Alarm log is properly exported.
Then
versa@versa-analytics:~$ cd dse_migration/
# versa@versa-analytics:~/dse_migration$ sudo ./scrub.sh /alarm_backup /*.csv
Or
# Cd /var/tmp/dse_migration/alarm_backup
# sudo ./scrub.sh <exportfile (csv file name)>
----------------------
# Create dse_migration file : Operation at : Director
Update the dse_migration.conf with the right information (example shown below)
cd /var/tmp/dse_migration
vi dse_migration.conf
(Configuration example)
---Start---
[CLUSTER_CONFIG]
search_node_count: 2
analytics_node_count: 2
cluster_name: VAN_CLUSTER
[ANALYTICS_NODE_1]
management: 10.192.84.112
internal: 192.168.1.10
username: versa
[ANALYTICS_NODE_2]
management: 10.192.84.113
internal: 192.168.1.11
username: versa
[SEARCH_NODE_1]
management: 10.192.84.114
internal: 192.168.1.12
username: versa
[SEARCH_NODE_2]
management: 10.192.84.115
internal: 192.168.1.13
username: versa
---end---
Populate the fields with management and internal IP addresses and the cluster name that you have collected from vansetup.conf ( of each node of cluster)
*cluster_name needs to be same as existing cluster name
**management is vansetup.conf rpc_address, eth1/Northbound IP address
# Run the dse_upgrade.py script using below command
Sudo ./ upgrade_dse.py
*If it fails to execute with sudo, and displays the below error please execute directly ./upgrade_dse.py
Error: Unable to establish SSH connection with <Analaytics_Node>
It asks for password, which is the SSH password of each of the nodes.
Typically, versa123 for user versa.
It also asks for confirmation to proceed, where you enter ‘y’.
*Approximately time take to complete upgrade_dse.py will be 30 minutes or so (This time is from our track record and this will be service impacting).
Message "DSE upgraded" should be displayed on Analytics and Search nodes
POST CHECKS
Operation at: All server in the Analytics cluste
# dse -v
4.8.16 => the nodes must reflect this version.
Or
versa@vanalytics1:/opt/versa/scripts/van-scripts$ cqlsh
Connected to VAN1 at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 2.1.19.1484 | DSE 4.8.16 | CQL spec 3.2.1 | Native protocol v3]
Use HELP for help.
Then sudo reboot on each not (recommended, not mandatory)
# Import Alarm Logs: Operation at search nodes
# cd /var/tmp/dse_migration/analytics_backup_scripts
sudo python vandb-import-alarm.py -o /var/tmp/dse_migration /alarm_backup
/usr/local/lib/python2.7/dist-packages/cassandra_driver-2.1.3.post-py2.7-linux-x86_64.egg/cassandra/util.py:360: UserWarning: The blist library is not available, so a pure python list-based set will be used in place of blist.sortedset for set collection values. You can find the blist library here: https://pypi.python.org/pypi/blist/
Connecting...
1 file(s) found, importing...
Importing vsnlog-1.csv...
Insert alarmLog complete [time=131.224 sec]
Number of logs inserted: 12296
versa@versa-analytics:~/dse_migration$
*Above is applied to csv file in the target directly
Check whether import data properly displays in GUI
# Configure vandb-repair
Operation at: All server in the Analytics cluster
# sudo /opt/versa/scripts/van-scripts/vandb-repair-start daily
# ls -la /etc/cron.d/vandb-repair
Check whether file exists or not.
#Post-check status
Operation at: All server in the Analytics cluster
# vsh status
Check all Running
# nodetool status
Check all UN
# df -h
# free -h