No Image

Fixing pymssql 2.1.5 from pip to work on CentOS7

26/09/2020 juliogonzalez 0

Updating the tds_fdw Continuous Integration to test CentOS7, I noticed pymsql 2.1.5 could not connect anymore to our Azure SQL Database and all I could get was:

pymssql.OperationalError: (20002, 'DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (instance.database.windows.net)\n')

Enabling TDS debugging revealed that, for some reason, the Azure SQL database just rejected the logging information:

(more…)
No Image

ebs-changer: How to change between EBS volume types (or number of PIOPs) in a fast and reliable way

07/11/2013 juliogonzalez 0

NOTE: ebs-changer is no longer maintained, as is now included into EBS-Tools suite

Did you ever want to change standard EBS to io1 volumes on Amazon Web Services? Maybe io1 to standard? Did you want to increase the number of PIOPs your volumes are using? Did you performed this tedious job by hand?

In my current project (SmartSteps) at Telefonica R&D we needed to to this a lot of times on several environments using MongoDB replicasets and RAID0 on each mongo server.

So each time we needed to stop mongo services (or the instances), snapshot all the volumes, detach, delete old volumes, create new volumes from the snapshots and then reattach them using the same devices. That was more than 15 times the same set of operations.

And of course, it was likely possible to make mistakes in the process.

So, why should we do this by hand when it’s possible to automate and run the changes in parallel? (more…)

No Image

How to check if a database exists on MongoDB

01/05/2013 juliogonzalez 2

Why do you need this?

Just suppose you want to backup a Mongo database using mongodump.

As backups for individual databases don’t support –oplog, you may want to make sure you get a consistent database and therefore you may decide to use fsyncLock() to flush any pending write operation, and to lock new writes until your task is finished (do this only over secondary nodes on replica sets)

But then you launch mongodump against the MongoDB node… and the task keeps waiting for something…

(more…)