Compare commits
2 Commits
b7b6e6762b
...
f8898f22b4
Author | SHA1 | Date |
---|---|---|
Joshua Boniface | f8898f22b4 | |
Joshua Boniface | d87bce908b |
8
purge.sh
8
purge.sh
|
@ -18,13 +18,13 @@ for host in $@; do
|
||||||
sudo systemctl stop ceph-mon@$(hostname -s);
|
sudo systemctl stop ceph-mon@$(hostname -s);
|
||||||
sudo systemctl stop ceph-mgr@$(hostname -s);
|
sudo systemctl stop ceph-mgr@$(hostname -s);
|
||||||
sudo systemctl stop patroni;
|
sudo systemctl stop patroni;
|
||||||
for key in $( echo "ls /" | sudo /usr/share/zookeeper/bin/zkCli.sh | grep --color=none zookeeper | tr -d "[]," | tr " " "\n" | grep -v zookeeper ); do
|
for key in $( echo "ls /" | sudo /usr/share/zookeeper/bin/zkCli.sh -server $(hostname -s):2181 | grep --color=none zookeeper | tr -d "[]," | tr " " "\n" | grep -v zookeeper ); do
|
||||||
echo "rmr /${key}" | sudo /usr/share/zookeeper/bin/zkCli.sh;
|
echo "rmr /${key}" | sudo /usr/share/zookeeper/bin/zkCli.sh -server $(hostname -s):2181;
|
||||||
done
|
done
|
||||||
sudo systemctl stop zookeeper;
|
sudo systemctl stop zookeeper;
|
||||||
sudo rm -rf /etc/pvc-install.* /etc/ceph* /etc/patroni* /etc/postgres* /etc/zookeeper* /etc/libvirt*;
|
sudo rm -rf /etc/pvc-install.* /etc/ceph* /etc/patroni* /etc/postgres* /etc/zookeeper* /etc/libvirt*;
|
||||||
sudo rm -rf /var/lib/postgresql /var/lib/zookeeper /var/lib/libvirt;
|
sudo rm -rf /var/lib/postgresql /var/lib/zookeeper/* /var/lib/libvirt /var/lib/ceph/*;
|
||||||
suod rm -rf /var/log/postgresql /var/log/zookeeper /var/log/libvirt;
|
suod rm -rf /var/log/postgresql /var/log/zookeeper /var/log/libvirt /var/log/ceph;
|
||||||
sudo rm -rf /run/ceph;
|
sudo rm -rf /run/ceph;
|
||||||
sudo rm -rf /etc/systemd/system/ceph-*.target.wants;
|
sudo rm -rf /etc/systemd/system/ceph-*.target.wants;
|
||||||
sudo apt purge -y *pvc*;
|
sudo apt purge -y *pvc*;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
- patroni
|
- patroni
|
||||||
|
|
||||||
- name: remove any existing patroni keys in Zookeeper
|
- name: remove any existing patroni keys in Zookeeper
|
||||||
command: /usr/share/zookeeper/bin/zkCli.sh rmr /patroni
|
command: /usr/share/zookeeper/bin/zkCli.sh -server $(hostname -s):2181 rmr /patroni
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: start Patroni
|
- name: start Patroni
|
||||||
|
|
|
@ -9,5 +9,5 @@
|
||||||
seconds: 10
|
seconds: 10
|
||||||
|
|
||||||
- name: ensure Zookeeper is running on node1
|
- name: ensure Zookeeper is running on node1
|
||||||
shell: echo "ls /" | /usr/share/zookeeper/bin/zkCli.sh
|
shell: echo "ls /" | /usr/share/zookeeper/bin/zkCli.sh -server $(hostname -s):2181
|
||||||
when: ansible_local.host_id == 1
|
when: ansible_local.host_id == 1
|
||||||
|
|
Loading…
Reference in New Issue