Skip to content

Commit f8a31b0

Browse files
authored
Merge pull request #2211 from apache/debian9-systemvmtemplate
CLOUDSTACK-10013: Migrate systemvmtemplate to Debian9 Signed-off-by: Rohit Yadav <rohit@apache.org>
2 parents a7b233c + d19629a commit f8a31b0

File tree

440 files changed

+6171
-13047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+6171
-13047
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,5 @@ systemvm/.pydevproject
9797
test/.pydevprojec
9898
plugins/hypervisors/kvm/.pydevproject
9999
scripts/.pydevproject
100+
*.qcow2
101+
*.raw

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ env:
5050
smoke/test_hostha_simulator
5151
smoke/test_host_annotations
5252
smoke/test_host_maintenance
53-
smoke/test_hosts
5453
smoke/test_internal_lb
5554
smoke/test_iso
5655
smoke/test_list_ids_parameter
@@ -116,8 +115,7 @@ env:
116115
component/test_acl_sharednetwork_deployVM-impersonation
117116
component/test_affinity_groups_projects
118117
component/test_cpu_domain_limits
119-
component/test_cpu_limits
120-
component/test_volumes"
118+
component/test_cpu_limits"
121119

122120
- TESTS="component/test_cpu_max_limits
123121
component/test_acl_isolatednetwork
@@ -145,10 +143,12 @@ env:
145143
component/test_snapshots
146144
component/test_stopped_vm"
147145

148-
- TESTS="component/test_resource_limits
149-
component/test_tags
146+
- TESTS="component/test_resource_limits"
147+
148+
- TESTS="component/test_tags
150149
component/test_templates
151-
component/test_update_vm"
150+
component/test_update_vm
151+
component/test_volumes"
152152

153153
- TESTS="component/test_vpc
154154
component/test_vpc_network

LICENSE

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -208,22 +208,22 @@ Within the console-proxy/js directory
208208
jquery.js
209209

210210

211-
Within the patches/systemvm/debian/config/etc directory
211+
Within the systemvm/debian/etc directory
212212
placed in the public domain
213213
by Adiscon GmbH http://www.adiscon.com/
214214
rsyslog.conf
215215
by Simon Kelley
216216
dnsmasq.conf
217217
vpcdnsmasq.conf
218218

219-
Within the patches/systemvm/debian/config/etc/apache2 directory
219+
Within the systemvm/debian/etc/apache2 directory
220220
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
221221
Copyright (c) 2012 The Apache Software Foundation
222222
from The Apache Software Foundation http://www.apache.org/
223223
httpd.conf
224224
vhost.template
225225

226-
Within the patches/systemvm/debian/config/etc/ssh/ directory
226+
Within the systemvm/debian/etc/ssh/ directory
227227
licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows)
228228

229229

@@ -254,7 +254,7 @@ Within the patches/systemvm/debian/config/etc/ssh/ directory
254254
from OpenSSH Project http://www.openssh.org/
255255
sshd_config
256256

257-
Within the patches/systemvm/debian/config/root/redundant_router directory
257+
Within the systemvm/debian/root/redundant_router directory
258258
placed in the public domain
259259
by The netfilter.org project http://www.netfilter.org/
260260
conntrackd.conf.templ
@@ -271,65 +271,6 @@ Within the scripts/vm/hypervisor/xenserver directory
271271
from OpenStack, LLC http://www.openstack.org
272272
swift
273273

274-
Within the tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64} directory
275-
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
276-
277-
Copyright (c) 2010-2012 Patrick Debois
278-
279-
Permission is hereby granted, free of charge, to any person obtaining
280-
a copy of this software and associated documentation files (the
281-
"Software"), to deal in the Software without restriction, including
282-
without limitation the rights to use, copy, modify, merge, publish,
283-
distribute, sublicense, and/or sell copies of the Software, and to
284-
permit persons to whom the Software is furnished to do so, subject to
285-
the following conditions:
286-
287-
The above copyright notice and this permission notice shall be
288-
included in all copies or substantial portions of the Software.
289-
290-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
291-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
292-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
293-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
294-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
295-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
296-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
297-
298-
from Patrick Debois http://www.jedi.be/blog/
299-
base.sh from https://github.com/jedi4ever/veewee
300-
cleanup.sh from https://github.com/jedi4ever/veewee
301-
definition.rb from https://github.com/jedi4ever/veewee
302-
preseed.cfg from https://github.com/jedi4ever/veewee
303-
zerodisk.sh from https://github.com/jedi4ever/veewee
304-
305-
Within the tools/devcloud/src/deps/boxes/basebox-build directory
306-
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
307-
308-
Copyright (c) 2010-2012 Patrick Debois
309-
310-
Permission is hereby granted, free of charge, to any person obtaining
311-
a copy of this software and associated documentation files (the
312-
"Software"), to deal in the Software without restriction, including
313-
without limitation the rights to use, copy, modify, merge, publish,
314-
distribute, sublicense, and/or sell copies of the Software, and to
315-
permit persons to whom the Software is furnished to do so, subject to
316-
the following conditions:
317-
318-
The above copyright notice and this permission notice shall be
319-
included in all copies or substantial portions of the Software.
320-
321-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
322-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
323-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
324-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
325-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
326-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
327-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
328-
329-
from Patrick Debois http://www.jedi.be/blog/
330-
definition.rb from https://github.com/jedi4ever/veewee
331-
preseed.cfg from https://github.com/jedi4ever/veewee
332-
333274
Within the ui/lib directory
334275
placed in the public domain
335276
by Eric Meyer http://meyerweb.com/eric/

agent-simulator/tomcatconf/commands-simulator.properties.in

Lines changed: 0 additions & 21 deletions
This file was deleted.

agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import com.cloud.resource.ServerResource;
6060
import com.cloud.resource.ServerResourceBase;
6161
import com.cloud.utils.NumbersUtil;
62+
import com.cloud.utils.ReflectUtil;
6263
import com.cloud.utils.net.NetUtils;
6364
import com.cloud.utils.script.Script;
6465
import com.google.gson.Gson;
@@ -315,20 +316,19 @@ public String getName() {
315316

316317
private void launchConsoleProxy(final byte[] ksBits, final String ksPassword, final String encryptorPassword) {
317318
final Object resource = this;
319+
s_logger.info("Building class loader for com.cloud.consoleproxy.ConsoleProxy");
320+
final ClassLoader loader = ReflectUtil.getClassLoaderForName("console-proxy");
318321
if (_consoleProxyMain == null) {
322+
s_logger.info("Running com.cloud.consoleproxy.ConsoleProxy with encryptor password=" + encryptorPassword);
319323
_consoleProxyMain = new Thread(new ManagedContextRunnable() {
320324
@Override
321325
protected void runInContext() {
322326
try {
323-
Class<?> consoleProxyClazz = Class.forName("com.cloud.consoleproxy.ConsoleProxy");
327+
Class<?> consoleProxyClazz = loader.loadClass("com.cloud.consoleproxy.ConsoleProxy");
324328
try {
325-
s_logger.info("Invoke setEncryptorPassword(), ecnryptorPassword: " + encryptorPassword);
326-
Method methodSetup = consoleProxyClazz.getMethod("setEncryptorPassword", String.class);
327-
methodSetup.invoke(null, encryptorPassword);
328-
329329
s_logger.info("Invoke startWithContext()");
330-
Method method = consoleProxyClazz.getMethod("startWithContext", Properties.class, Object.class, byte[].class, String.class);
331-
method.invoke(null, _properties, resource, ksBits, ksPassword);
330+
Method method = consoleProxyClazz.getMethod("startWithContext", Properties.class, Object.class, byte[].class, String.class, String.class);
331+
method.invoke(null, _properties, resource, ksBits, ksPassword, encryptorPassword);
332332
} catch (SecurityException e) {
333333
s_logger.error("Unable to launch console proxy due to SecurityException", e);
334334
System.exit(ExitStatus.Error.value());
@@ -357,7 +357,7 @@ protected void runInContext() {
357357
s_logger.info("com.cloud.consoleproxy.ConsoleProxy is already running");
358358

359359
try {
360-
Class<?> consoleProxyClazz = Class.forName("com.cloud.consoleproxy.ConsoleProxy");
360+
Class<?> consoleProxyClazz = loader.loadClass("com.cloud.consoleproxy.ConsoleProxy");
361361
Method methodSetup = consoleProxyClazz.getMethod("setEncryptorPassword", String.class);
362362
methodSetup.invoke(null, encryptorPassword);
363363
} catch (SecurityException e) {

api/src/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ public class ApiConstants {
205205
public static final String OUTOFBANDMANAGEMENT_POWERSTATE = "outofbandmanagementpowerstate";
206206
public static final String OUTOFBANDMANAGEMENT_ENABLED = "outofbandmanagementenabled";
207207
public static final String PARAMS = "params";
208+
public static final String PARENT_ID = "parentid";
208209
public static final String PARENT_DOMAIN_ID = "parentdomainid";
209210
public static final String PASSWORD = "password";
210211
public static final String SHOULD_UPDATE_PASSWORD = "update_passwd_on_host";
@@ -274,6 +275,7 @@ public class ApiConstants {
274275
public static final String SNAPSHOT_QUIESCEVM = "quiescevm";
275276
public static final String SOURCE_ZONE_ID = "sourcezoneid";
276277
public static final String START_DATE = "startdate";
278+
public static final String START_ID = "startid";
277279
public static final String START_IP = "startip";
278280
public static final String START_IPV6 = "startipv6";
279281
public static final String START_PORT = "startport";

api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public class ListEventsCmd extends BaseListProjectAndAccountResourcesCmd {
6565
@Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "the event type (see event types)")
6666
private String type;
6767

68+
@Parameter(name = ApiConstants.START_ID, type = CommandType.UUID, entityType = EventResponse.class, description = "the parent/start ID of the event, when provided this will list all the events with the start/parent ID including the parent event")
69+
private Long startId;
70+
6871
/////////////////////////////////////////////////////
6972
/////////////////// Accessors ///////////////////////
7073
/////////////////////////////////////////////////////
@@ -97,6 +100,10 @@ public String getType() {
97100
return type;
98101
}
99102

103+
public Long getStartId() {
104+
return startId;
105+
}
106+
100107
/////////////////////////////////////////////////////
101108
/////////////// API Implementation///////////////////
102109
/////////////////////////////////////////////////////

api/src/org/apache/cloudstack/api/response/EventResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class EventResponse extends BaseResponse implements ControlledViewEntityR
7878
@Param(description = "the state of the event")
7979
private Event.State state;
8080

81-
@SerializedName("parentid")
81+
@SerializedName(ApiConstants.PARENT_ID)
8282
@Param(description = "whether the event is parented")
8383
private String parentId;
8484

client/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,6 @@
798798
<target>
799799
<copy todir="${basedir}/target/common/vms">
800800
<fileset dir="${basedir}/../systemvm/dist">
801-
<include name="systemvm.zip"/>
802801
<include name="systemvm.iso"/>
803802
</fileset>
804803
</copy>

core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import java.util.Hashtable;
2323
import java.util.LinkedList;
2424
import java.util.List;
25+
import java.util.UUID;
26+
import org.apache.log4j.Logger;
2527

2628
import com.cloud.agent.api.BumpUpPriorityCommand;
2729
import com.cloud.agent.api.SetupGuestNetworkCommand;
@@ -58,6 +60,8 @@
5860

5961
public abstract class AbstractConfigItemFacade {
6062

63+
private static final Logger s_logger = Logger.getLogger(AbstractConfigItemFacade.class);
64+
6165
private final static Gson gson;
6266

6367
private static Hashtable<Class<? extends NetworkElementCommand>, AbstractConfigItemFacade> flyweight = new Hashtable<Class<? extends NetworkElementCommand>, AbstractConfigItemFacade>();
@@ -104,13 +108,26 @@ public static AbstractConfigItemFacade getInstance(final Class<? extends Network
104108
return instance;
105109
}
106110

111+
private static String appendUuidToJsonFiles(final String filename) {
112+
String remoteFileName = new String(filename);
113+
if (remoteFileName.endsWith("json")) {
114+
remoteFileName += "." + UUID.randomUUID().toString();
115+
}
116+
return remoteFileName;
117+
}
118+
107119
protected List<ConfigItem> generateConfigItems(final ConfigBase configuration) {
108120
final List<ConfigItem> cfg = new LinkedList<>();
109121

110-
final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, destinationFile, gson.toJson(configuration));
122+
final String remoteFilename = appendUuidToJsonFiles(destinationFile);
123+
if (s_logger.isDebugEnabled()) {
124+
s_logger.debug("Transformed filename: " + destinationFile + " to: " + remoteFilename);
125+
}
126+
127+
final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, remoteFilename, gson.toJson(configuration));
111128
cfg.add(configFile);
112129

113-
final ConfigItem updateCommand = new ScriptConfigItem(VRScripts.UPDATE_CONFIG, destinationFile);
130+
final ConfigItem updateCommand = new ScriptConfigItem(VRScripts.UPDATE_CONFIG, remoteFilename);
114131
cfg.add(updateCommand);
115132

116133
return cfg;

0 commit comments

Comments
 (0)