Page MenuHomeSoftware Heritage

swh-search - upgrade elasticsearch backend
Closed, ResolvedPublic

Description

Upgrade the elasticsearch backends of swh-search to the last available version (7.15.2).

  • ensure all swh-search tests are still green
  • upgrade staging
  • upgrade production

Related Objects

Event Timeline

vsellier triaged this task as Normal priority.Nov 19 2021, 5:01 PM
vsellier created this task.

The staging elasticsearch is migrated to 7.15.2, everything looks good.

production nodes are upgraded :

  • stop the journal clients:
root@search1:~# systemctl stop swh-search-journal-client@indexed
root@search1:~# systemctl stop swh-search-journal-client@objects
  • flush the index to speedup the recovery
curl -XPOST http://search-esnode4:9200/_flush

For each node :

  • disable shard allocation:
cat > /tmp/shard_allocation.json <<EOF
{
  "persistent": {
    "cluster.routing.allocation.enable": "primaries"
  }
}
EOF

curl -H'content-type: application/json' -XPUT http://search-esnode4:9200/_cluster/settings -d @/tmp/shard_allocation.json
  • apply puppet changes
  • reactive the shard allocation:
cat > /tmp/shard_allocation.json <<EOF
{
  "persistent": {
    "cluster.routing.allocation.enable": null
  }
}
EOF

curl -H'content-type: application/json' -XPUT http://search-esnode4:9200/_cluster/settings -d @/tmp/shard_allocation.json
  • wait for the cluster to be green and perform to the next node
  • Restart the journal clients
vsellier moved this task from Backlog to done on the System administration board.