Monthly Archives: October 2012

qmail maillists and Jira messages delivery issues.

We had interesting issue with jira and qmail.
No mail comes to mail list group.

Not trivial email routing probles, message for mail list comes to ezmlm, but ezmlm rejects messages with tag

Precedence: bulk

Read more »

Mysql How to delete all triggers

I`v got an issue from our development team to dump all triggers from prod db and add them to development db.
It`s trivial, except all triggers deletion. Everyone use magic, procedures, etc.

How to dump only triggers:

/usr/bin/mysqldump --single-transaction  --triggers --routines --no-data  --no-create-db --no-create-info
-u backup -pMEGASECUREPASSWORD
-h dbslave1-1.randomthemes.com database_name > /home/backup/mysql/database_name_triggers.sql

How to delete all triggers:

Fastest way (a little bit hindy 🙂 🙂 but working o.k.): Upload trigger names to file, apply regexp, delete

$mysql -e "SELECT trigger_schema, trigger_name from information_schema.triggers" > ./drop_all_triggers.sql

regexps (use vi, Luke):

:%s/\n/;\r/g
:%s/database_name/DROP TRIGGER IF EXISTS database_name/g
:%s/\t/./g
$mysql mydatabase < ./drop_all_triggers.sql

How to check if zabbix agent insstalled at all infrastructure hosts

We use LXC containers at PH hosts.
containers named like:
rolename$RoleVersion-$InstanceNumber

For example
at host sXX2
appserver1-1
db1-1
db1-2
zabbix3-1

We need to check, if zabbix agents are installed at all infrastructure. One way – user fabric, Luke, as all 80 level DevOps do, or use ssh as all 40 level DevOps do.
Sorry for a little bit 🙂 “hindi” code 🙂 no review was done 🙂
Read more »

How to install unassigned packages ubuntu/debian

We start chef deployment…
Chef deserve additional Huge article, but let`s start:

  echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list
  aptitude update
  aptitude -o Aptitude::CmdLine::Ignore-Trust-Violations=true install opscode-keyring
  aptitude -y -o Aptitude::CmdLine::Ignore-Trust-Violations=true install chef