Skip to content

Commit bdfb368

Browse files
Fix volume copy from primary to primary in simulator
1 parent 0ca63f3 commit bdfb368

File tree

5 files changed

+16
-24
lines changed

5 files changed

+16
-24
lines changed

client/conf/log4j-cloud.xml.in

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,30 +46,13 @@ under the License.
4646
<PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) (logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
4747
</RollingFile>
4848

49-
<!-- ============================== -->
50-
<!-- Append warnings+ to the syslog if it is listening on UDP port -->
51-
<!-- ============================== -->
52-
53-
<Syslog name="SYSLOG" host="localhost" facility="LOCAL6">
54-
<ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
55-
<PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) (logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
56-
</Syslog>
57-
58-
<!-- ============================== -->
59-
<!-- Append alerts to the syslog if it is configured -->
60-
<!-- ============================== -->
61-
62-
<AlertSyslogAppender name="ALERTSYSLOG" syslogHosts="" facility="LOCAL6">
63-
<ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
64-
<PatternLayout pattern="%d{DEFAULT} %-5p [%c{1.}] (%t:%x) (logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
65-
</AlertSyslogAppender>
49+
<!-- NOTE: SYSLOG (TCP socket) and ALERTSYSLOG removed to avoid outbound TCP syslog writes -->
6650

6751
<!-- ============================== -->
6852
<!-- Append messages to the console -->
6953
<!-- ============================== -->
7054

7155
<Console name="CONSOLE" target="SYSTEM_OUT">
72-
<ThresholdFilter level="OFF" onMatch="ACCEPT" onMismatch="DENY"/>
7356
<PatternLayout pattern="%-5p [%c{1.}] (%t:%x) (logid:%X{logcontextid}) %m%ex{filters(${filters})}%n"/>
7457
</Console>
7558

@@ -112,20 +95,18 @@ under the License.
11295

11396
<Logger name="httpclient.wire" level="INFO"/>
11497

98+
<!-- Keep alert logger but don't send to external syslog socket -->
11599
<Logger name="org.apache.cloudstack.alert" additivity="false" level="WARN">
116-
<AppenderRef ref="SYSLOG"/>
117100
<AppenderRef ref="CONSOLE"/>
118101
<AppenderRef ref="FILE"/>
119102
<AppenderRef ref="SNMP"/>
120-
<AppenderRef ref="ALERTSYSLOG"/>
121103
</Logger>
122104

123105
<!-- ======================= -->
124106
<!-- Setup the Root category -->
125107
<!-- ======================= -->
126108

127-
<Root level="INFO">
128-
<AppenderRef ref="SYSLOG"/>
109+
<Root level="DEBUG">
129110
<AppenderRef ref="CONSOLE"/>
130111
<AppenderRef ref="FILE"/>
131112
</Root>

engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ protected void executeProcedureScripts() {
321321

322322
for (String filePath : filesPathUnderViewsDirectory) {
323323
LOGGER.debug(String.format("Executing PROCEDURE script [%s].", filePath));
324+
if (filePath.startsWith("/")) {
325+
filePath = filePath.substring(1);
326+
}
324327

325328
InputStream viewScript = Thread.currentThread().getContextClassLoader().getResourceAsStream(filePath);
326329
runScript(conn, viewScript);
@@ -433,6 +436,9 @@ protected void executeViewScripts() {
433436

434437
for (String filePath : filesPathUnderViewsDirectory) {
435438
LOGGER.debug(String.format("Executing VIEW script [%s].", filePath));
439+
if (filePath.startsWith("/")) {
440+
filePath = filePath.substring(1);
441+
}
436442

437443
InputStream viewScript = Thread.currentThread().getContextClassLoader().getResourceAsStream(filePath);
438444
runScript(conn, viewScript);

plugins/hypervisors/simulator/src/main/java/com/cloud/resource/SimulatorStorageProcessor.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,11 @@ public Answer forgetObject(ForgetObjectCmd cmd) {
270270

271271
@Override
272272
public Answer copyVolumeFromPrimaryToPrimary(CopyCommand cmd) {
273-
return null;
273+
VolumeObjectTO volume = new VolumeObjectTO();
274+
volume.setPath(UUID.randomUUID().toString());
275+
volume.setSize(100);
276+
volume.setFormat(Storage.ImageFormat.RAW);
277+
return new CopyCmdAnswer(volume);
274278
}
275279

276280
@Override

test/integration/component/test_stopped_vm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ def test_08_deploy_attached_volume(self):
628628
@attr(
629629
tags=[
630630
"advanced",
631+
"test",
631632
"eip",
632633
"advancedns",
633634
"basic",

tools/marvin/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
raise RuntimeError("python setuptools is required to build Marvin")
2828

2929

30-
VERSION = "4.22.0.0-SNAPSHOT"
30+
VERSION = "4.22.0.0"
3131

3232
setup(name="Marvin",
3333
version=VERSION,

0 commit comments

Comments
 (0)