Skip to content

Commit d6faf7b

Browse files
committed
CLOUDSTACK-3861: Remove s3.enable and swift.enable from global setting.
1 parent bfd32ca commit d6faf7b

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

‎server/src/com/cloud/configuration/Config.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ public enum Config {
149149
// Advanced
150150
JobExpireMinutes("Advanced", ManagementServer.class, String.class, "job.expire.minutes", "1440", "Time (in minutes) for async-jobs to be kept in system", null),
151151
JobCancelThresholdMinutes("Advanced", ManagementServer.class, String.class, "job.cancel.threshold.minutes", "60", "Time (in minutes) for async-jobs to be forcely cancelled if it has been in process for long", null),
152-
SwiftEnable("Advanced", ManagementServer.class, Boolean.class, "swift.enable", "false", "enable swift ", null),
153-
S3Enable("Advanced", ManagementServer.class, Boolean.class, "s3.enable", "false", "enable s3 ", null),
154152
EventPurgeInterval("Advanced", ManagementServer.class, Integer.class, "event.purge.interval", "86400", "The interval (in seconds) to wait before running the event purge thread", null),
155153
AccountCleanupInterval("Advanced", ManagementServer.class, Integer.class, "account.cleanup.interval", "86400", "The interval (in seconds) between cleanup for removed accounts", null),
156154
AllowPublicUserTemplates("Advanced", ManagementServer.class, Integer.class, "allow.public.user.templates", "true", "If false, users will not be able to create public templates.", null, ConfigurationParameterScope.account.toString()),

‎server/src/com/cloud/storage/s3/S3ManagerImpl.java‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import static com.cloud.utils.db.GlobalLock.executeWithNoWaitLock;
3030
import static java.lang.Boolean.TRUE;
3131
import static java.lang.String.format;
32-
import static java.util.Arrays.asList;
3332
import static java.util.Collections.emptyList;
3433
import static java.util.Collections.shuffle;
3534
import static java.util.Collections.singletonList;
@@ -58,7 +57,6 @@
5857
import com.cloud.agent.api.DownloadTemplateFromS3ToSecondaryStorageCommand;
5958
import com.cloud.agent.api.UploadTemplateToS3FromSecondaryStorageCommand;
6059
import com.cloud.agent.api.to.S3TO;
61-
import com.cloud.configuration.Config;
6260
import com.cloud.configuration.dao.ConfigurationDao;
6361
import com.cloud.dc.DataCenterVO;
6462
import com.cloud.dc.dao.DataCenterDao;
@@ -77,7 +75,6 @@
7775
import com.cloud.storage.dao.VMTemplateHostDao;
7876
import com.cloud.storage.dao.VMTemplateS3Dao;
7977
import com.cloud.storage.dao.VMTemplateZoneDao;
80-
import com.cloud.storage.secondary.SecondaryStorageVmManager;
8178
import com.cloud.utils.S3Utils.ClientOptions;
8279
import com.cloud.utils.component.ManagerBase;
8380
import com.cloud.utils.db.Filter;
@@ -258,9 +255,9 @@ public void verifyS3Fields(Map<String, String> params) throws DiscoveryException
258255
params.get(ApiConstants.S3_END_POINT),
259256
params.get(ApiConstants.S3_BUCKET_NAME),
260257
params.get(ApiConstants.S3_HTTPS_FLAG) == null ? false : Boolean.valueOf(params.get(ApiConstants.S3_HTTPS_FLAG)),
261-
params.get(ApiConstants.S3_CONNECTION_TIMEOUT) == null ? null : Integer.valueOf(params.get(ApiConstants.S3_CONNECTION_TIMEOUT)),
262-
params.get(ApiConstants.S3_MAX_ERROR_RETRY) == null ? null : Integer.valueOf(params.get(ApiConstants.S3_MAX_ERROR_RETRY)),
263-
params.get(ApiConstants.S3_SOCKET_TIMEOUT) == null ? null : Integer.valueOf(params.get(ApiConstants.S3_SOCKET_TIMEOUT)), now());
258+
params.get(ApiConstants.S3_CONNECTION_TIMEOUT) == null ? null : Integer.valueOf(params.get(ApiConstants.S3_CONNECTION_TIMEOUT)),
259+
params.get(ApiConstants.S3_MAX_ERROR_RETRY) == null ? null : Integer.valueOf(params.get(ApiConstants.S3_MAX_ERROR_RETRY)),
260+
params.get(ApiConstants.S3_SOCKET_TIMEOUT) == null ? null : Integer.valueOf(params.get(ApiConstants.S3_SOCKET_TIMEOUT)), now());
264261

265262
this.validateFields(s3VO);
266263

@@ -271,8 +268,7 @@ public void verifyS3Fields(Map<String, String> params) throws DiscoveryException
271268

272269
@Override
273270
public boolean isS3Enabled() {
274-
return Boolean
275-
.valueOf(configurationDao.getValue(Config.S3Enable.key()));
271+
return false;
276272
}
277273

278274
@Override

‎setup/db/db/schema-410to420.sql‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ UPDATE `cloud`.`hypervisor_capabilities` SET `storage_motion_supported`=true WHE
3535
UPDATE `cloud`.`hypervisor_capabilities` SET `storage_motion_supported`=true WHERE `hypervisor_type`='VMware' AND `hypervisor_version`='5.0';
3636
DELETE FROM `cloud`.`configuration` where name='vmware.percluster.host.max';
3737
DELETE FROM `cloud`.`configuration` where name='router.template.id';
38+
DELETE FROM `cloud`.`configuration` where name='swift.enable';
39+
DELETE FROM `cloud`.`configuration` where name='s3.enable';
3840
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'AgentManager', 'xen.nics.max', '7', 'Maximum allowed nics for Vms created on Xen');
3941
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 'management-server', 'midonet.apiserver.address', 'http://localhost:8081', 'Specify the address at which the Midonet API server can be contacted (if using Midonet)');
4042
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 'management-server', 'midonet.providerrouter.id', 'd7c5e6a3-e2f4-426b-b728-b7ce6a0448e5', 'Specifies the UUID of the Midonet provider router (if using Midonet)');

0 commit comments

Comments
 (0)