Recovering from ‘_nova_to_osvif_vif_binding_failed’

I was showing off my OpenStack dev cluster to a co-worker, and spouting off about how easy and user-proof live-migration is. I challenged him to try it, and he subsequently broke my OpenStack, by trying to live-migrate instances to a compute node targets whose FQDN doesn’t exist (using client CLI commands). Apparently this makes nova sit in a permanent “migration” state (see bug #1643623).

Then, in trying to help solve this embarrassing problem, I reset one of my two controllers (in HA, of course, what could go wrong?). Immediately rabbitmq died on the other (non-rebooted) controller. (Insert second bug report here).

I fixed rabbitmq by manually restarting the containers on both controller nodes, but somehow while I wasn’t looking, I’d ignored database errors, and turned my 3-node Galera cluster into single, non-Primary node, and so I had no working database (luckily I didn’t loose data, since the non-primary node kept running).

After recovering from the Galera fault (mysql -e "SET GLOBAL wsrep_provider_options='pc.bootstrap=yes';"), I found that one of my 3 compute nodes was refusing to start nova-compute. (It’s possible that this actually is where my problems started).

Googling _nova_to_osvif_vif_binding_failed brings up a whole two results, one of which is a RedHat support page, describing a similar issue fixed with a “database massage” (don’t ask). This led me to look into the MySQL nova database, in the instance_info_caches table, where I found the following:

Note the first (working) entry includes a bridge definition: "network": {"bridge": "brq8c6701b4-66",, whereas the second entry (suspiciously including the textmigrating_to) defines "network": {"bridge": null,…

Not experienced, brave, or dumb enough to “massage” the database myself, I just deleted the instance (which fortunately was configured with a persistent volume). I restarted nova-compute on the troublesome compute node, and boom, nova started up properly.

I recreated my deleted instance, attached it to its original volumes, and now all my compute nodes are up again.

So, here’s how I think it went down:

Nova started live-migration, but failed to complete due to co-worker (let’s blame him).

The database’s nova.instance_info_caches table consequently recorded incomplete data for the instance which was being migrated (probably because of me screwing around with the controllers and breaking Galera quorum).

When I tried to restart nova-compute on my compute node, nova polled the database to find its running instances, tried to start an instance based on the incomplete data for the being-migrated node, failed, and so nova-compute died.

When I deleted the instance, the database record for it was removed, allowing nova-compute to start normally

What have I learned?

Monitor all the HA, and check with monitoring before rebooting HA-protected nodes

More than just monitoring processes, monitor the actual function of the processes. This means testing rabbitmq, galera, etc end-to-end (rabbitmq process was actually alive but the logfile recorded it was killed, and the container was stopped)

CLI commands (as opposed to Horizon UI) are powerful and can break stuff which Horizon wouldn’t permit you to break.