mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug CS-14576: Fail 2.2.14 to 3.0.0 upgrade if encryption is not enabled
status CS-14576: resolved fixed reviewed-by: Nitin
This commit is contained in:
parent
f9528405af
commit
316267f684
@ -28,6 +28,7 @@ import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.utils.crypt.DBEncryptionUtil;
|
||||
import com.cloud.utils.crypt.EncryptionSecretKeyChecker;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.script.Script;
|
||||
@ -62,6 +63,11 @@ public class Upgrade2214to30 implements DbUpgrade {
|
||||
|
||||
@Override
|
||||
public void performDataMigration(Connection conn) {
|
||||
// Fail upgrade if encryption is not enabled
|
||||
if(!EncryptionSecretKeyChecker.useEncryption()){
|
||||
throw new CloudRuntimeException("Encryption is not enabled. Please Run cloud-setup-encryption to enable encryption");
|
||||
}
|
||||
|
||||
// physical network setup
|
||||
setupPhysicalNetworks(conn);
|
||||
// encrypt data
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user