main.yml 1.1 KB

12345678910111213141516171819202122232425
  1. ---
  2. - name: Fail if invalid r_etcd_migrate_action provided
  3. fail:
  4. msg: "etcd_migrate role can only be called with 'check', 'migrate', 'configure', 'add_ttls', or 'clean_data'"
  5. when: r_etcd_migrate_action not in ['check', 'migrate', 'configure', 'add_ttls', 'clean_data']
  6. - name: Include main action task file
  7. include: "{{ r_etcd_migrate_action }}.yml"
  8. # 2. migrate v2 datadir into v3:
  9. # ETCDCTL_API=3 ./etcdctl migrate --data-dir=${data_dir} --no-ttl
  10. # backup the etcd datadir first
  11. # Provide a way for an operator to specify transformer
  12. # 3. re-configure OpenShift master at /etc/origin/master/master-config.yml
  13. # set storage-backend to “etcd3”
  14. # 4. we could leave the master restart to current logic (there is already the code ready (single vs. HA master))
  15. # Run
  16. # etcdctl --cert-file /etc/etcd/peer.crt --key-file /etc/etcd/peer.key --ca-file /etc/etcd/ca.crt --endpoint https://172.16.186.45:2379 cluster-health
  17. # to check the cluster health (from the etcdctl.sh aliases file)
  18. # Another assumption:
  19. # - in order to migrate all etcd v2 data into v3, we need to shut down the cluster (let's verify that on Wednesday meeting)
  20. # -