The Case of the Vanishing uRapidFlow License Key

Published: June 14, 2018

Tags:

Recently, I received an email from a client that read something like this…

Subject: URGENT: Feeds not running

Feeds did not run this morning. Pricing is wrong on the website.

HELP!!!!

The website was using a uRapidFlow profile that was run on a cron to regularly import product pricing. Navigating to the profile in the Magento admin panel I got the following error…

A screenshot of the error experienced

Error message: Module record not found: Unirgy_RapidFlow

Here, I’ll document my findings…

Tracking It Back To The License

The error message was vague and didn’t give many clues about what the actual issue was. Rather than dig through the code to try to trace it back, I pasted the error message into my company’s chat to see if anyone else had encountered it before. I quickly heard back that we had, in fact, seen this exact error on another project very recently. We had tracked it back to the license keys mysteriously vanishing at that time, and were in the midst of an investigation to get to the true root cause of the issue.

I navigated to the Manage Licenses screen for uRapidFlow installation and lo and behold the license was in fact missing…

A screenshot of show the license missing

The Temporary Fix - Re-adding the License Key

I was able to track down the license key from our password manager and added it back through the Magento admin panel. I navigated back to the uRapidFlow profile in question and manually forced it to run. It ran with no error message this time. Success :raised_hands:

Tracking Down The Root Cause

Of course we didn’t want to leave things just like that. As mentioned, we were already investigating this on the other website where we had experienced the same thing, and now we had yet another case of the same behavior. The steps we took to investigate were as follows…

  • Contact Unirgy (the company that built and maintains uRapidFlow) to find out if they’d see this behavior on any other projects and knew of a fix
  • Contact the hosting company (both sites were hosted on Magento Commerce Cloud) to receive their assessment
  • Conduct our own review of the issue to understand why this may have happened.

Fortunately, Magento was able to come back with an explanation that made sense.

So What Was The Issue?

The issue turned out to be due to the fact that the uRapidFlow license keys were stored in a MyISAM table.

Magento Cloud uses a Galera cluster with 3 nodes and, per the Galera documentation MyISAM data does not replicate in Galera clusters. What happened here was that the “master” node was cycled, causing the MyISAM data to disappear1.

We contacted Unirgy about this issue and who shortly thereafter published version 2.0.8 of Unirgy_SimpleLicense and Unirgy_SimpleUp with the table definitions changed.

Moving forward we’ll be mindful of this should we see mysterious data disappearance related to any other custom or 3rd party code.

Footnotes

1 . Magento Cloud doesn’t really do multi-master with Galera, but rather does a single master with two cold replicas for failover. Whether or not this architecture is sane is a question for another time and place…

Max Chadwick Hi, I'm Max!

I'm a software developer who mainly works in PHP, but loves dabbling in other languages like Go and Ruby. Technical topics that interest me are monitoring, security and performance. I'm also a stickler for good documentation and clear technical writing.

During the day I lead a team of developers and solve challenging technical problems at Rightpoint where I mainly work with the Magento platform. I've also spoken at a number of events.

In my spare time I blog about tech, work on open source and participate in bug bounty programs.

If you'd like to get in contact, you can find me on Twitter and LinkedIn.