TritonDataCenter / sdc-napi

Triton Network API: manages networking-related data
Mozilla Public License 2.0
4 stars 14 forks source link

Sane recovery from corrupted NAPI tables (related to issue #8) #11

Closed pannon closed 9 years ago

pannon commented 9 years ago

After hitting issue #8 is there an easy way to restore the network details back to their original state without diving into moray postgres tables?

I should expand on this a bit more. What is the recommended way to deal with invalid records in Manatee caused by a simple regression?

My current understanding is that one of the following could be done:

I have already experimented with deleting the network and recreating it but instances do not get their network interfaces displayed in the adminui. Unfortunately (was a momentary brain outage) I have dropped the napi_ips_UUID table in Moray when originally deleted the network - I believe this was unnecessary and is the root cause of all my issues.

Any guidance would be appreciated.

Thanks Peter

pannon commented 9 years ago

Just a heads-up. Managed to fix up all network stuff in Manatee.

As I dropped the napi_ips_UUID table by "accident" before I had to remove the interfaces form all affected instances json config (vmadm) and napi_nics.

Then re-create the network and re-add the interfaces - all is back to normal.