Skip to content

Commit 2951a67

Browse files
committed
minor fixes
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 35f779b commit 2951a67

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/manager/ExtensionsManagerImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ public Extension createExtension(CreateExtensionCmd cmd) {
556556
ExtensionVO extensionVO = Transaction.execute((TransactionCallbackWithException<ExtensionVO, CloudRuntimeException>) status -> {
557557
ExtensionVO extension = new ExtensionVO(name, description, type,
558558
entryPointFinal, stateFinal);
559+
if (!Extension.State.Enabled.equals(stateFinal)) {
560+
extension.setEntryPointReady(false);
561+
}
559562
extension = extensionDao.persist(extension);
560563

561564
Map<String, String> details = cmd.getDetails();
@@ -658,10 +661,6 @@ public Extension updateExtension(UpdateExtensionCmd cmd) {
658661
if (description != null && !description.equals(extensionVO.getDescription())) {
659662
extensionVO.setDescription(description);
660663
updateNeeded = true;
661-
if (!extensionDao.update(id, extensionVO)) {
662-
throw new CloudRuntimeException(String.format("Failed to updated the extension: %s",
663-
extensionVO.getName()));
664-
}
665664
}
666665
if (orchestratorRequiresPrepareVm != null && !Extension.Type.Orchestrator.equals(extensionVO.getType())) {
667666
throw new InvalidParameterValueException(String.format("%s is applicable only with %s type",

plugins/hypervisors/external/src/main/java/org/apache/cloudstack/hypervisor/external/provisioner/ExternalEntryPointPayloadProvisioner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,9 @@ public void cleanupExtensionEntryPoint(String extensionName, String extensionRel
548548
Path filePath = rootPath
549549
.resolve(normalizedPath.startsWith(extensionDirName) ? extensionDirName : normalizedPath)
550550
.normalize();
551+
if (!Files.exists(filePath)) {
552+
return;
553+
}
551554
if (!Files.isDirectory(filePath) && !Files.isRegularFile(filePath)) {
552555
throw new CloudRuntimeException(
553556
String.format("Failed to cleanup extension entry-point: %s for extension: %s as it either " +

ui/src/config/section/extension.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default {
4444
}, 'created']
4545
return fields
4646
},
47-
details: ['name', 'id', 'type', 'details', 'entrypoint', 'entrypointready', 'isuserdefined', 'orchestratorrequirespreparevm', 'created'],
47+
details: ['name', 'description', 'id', 'type', 'details', 'entrypoint', 'entrypointready', 'isuserdefined', 'orchestratorrequirespreparevm', 'created'],
4848
filters: ['orchestrator'],
4949
tabs: [{
5050
name: 'details',

0 commit comments

Comments
 (0)