Harq’ al’Ada

I have been listening and reading all sorts of proposals on what Greece needs so that it can recover from its endemic recession. Many politicians and economics scientists, including the notorious Varoufakis, propose this recipe and that playbook that has worked in the past in this country or that region.

Quite frankly everything is going to fail for a single reason: Greece refuses to change the habits that are pushing towards the same fate as Atlantis. The country is rife with cronyism and sub educated supernumerary public sector employees to point out the most glaring problems.

What Greece needs is what the venerated Frank Herbert wrote throughout his work: the “Harq al’Ada”: the breaking of the habit. It is the same meme that Marvin Minsky denotes when he says: “Try to surprise yourself by the way you think today”. The old ways and the stale ancestor worshiping must end.

All that we Greeks knew, all that we know, is useless. We have to adapt or we will be overcome by our very own deficiencies  that is the gist of the 20th century and we are already treading water in the 21st. Adapting means changing fundamentally, in habits as well as values and I am calling on all intelligent people to get involved or Atlantis will no longer by an ancient myth.

Advertisements

Running ansible-playbook on a bastion host

Running ansible playbooks against AWS servers can be glacially slow because of the many SSH connections, even when using Bilbie’s recipe for an ssh proxy setup. What follows is a code snippet that replaces the local ansible-playbook command with a bash function that calls a remote script Run_ansible.sh. Run_ansible in turn massages the parameters in an edible-format creates a temp bash script and launches it.

Time savings for a largish deployment: down to 24 mins from 1hr 58Mins with exactly the same scripts!

Note: ansible-ssh-host is used in the inventory to denote the final target system


# if just local
ANSIBLE_PLAYBOOK=ansible-playbook

#
# Running the playbooks on the jump box
#
if [[ "$USE_JUMPBOX" == true ]]; then
    if [[ -n "$ANSIBLE_SSH_HOST" ]] && [[ -n "$JUMP_USER" ]] && [[ -n "$JUMP_BOX" ]]; then
        extra_vars=ansible_ssh_host=${ANSIBLE_SSH_HOST}

        # Now we need to pass parameters to the jump box
        ANSIBLE_PLAYBOOK=remote_ansible

        # massage the remote env
        # copy the playbooks over   
        ssh ${JUMP_USER}@${JUMP_BOX}  mkdir -p /tmp/deployment-ansible
        rsync -avuh --delete $WORKSPACE/ansible  ${JUMP_USER}@${JUMP_BOX}:/tmp/deployment-ansible/
        # copy the dispatcher script
        scp $WORKSPACE/Run_ansible.sh  ${JUMP_USER}@${JUMP_BOX}:
    else
        echo "ANSIBLE_SSH_HOST,JUMP_USER,JUMP_BOX must be set when USE_JUMPBOX is true" exit 1
    fi
fi
# --extra-vars must be the last parameter to ansible-playbook 
# or this hack will not work
function remote_ansible {
 ssh -t ${JUMP_USER}@${JUMP_BOX} /bin/bash -l ./Run_ansible.sh -vvv $@
}

And the helper script that runs on the bastion host. People with experience in quoting quotes over BASH driver SSH scripts will nod in understanding.


cat Run_ansible.sh
#/bin/bash

# quoting across SSH is a nightmare
params="$@"

params=`echo $params | sed -e "s/extra-vars/extra-vars \"/g"`
params="$params\""

echo "cd /tmp/deployment-ansible/ansible" > t
echo "ansible-playbook $params" >> t
bash t

Backup woes

Dirvish is a relatively nice disk backup program for linux and under certain conditions windows too. Unfortunately it likes to default to SSH to do the file transfers. It is not its fault directly because it is using RSYNC and RSYNC likes to use RSH/SSH unless one tweaks it.

But how do you actually tweak dirvish to use a native rsync protocol, that is without SSH as transport and without altering the code ? It only took me 1/2 a day to find out. Here is how

In every vault’s default.conf file there is the tree: line that specifies the top level the backup should start with. Plug there the rsync server’s module name prepended by colon like so

tree: :root

And of course you have to make sure that the rsync server contains a [root] stanza.

Done.

Δεν ελπιζω τιποτα ουτε και ειμαι λεφτερος

Ειμαι ενας πολίτης Β’ κατηγορίας που ζεί σε μια σχιζοειδή χώρα με Ανατολίτικες παραδόσεις αλλά Δυτική κουλτούρα. Β’ κατηγορίας γιατί δουλεύω ως κύνας ενώ ο πολίτης Α’ κατηγορίας που σκύβει το κεφάλι του στο εκάστοτε κόμμα πάντα έχει μια καβάντζα. Δεν είμαι λέφτερος γιατί η μία κυβέρνηση της Δεξιας αφησε εντελώς ανεξέλεγκτο το μεγάλο κεφάλαιο ενώ η άλλη κυβέρνηση της Αριστεράς άφησε ανεξέλεγκτους τους παρασιτο-συνδικαλιστές.

Δεν φταίει ο Συριζα ουτε η ΝΔ ουτε το ΠΑΣΟΚ. Φταίμε όλοι όσοι ανεχτήκαμε να βλέπουμε πολιτικάντηδες να τρώμε δίπλα μας και να μην τους μπουγελωνουμε με τη γαριδομακαρανόδα τους. Αλλά που να τους φτάσεις, ντουζίνες παρατρεχάμενοι και γλύφτες τους προστατεύουν.

Φταίμε όλοι εμείς που αντί των δυτικών παραδόσεων της αριστείας νοιώθουμε καλύτερα με τις ανατολίτικες παραδόσεις της οικογενειοκρατίας ακόμη και σε ιδρύματα όπως τα πανεπιστήμια. Πληρώνω τους φόρους για το γυιο/κορη του εκάστοτε καθηγητή να κάνει το παιδί του καθηγητή, αλλά ο γείτονας μου κολλάει στην τηλεόραση όταν εκθειάζεται κάποια τέτοια δυναστία στην TV λές και το δεν είναι και το δικό του παιδί που έχει αποκλειστεί απο την θέση αυτήν.

Φταίμε όλοι εμείς γιατί δεν μαστιγώνουμε τους δημοτικούς υπαλλήλους εκ’ δεξιών και ευωνύμων όταν τους βλέπουμε να λιάζονται εν ώρα εργασίας εν είδη αραβικής ευδαιμονίας καθώς η χώρα φλέγεται τριγύρω τους.

Δεν ελπίζω σε τίποτα, φοβάμαι για το παιδί μου, και το δικό σας.

Debugging

Staring at one’s code should be considered one of the most obscure and low yield methods of debugging computer programs. Furthermore it should considered downright dangerous to the tender psyche of programmers, especially when particularly virulent snippets of code stare back with vengeance,mayhem and just plain malevolence clearly observable in their glyphs.

Troglodytes vs Spacemen

There is a little urban legend that when the Americans went to space they invested $1M to create a space pen whereas the Soviets used pencils, because simplicity is best!

Apart from the fallacy of the premise because sharpening a carbon based pencil within very sensitive electrical equipment is more or less a recipe for disaster, there is another very important reason why I do not buy the simplicity clause.

The Americans and through immigration to the USA the whole world, are dreamers. They dreamt of a new frontier to explore, new science to be imagined and new technology to be had. On the other hand the Soviet mentality has never been the exploration of new frontiers. It has been the establishment of a new world order via a degenerative downward spiral to cave dwelling times. That is why it was the troglodytes’ pencil vs the spacemen’s pen.

Garbage dumps

Amazon created the disposable computing paradigm.

Start ups latched on to it only to showcase the disposable enterprise paradigm fueled by disposable funds of various investors.

Much like the disposable razors or diapers, they are thrown away after very little use.

This whole new paradigm of business is very disposable, it smells like garbage!

OpenStack

My openstack experience from two years ago can be summarized in the following bullets:

  • openStack tries too hard to be Amazon compatible with all the bad legacy that issue brings with it
  • No easy way for windows support. The low level disk emulation driver required XP to jump through hoops. I hate to think what may happen with window 7,8 etc.
  • Notoriously undocumented and difficult to set up. I am a 20 year linux veteran with extensive low level programming knowledge and I only managed to set up my toy cluster in about four days. Imagine an enterprise support team trying to pull that off.
  • Tech support ! yeah right, all the companies supporting openstack are pumping money into development. Only a tiny handful are actually operating it with heroic devops teams!
  • No real economies of scale. Nodes MUST have a lot of local storage and images are shuffled through the net quite often. It only makes sense when using cheap SATA drives, but that does not funk well at enterprise grade data centers.
  • All in all it plays the role of disposable computing so well that it is, well, disposable

Regression Testing woes

In one sentence:

Regression testing, albeit assumed to be an engineering endeavour, more readily resembles the dark rituals involving an occasional sacrifice or two that are performed by self flagellating half mad covens under a pale moon.

Linux administrators’ Expertise Levels

This is my list of levels of expertise in systems’ engineering, linux/unix administration and generally in the field of IT where I happen to make my living. Take with a pinch of salt and a shot of tequila.

  • Tinkerers do not care about downtime, they will watch a movie instead.
  • Amateurs think that by moving to AWS they will have no downtime.
  • Beginners can handle downtime with a dash of panic.
  • Seasoned Engineers handle downtime just fine.
  • Experts have a gut feeling for it and when it will happen.
  • Masters can tell you what will fail why and when, before you even realize there is a problem.
  • Zen Grand Masters avoid all this _sh.t_ completely and opt for a beach instead.

Oddly enough tinkerers and Zen masters follow the same path and the term Expert does not appear in the original Hacker’s Dictionary .