~ubuntu-branches/ubuntu/maverick/eucalyptus/maverick

« back to all changes in this revision

Viewing changes to clc/modules/core/src/main/java/com/eucalyptus/util/StorageProperties.java

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2010-07-21 17:27:10 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721172710-7xv07dmdqgivc3t9
Tags: 2.0~bzr1211-0ubuntu1
* New major upstream version merge, 2.0 (r1211).
* debian/patches/:
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
import com.eucalyptus.config.Configuration;
75
75
import com.eucalyptus.config.StorageControllerConfiguration;
76
76
import com.eucalyptus.config.WalrusConfiguration;
 
77
import com.eucalyptus.entities.EntityWrapper;
 
78
import com.eucalyptus.scripting.groovy.GroovyUtil;
 
79
import com.eucalyptus.system.BaseDirectory;
77
80
 
78
81
import edu.ucsb.eucalyptus.util.SystemUtil;
79
82
 
83
86
 
84
87
        public static final String SERVICE_NAME = "StorageController";
85
88
        public static final String SC_LOCAL_NAME = "StorageController-local";
86
 
        public static String NAME = "StorageController" + UUID.randomUUID();
87
 
        public static String SC_ID = SERVICE_NAME + UUID.randomUUID();
88
 
        public static String DB_NAME             = "eucalyptus_storage";
 
89
        public static final String DB_NAME             = "eucalyptus_storage";
89
90
        public static final String EUCALYPTUS_OPERATION = "EucaOperation";
90
91
        public static final String EUCALYPTUS_HEADER = "EucaHeader";
91
 
        public static String storageRootDirectory = BaseDirectory.VAR.toString() + "/volumes";
92
 
        public static String WALRUS_URL = "http://localhost:8773/services/Walrus";
93
 
        public static int MAX_TOTAL_VOLUME_SIZE = 50;
94
 
        public static int MAX_VOLUME_SIZE = 10;
 
92
        public static final String storageRootDirectory = BaseDirectory.VAR.toString() + "/volumes";
95
93
        public static final long GB = 1024*1024*1024;
96
94
        public static final long MB = 1024*1024;
97
95
        public static final long KB = 1024;
98
 
        public static final int TRANSFER_CHUNK_SIZE = 102400;
 
96
        public static final String ETHERD_PREFIX = "/dev/etherd/e";
 
97
        public static final String iface = "eth0";
 
98
        public static final int MAX_TOTAL_VOLUME_SIZE = 50;
 
99
        public static final int MAX_VOLUME_SIZE = 10;
 
100
        public static final int TRANSFER_CHUNK_SIZE = 8192;
 
101
        public static final boolean zeroFillVolumes = false;
 
102
 
99
103
        public static boolean enableSnapshots = false;
100
104
        public static boolean enableStorage = false;
101
105
        public static boolean shouldEnforceUsageLimits = true;
102
 
        public static final String ETHERD_PREFIX = "/dev/etherd/e";
103
 
        public static String iface = "eth0";
104
 
        public static boolean zeroFillVolumes = false;
 
106
        public static String STORE_PREFIX = "iqn.2009-06.com.eucalyptus.";
 
107
        public static String WALRUS_URL = "http://localhost:"+System.getProperty("euca.ws.port")+"/services/Walrus";
 
108
        public static String NAME = "unregistered";
 
109
        public static Integer ISCSI_LUN = 1;
105
110
        public static boolean trackUsageStatistics = true;
106
111
        public static String STORAGE_HOST = "127.0.0.1";
107
112
 
 
113
        static { GroovyUtil.loadConfig("storageprops.groovy"); }
 
114
 
108
115
        public static void updateName() {
109
116
                if(!Component.eucalyptus.isLocal()) {
110
117
                        String scName = System.getProperty("euca.storage.name");
130
137
 
131
138
        public static void updateStorageHost() {
132
139
                try {
133
 
                        StorageControllerConfiguration config = Configuration.getStorageControllerConfiguration(StorageProperties.NAME);
134
 
                        STORAGE_HOST = config.getHostName();
 
140
                        if(!"unregistered".equals(StorageProperties.NAME)) {
 
141
                                StorageControllerConfiguration config = Configuration.getStorageControllerConfiguration(StorageProperties.NAME);
 
142
                                STORAGE_HOST = config.getHostName();
 
143
                        } else {
 
144
                                LOG.info("Storage Controller not registered yet.");
 
145
                        }
135
146
                } catch (EucalyptusCloudException e) {
136
147
                        LOG.error(e);
137
148
                }
165
176
        }
166
177
 
167
178
        public enum StorageParameters {
168
 
                EucaSignature, EucaSnapSize, EucaCert
 
179
                EucaSignature, EucaSnapSize, EucaCert, EucaEffectiveUserId
 
180
        }
 
181
 
 
182
        public static final String EUCA_ROOT_WRAPPER = "/usr/lib/eucalyptus/euca_rootwrap";
 
183
 
 
184
        public static final String blockSize = "1M";
 
185
 
 
186
        public static <T> EntityWrapper<T> getEntityWrapper( ) {
 
187
                return new EntityWrapper<T>( StorageProperties.DB_NAME );
169
188
        }
170
189
}