Skip to content

Commit 4bfcc67

Browse files
authored
Merge branch 'main' into add-readme-badges
2 parents 607b3cb + e47d7bc commit 4bfcc67

File tree

1,270 files changed

+14911
-7955
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,270 files changed

+14911
-7955
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ updates:
2626
directory: "/" # Location of package manifests
2727
schedule:
2828
interval: "daily"
29+
cooldown:
30+
default-days: 7

.github/workflows/stale.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ jobs:
3333
stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.'
3434
stale-pr-message: 'This PR is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.'
3535
close-issue-message: 'This issue was closed because it has been stale for 120 days with no activity.'
36-
close-pr-message: 'This PR was closed because it has been stale for 120 days with no activity.'
36+
close-pr-message: 'This PR was closed because it has been stale for 240 days with no activity.'
3737
stale-issue-label: 'no-issue-activity'
3838
stale-pr-label: 'no-pr-activity'
3939
days-before-stale: 120
40+
days-before-close: -1
41+
days-before-pr-close: 240
4042
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
4143
exempt-pr-labels: 'status:ready-for-merge,status:needs-testing,status:on-hold'

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/src/main/java/com/cloud/agent/api/storage/OVFHelper.java

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ protected OVFPropertyTO createOVFPropertyFromNode(Node node, int index, String c
119119
boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true");
120120
String label = ovfParser.getChildNodeValue(node, "Label");
121121
String description = ovfParser.getChildNodeValue(node, "Description");
122-
logger.debug("Creating OVF property index " + index + (category == null ? "" : " for category " + category)
123-
+ " with key = " + key);
122+
logger.debug("Creating OVF property index {} {} with key = {}", index, (category == null ? "" : " for category " + category), key);
124123
return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable,
125124
label, description, password, index, category);
126125
}
@@ -152,7 +151,7 @@ public List<OVFPropertyTO> getConfigurableOVFPropertiesFromDocument(Document doc
152151
if (child.getNodeName().equalsIgnoreCase("Category") ||
153152
child.getNodeName().endsWith(":Category")) {
154153
lastCategoryFound = child.getTextContent();
155-
logger.info("Category found " + lastCategoryFound);
154+
logger.info("Category found {}", lastCategoryFound);
156155
} else if (child.getNodeName().equalsIgnoreCase("Property") ||
157156
child.getNodeName().endsWith(":Property")) {
158157
OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound);
@@ -250,13 +249,13 @@ private List<DatadiskTO> matchHardwareItemsToDiskAndFilesInformation(List<OVFVir
250249
int diskNumber = 0;
251250
for (OVFVirtualHardwareItemTO diskItem : diskHardwareItems) {
252251
if (StringUtils.isBlank(diskItem.getHostResource())) {
253-
logger.error("Missing disk information for hardware item " + diskItem.getElementName() + " " + diskItem.getInstanceId());
252+
logger.error("Missing disk information for hardware item {} {}", diskItem.getElementName(), diskItem.getInstanceId());
254253
continue;
255254
}
256255
String diskId = extractDiskIdFromDiskHostResource(diskItem.getHostResource());
257256
OVFDisk diskDefinition = getDiskDefinitionFromDiskId(diskId, disks);
258257
if (diskDefinition == null) {
259-
logger.error("Missing disk definition for disk ID " + diskId);
258+
logger.error("Missing disk definition for disk ID {}", diskId);
260259
}
261260
OVFFile fileDefinition = getFileDefinitionFromDiskDefinition(diskDefinition._fileRef, files);
262261
DatadiskTO datadiskTO = generateDiskTO(fileDefinition, diskDefinition, ovfParentPath, diskNumber, diskItem);
@@ -278,8 +277,8 @@ private DatadiskTO generateDiskTO(OVFFile file, OVFDisk disk, String ovfParentPa
278277
if (StringUtils.isNotBlank(path)) {
279278
File f = new File(path);
280279
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);
280+
logger.error("One of the attached disk or ISOs does not exists {}", path);
281+
throw new InternalErrorException("One of the attached disk or ISOs as stated on OVF does not exists " + path);
283282
}
284283
}
285284
Long capacity = disk != null ? disk._capacity : file._size;
@@ -334,9 +333,7 @@ protected List<OVFDisk> extractDisksFromOvfDocumentTree(Document doc) {
334333
od._controller = getControllerType(items, od._diskId);
335334
vd.add(od);
336335
}
337-
if (logger.isTraceEnabled()) {
338-
logger.trace(String.format("found %d disk definitions",vd.size()));
339-
}
336+
logger.trace("Found {} disk definitions", vd.size());
340337
return vd;
341338
}
342339

@@ -366,9 +363,7 @@ protected List<OVFFile> extractFilesFromOvfDocumentTree(File ovfFile, Document d
366363
vf.add(of);
367364
}
368365
}
369-
if (logger.isTraceEnabled()) {
370-
logger.trace(String.format("found %d file definitions in %s",vf.size(), ovfFile.getPath()));
371-
}
366+
logger.trace("Found {} file definitions in {}", vf.size(), ovfFile.getPath());
372367
return vf;
373368
}
374369

@@ -506,7 +501,7 @@ private void writeDocumentToFile(String newOvfFilePath, Document doc) {
506501
outfile.write(writer.toString());
507502
outfile.close();
508503
} catch (IOException | TransformerException e) {
509-
logger.info("Unexpected exception caught while rewriting OVF:" + e.getMessage(), e);
504+
logger.info("Unexpected exception caught while rewriting OVF: {}", e.getMessage(), e);
510505
throw new CloudRuntimeException(e);
511506
}
512507
}
@@ -522,9 +517,7 @@ OVFFile getFileDefinitionFromDiskDefinition(String fileRef, List<OVFFile> files)
522517

523518
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
524519
if (doc == null) {
525-
if (logger.isTraceEnabled()) {
526-
logger.trace("no document to parse; returning no prerequisite networks");
527-
}
520+
logger.trace("No document to parse; returning no prerequisite networks");
528521
return Collections.emptyList();
529522
}
530523

@@ -540,19 +533,15 @@ public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws I
540533
private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement) {
541534
final DocumentTraversal traversal = (DocumentTraversal) systemElement;
542535
final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true);
543-
if (logger.isTraceEnabled()) {
544-
logger.trace(String.format("starting out with %d network-prerequisites, parsing hardware",nets.size()));
545-
}
536+
logger.trace("Starting out with {} network-prerequisites, parsing hardware", nets.size());
546537
int nicCount = 0;
547538
for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
548539
final Element e = (Element) n;
549540
if ("rasd:Connection".equals(e.getTagName())) {
550541
nicCount++;
551542
String name = e.getTextContent(); // should be in our nets
552543
if(nets.get(name) == null) {
553-
if(logger.isInfoEnabled()) {
554-
logger.info(String.format("found a nic definition without a network definition byname %s, adding it to the list.", name));
555-
}
544+
logger.info("Found a NIC definition without a Network definition by name {}, adding it to the list.", name);
556545
nets.put(name, new OVFNetworkTO());
557546
}
558547
OVFNetworkTO thisNet = nets.get(name);
@@ -561,9 +550,7 @@ private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement)
561550
}
562551
}
563552
}
564-
if (logger.isTraceEnabled()) {
565-
logger.trace(String.format("ending up with %d network-prerequisites, parsed %d nics", nets.size(), nicCount));
566-
}
553+
logger.trace("Ending up with {} network-prerequisites, parsed {} nics", nets.size(), nicCount);
567554
}
568555

569556
/**
@@ -585,7 +572,7 @@ private void fillNicPrerequisites(OVFNetworkTO nic, Node parentNode) {
585572
int addressOnParent = Integer.parseInt(addressOnParentStr);
586573
nic.setAddressOnParent(addressOnParent);
587574
} catch (NumberFormatException e) {
588-
logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: " + addressOnParentStr);
575+
logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: {}", addressOnParentStr);
589576
}
590577

591578
boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr);
@@ -597,7 +584,7 @@ private void fillNicPrerequisites(OVFNetworkTO nic, Node parentNode) {
597584
int instanceId = Integer.parseInt(instanceIdStr);
598585
nic.setInstanceID(instanceId);
599586
} catch (NumberFormatException e) {
600-
logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: " + instanceIdStr);
587+
logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: {}", instanceIdStr);
601588
}
602589

603590
nic.setResourceSubType(resourceSubType);
@@ -630,9 +617,7 @@ private Map<String, OVFNetworkTO> getNetworksFromDocumentTree(Document doc) {
630617

631618
nets.put(networkName,network);
632619
}
633-
if (logger.isTraceEnabled()) {
634-
logger.trace(String.format("found %d networks in template", nets.size()));
635-
}
620+
logger.trace("Found {} Networks in Template", nets.size());
636621
return nets;
637622
}
638623

@@ -771,7 +756,7 @@ private Long getLongValueFromString(String value) {
771756
try {
772757
return Long.parseLong(value);
773758
} catch (NumberFormatException e) {
774-
logger.debug("Could not parse the value: " + value + ", ignoring it");
759+
logger.debug("Could not parse the value: {}, ignoring it", value);
775760
}
776761
}
777762
return null;
@@ -782,7 +767,7 @@ private Integer getIntValueFromString(String value) {
782767
try {
783768
return Integer.parseInt(value);
784769
} catch (NumberFormatException e) {
785-
logger.debug("Could not parse the value: " + value + ", ignoring it");
770+
logger.debug("Could not parse the value: {}, ignoring it", value);
786771
}
787772
}
788773
return null;
@@ -820,7 +805,7 @@ public List<OVFEulaSectionTO> getEulaSectionsFromDocument(Document doc) {
820805
try {
821806
compressedLicense = compressOVFEula(eulaLicense);
822807
} catch (IOException e) {
823-
logger.error("Could not compress the license for info " + eulaInfo);
808+
logger.error("Could not compress the license for info {}", eulaInfo);
824809
continue;
825810
}
826811
OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public OVFParser() {
5454
documentBuilderFactory.setNamespaceAware(true);
5555
documentBuilder = documentBuilderFactory.newDocumentBuilder();
5656
} catch (ParserConfigurationException e) {
57-
logger.error("Cannot start the OVF parser: " + e.getMessage(), e);
57+
logger.error("Cannot start the OVF parser: {}", e.getMessage(), e);
5858
}
5959
}
6060

@@ -70,7 +70,7 @@ public Document parseOVFFile(String ovfFilePath) {
7070
try {
7171
return documentBuilder.parse(new File(ovfFilePath));
7272
} catch (SAXException | IOException e) {
73-
logger.error("Error parsing " + ovfFilePath + " " + e.getMessage(), e);
73+
logger.error("Error parsing {} {}", ovfFilePath, e.getMessage(), e);
7474
return null;
7575
}
7676
}

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/cpu/CPU.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public class CPU {
2222
public enum CPUArch {
2323
x86("i686", 32),
2424
amd64("x86_64", 64),
25-
arm64("aarch64", 64);
25+
arm64("aarch64", 64),
26+
s390x("s390x", 64);
2627

2728
private final String type;
2829
private final int bits;

api/src/main/java/com/cloud/deploy/DeploymentClusterPlanner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
6262
"vm.allocation.algorithm",
6363
"Advanced",
6464
"random",
65-
"Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', or 'firstfitleastconsumed'.",
65+
"Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', or 'firstfitleastconsumed'.",
6666
true,
6767
ConfigKey.Scope.Global, null, null, null, null, null,
6868
ConfigKey.Kind.Select,
69-
"random,firstfit,userdispersing,userconcentratedpod_random,userconcentratedpod_firstfit,firstfitleastconsumed");
69+
"random,firstfit,userdispersing,firstfitleastconsumed");
7070

7171
/**
7272
* This is called to determine list of possible clusters where a virtual

api/src/main/java/com/cloud/deploy/DeploymentPlanner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public interface DeploymentPlanner extends Adapter {
7070
boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid);
7171

7272
public enum AllocationAlgorithm {
73-
random, firstfit, userdispersing, userconcentratedpod_random, userconcentratedpod_firstfit;
73+
random, firstfit, userdispersing;
7474
}
7575

7676
public enum PlannerResourceUsage {

api/src/main/java/com/cloud/network/Ipv6Service.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public interface Ipv6Service extends PluggableService, Configurable {
4545
static final ConfigKey<Boolean> Ipv6OfferingCreationEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class,
4646
"ipv6.offering.enabled",
4747
"false",
48-
"Indicates whether creation of IPv6 network/VPC offering is enabled or not.",
48+
"Indicates whether creation of IPv6 Network/VPC offering is enabled or not.",
4949
true);
5050

5151
static final ConfigKey<Integer> Ipv6PrefixSubnetCleanupInterval = new ConfigKey<Integer>("Advanced", Integer.class,

0 commit comments

Comments
 (0)