mirror of https://github.com/apache/cloudstack.git
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 Conflicts: server/src/com/cloud/upgrade/dao/Upgrade2214to30.java
This commit is contained in:
parent
147ec455b7
commit
d8539882a9
|
|
@ -28,6 +28,8 @@ 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.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.script.Script;
|
||||
|
||||
|
|
@ -61,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…
Reference in New Issue