Skip to content

Instantly share code, notes, and snippets.

View ildarmf's full-sized avatar
🌴

Ildar ildarmf

🌴
  • Frankfurt
View GitHub Profile
@morrismukiri
morrismukiri / superset-admin-password-reset.sh
Created January 17, 2019 17:11
Apache Superset reset admin password
# activate the virtualenv
source /home/superset/.virtualenvs/superset/bin/activate
fabmanager reset-password --app superset --username admin --password enteryournewpassword
@voluntas
voluntas / sysctl.conf
Created October 14, 2017 13:07 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2

Running the a playbook to create an EC2 host, I find that there is a race condition for Ansible to be able to connect to the host.

Both wait_for and shell: echo host_is_up (with retry / do..until loop) tasks are not enough to avoid hitting the race condition where Ansible fails to SSH.

Running the play shows that the "Wait for SSH" task completes successfully, and the initial connect for the "Wait up to 10mins for potential cloud-init sshd race condition" task fails completely without retrying as I had expected:

$ export AWS_ACCESS_KEY_ID=ABCDEFGHIJKLMNOPQRST
$ export AWS_ACCESS_KEY=$AWS_ACCESS_KEY_ID
$ export AWS_SECRET_ACCESS_KEY=1234567890abcdefghijklmnopqrstuvwxyzABCD

$ export AWS_SECRET_KEY=$AWS_SECRET_ACCESS_KEY