aerospike_migrations – Check or wait for migrations between nodes¶
New in version 2.8.
Synopsis¶
- This can be used to check for migrations in a cluster. This makes it easy to do a rolling upgrade/update on Aerospike nodes.
- If waiting for migrations is not desired, simply just poll until port 3000 if available or asinfo -v status returns ok
Parameters¶
Examples¶
# check for migrations on local node
- name: wait for migrations on local node before proceeding
  aerospike_migrations:
    host: "localhost"
    connect_timeout: 2000
    consecutive_good_checks: 5
    sleep_between_checks: 15
    tries_limit: 600
    local_only: False
# example playbook:
---
- name: upgrade aerospike
  hosts: all
  become: true
  serial: 1
  tasks:
    - name: Install dependencies
      apt:
        name:
            - python
            - python-pip
            - python-setuptools
        state: latest
    - name: setup aerospike
      pip:
          name: aerospike
# check for migrations every (sleep_between_checks)
# If at least (consecutive_good_checks) checks come back OK in a row, then return OK.
# Will exit if any exception, which can be caused by bad nodes,
# nodes not returning data, or other reasons.
# Maximum runtime before giving up in this case will be:
# Tries Limit * Sleep Between Checks * delay * retries
    - name: wait for aerospike migrations
      aerospike_migrations:
          local_only: True
          sleep_between_checks: 1
          tries_limit: 5
          consecutive_good_checks: 3
          fail_on_cluster_change: true
          min_cluster_size: 3
          target_cluster_size: 4
      register: migrations_check
      until: migrations_check is succeeded
      changed_when: false
      delay: 60
      retries: 120
    - name: another thing
      shell: |
          echo foo
    - name: reboot
      reboot:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Albert Autin (@Alb0t)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
