Skip to content

Commit 36f7cda

Browse files
committed
Merge branch '4.20' into apply-secondary-storage-selectors-on-template-sync
2 parents 3fc1356 + 432a306 commit 36f7cda

File tree

1,568 files changed

+17018
-11518
lines changed

Some content is hidden

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

1,568 files changed

+17018
-11518
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ permissions:
2929
jobs:
3030
build:
3131
if: github.repository == 'apache/cloudstack'
32-
runs-on: ubuntu-22.04
32+
runs-on: ubuntu-24.04
3333

3434
strategy:
3535
fail-fast: false
@@ -232,7 +232,25 @@ jobs:
232232
- name: Install Build Dependencies
233233
run: |
234234
sudo apt-get update
235-
sudo apt-get install -y git uuid-runtime genisoimage netcat ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
235+
sudo apt-get install -y git uuid-runtime genisoimage netcat-openbsd ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
236+
237+
- name: Setup IPMI Tool for CloudStack
238+
run: |
239+
# Create cloudstack-common directory if it doesn't exist
240+
sudo mkdir -p /usr/share/cloudstack-common
241+
242+
# Copy ipmitool to cloudstack-common directory if it doesn't exist
243+
if [ ! -f /usr/share/cloudstack-common/ipmitool ]; then
244+
sudo cp /usr/bin/ipmitool /usr/share/cloudstack-common/ipmitool
245+
sudo chmod 755 /usr/share/cloudstack-common/ipmitool
246+
fi
247+
248+
# Create ipmitool-C3 wrapper script
249+
sudo tee /usr/bin/ipmitool > /dev/null << 'EOF'
250+
#!/bin/bash
251+
/usr/share/cloudstack-common/ipmitool -C3 $@
252+
EOF
253+
sudo chmod 755 /usr/bin/ipmitool
236254
237255
- name: Install Python dependencies
238256
run: |
@@ -271,7 +289,7 @@ jobs:
271289
- name: Setup Simulator Prerequisites
272290
run: |
273291
sudo python3 -m pip install --upgrade netaddr mysql-connector-python
274-
python3 -m pip install --user --upgrade tools/marvin/dist/Marvin-*.tar.gz
292+
python3 -m pip install --user --upgrade tools/marvin/dist/[mM]arvin-*.tar.gz
275293
mvn -q -Pdeveloper -pl developer -Ddeploydb
276294
mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
277295

.github/workflows/ui.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
npm run test:unit
5757
5858
- uses: codecov/codecov-action@v4
59+
if: github.repository == 'apache/cloudstack'
5960
with:
6061
working-directory: ui
6162
files: ./coverage/lcov.info

agent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.20.1.0-SNAPSHOT</version>
27+
<version>4.20.3.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

agent/src/main/java/com/cloud/agent/Agent.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
import com.cloud.utils.nio.NioClient;
9494
import com.cloud.utils.nio.NioConnection;
9595
import com.cloud.utils.nio.Task;
96-
import com.cloud.utils.script.OutputInterpreter;
9796
import com.cloud.utils.script.Script;
9897

9998
/**
@@ -598,9 +597,9 @@ protected void setupStartupCommand(final StartupCommand startup) {
598597
}
599598

600599
protected String getAgentArch() {
601-
final Script command = new Script("/usr/bin/arch", 500, logger);
602-
final OutputInterpreter.OneLineParser parser = new OutputInterpreter.OneLineParser();
603-
return command.execute(parser);
600+
String arch = Script.runSimpleBashScript(Script.getExecutableAbsolutePath("arch"), 2000);
601+
logger.debug("Arch for agent: {} found: {}", _name, arch);
602+
return arch;
604603
}
605604

606605
@Override
@@ -1229,7 +1228,14 @@ public void doTask(final Task task) throws TaskExecutionException {
12291228
logger.error("Error parsing task", e);
12301229
}
12311230
} else if (task.getType() == Task.Type.DISCONNECT) {
1232-
logger.debug("Executing disconnect task - {}", () -> getLinkLog(task.getLink()));
1231+
try {
1232+
// an issue has been found if reconnect immediately after disconnecting.
1233+
// wait 5 seconds before reconnecting
1234+
logger.debug("Wait for 5 secs before reconnecting, disconnect task - {}", () -> getLinkLog(task.getLink()));
1235+
Thread.sleep(5000);
1236+
} catch (InterruptedException e) {
1237+
}
1238+
logger.debug("Executing disconnect task - {} and reconnecting", () -> getLinkLog(task.getLink()));
12331239
reconnect(task.getLink());
12341240
} else if (task.getType() == Task.Type.OTHER) {
12351241
processOtherTask(task);

agent/src/main/java/com/cloud/agent/properties/AgentProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ public static class Property <T>{
823823
private T defaultValue;
824824
private Class<T> typeClass;
825825

826-
Property(String name, T value) {
826+
public Property(String name, T value) {
827827
init(name, value);
828828
}
829829

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ private Answer executeProxyLoadScan(final Command cmd, final long proxyVmId, fin
175175
try {
176176
is.close();
177177
} catch (final IOException e) {
178-
logger.warn("Exception when closing , console proxy address : {}", proxyManagementIp);
178+
logger.warn("Exception when closing , console proxy address: {}", proxyManagementIp);
179179
success = false;
180180
}
181181
}
182182
} catch (final IOException e) {
183-
logger.warn("Unable to open console proxy command port url, console proxy address : {}", proxyManagementIp);
183+
logger.warn("Unable to open console proxy command port url, console proxy address: {}", proxyManagementIp);
184184
success = false;
185185
}
186186

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.20.1.0-SNAPSHOT</version>
27+
<version>4.20.3.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

api/src/main/java/com/cloud/agent/api/storage/OVFHelper.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ private DatadiskTO generateDiskTO(OVFFile file, OVFDisk disk, String ovfParentPa
278278
if (StringUtils.isNotBlank(path)) {
279279
File f = new File(path);
280280
if (!f.exists() || f.isDirectory()) {
281-
logger.error("One of the attached disk or iso does not exists " + path);
282-
throw new InternalErrorException("One of the attached disk or iso as stated on OVF does not exists " + path);
281+
logger.error("One of the attached disk or ISO does not exists " + path);
282+
throw new InternalErrorException("One of the attached disk or ISO as stated on OVF does not exists " + path);
283283
}
284284
}
285285
Long capacity = disk != null ? disk._capacity : file._size;
@@ -335,7 +335,7 @@ protected List<OVFDisk> extractDisksFromOvfDocumentTree(Document doc) {
335335
vd.add(od);
336336
}
337337
if (logger.isTraceEnabled()) {
338-
logger.trace(String.format("found %d disk definitions",vd.size()));
338+
logger.trace(String.format("Found %d disk definitions", vd.size()));
339339
}
340340
return vd;
341341
}
@@ -367,7 +367,7 @@ protected List<OVFFile> extractFilesFromOvfDocumentTree(File ovfFile, Document d
367367
}
368368
}
369369
if (logger.isTraceEnabled()) {
370-
logger.trace(String.format("found %d file definitions in %s",vf.size(), ovfFile.getPath()));
370+
logger.trace(String.format("Found %d file definitions in %s", vf.size(), ovfFile.getPath()));
371371
}
372372
return vf;
373373
}
@@ -523,7 +523,7 @@ OVFFile getFileDefinitionFromDiskDefinition(String fileRef, List<OVFFile> files)
523523
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
524524
if (doc == null) {
525525
if (logger.isTraceEnabled()) {
526-
logger.trace("no document to parse; returning no prerequisite networks");
526+
logger.trace("No document to parse; returning no prerequisite Networks");
527527
}
528528
return Collections.emptyList();
529529
}
@@ -541,7 +541,7 @@ private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement)
541541
final DocumentTraversal traversal = (DocumentTraversal) systemElement;
542542
final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true);
543543
if (logger.isTraceEnabled()) {
544-
logger.trace(String.format("starting out with %d network-prerequisites, parsing hardware",nets.size()));
544+
logger.trace(String.format("Starting out with %d network-prerequisites, parsing hardware",nets.size()));
545545
}
546546
int nicCount = 0;
547547
for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
@@ -551,7 +551,7 @@ private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement)
551551
String name = e.getTextContent(); // should be in our nets
552552
if(nets.get(name) == null) {
553553
if(logger.isInfoEnabled()) {
554-
logger.info(String.format("found a nic definition without a network definition byname %s, adding it to the list.", name));
554+
logger.info(String.format("Found a NIC definition without a Network definition by name %s, adding it to the list.", name));
555555
}
556556
nets.put(name, new OVFNetworkTO());
557557
}
@@ -562,7 +562,7 @@ private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement)
562562
}
563563
}
564564
if (logger.isTraceEnabled()) {
565-
logger.trace(String.format("ending up with %d network-prerequisites, parsed %d nics", nets.size(), nicCount));
565+
logger.trace(String.format("Ending up with %d network-prerequisites, parsed %d NICs", nets.size(), nicCount));
566566
}
567567
}
568568

@@ -631,7 +631,7 @@ private Map<String, OVFNetworkTO> getNetworksFromDocumentTree(Document doc) {
631631
nets.put(networkName,network);
632632
}
633633
if (logger.isTraceEnabled()) {
634-
logger.trace(String.format("found %d networks in template", nets.size()));
634+
logger.trace(String.format("Found %d Networks in Template", nets.size()));
635635
}
636636
return nets;
637637
}

api/src/main/java/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
3535
//////////////// API parameters /////////////////////
3636
/////////////////////////////////////////////////////
3737

38-
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "lists recurring snapshots by snapshot policy ID")
38+
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "Lists recurring Snapshots by Snapshot policy ID")
3939
private Long snapshotPolicyId;
4040

41-
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "list recurring snapshots by volume ID")
41+
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "List recurring Snapshots by volume ID")
4242
private Long volumeId;
4343

4444
/////////////////////////////////////////////////////

api/src/main/java/com/cloud/host/Host.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ public static String[] toStrings(Host.Type... types) {
5353
return strs;
5454
}
5555
}
56-
public static final String HOST_UEFI_ENABLE = "host.uefi.enable";
57-
public static final String HOST_VOLUME_ENCRYPTION = "host.volume.encryption";
58-
public static final String HOST_INSTANCE_CONVERSION = "host.instance.conversion";
56+
57+
String HOST_UEFI_ENABLE = "host.uefi.enable";
58+
String HOST_VOLUME_ENCRYPTION = "host.volume.encryption";
59+
String HOST_INSTANCE_CONVERSION = "host.instance.conversion";
60+
String HOST_OVFTOOL_VERSION = "host.ovftool.version";
61+
String HOST_VIRTV2V_VERSION = "host.virtv2v.version";
5962

6063
/**
6164
* @return name of the machine.

0 commit comments

Comments
 (0)