Network Server fails to get created when adding OpenStack cloud

Hello,

Just sharing a customer use case.

They have added multiple OpenStack clouds in the Morpheus HA appliance and all of them failed to create a NetworkServer (referred to as Network Mode on the cloud settings). After enabling debug on class AbstractOpenStackComputeService, we could see the below errors with failing to save the NetworkServer when the cloud was initialized.

2024-03-27_02:01:04.65130 ''[2024-03-27 02:01:04,736] [appJobHigh-20] [1;31mERROR[0;39m [36mo.h.e.j.s.SqlExceptionHelper[0;39m - Field 'uuid' doesn't have a default value 
2024-03-27_02:01:04.73615 ''[2024-03-27 02:01:04,736] [appJobHigh-20] [1;31mERROR[0;39m [36mc.m.n.NeutronNetworkService[0;39m - error initializing zone services: org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not execute statement; SQL [n/a]; Field 'uuid' doesn't have a default value; nested exception is java.sql.SQLException: Field 'uuid' doesn't have a default value 
2024-03-27_02:01:04.73671 'org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not execute statement; SQL [n/a]; Field 'uuid' doesn't have a default value; nested exception is java.sql.SQLException: Field 'uuid' doesn't have a default value

The issue was that an upgrade was performed from 6.2.x to 6.3.x and then rolled back to 6.2.7 without rolling back the DB, which led to inconsistent DB schemas that caused this issue.

The reason was that uuid field was added for the network_server table in the database in 6.3.x (Screen Shot 2024-03-27 at 12.46.55 pm.png - Droplr) which doesn’t exist in 6.2.x (Screen Shot on 2024-03-27 at 12-44-29 pm.png - Droplr)

All the clouds that were added after the rollback, failed to create the NetworkServer as it was getting a null value for the uuid which cannot be null and that could be seen in the debug logs.

After upgrading to 7.0.0, and then doing an edit and saving changes on all the problematic clouds, it created and associated the network modes as expected.

Thanks
Deepti