From 1dadd257a503e746e6a3dcd5aeba6f95d8981b7f Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 8 Jul 2024 07:58:06 -0400 Subject: [PATCH] Fix deletion of Userdata / CNI Configuration in projects --- .../KubernetesClusterActionWorker.java | 2 +- .../java/com/cloud/api/ApiResponseHelper.java | 2 +- .../cloud/server/ManagementServerImpl.java | 2 +- ui/src/config/section/compute.js | 20 +++++++++++++++---- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java index 83cd52684ca..13fb43ffac3 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java +++ b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java @@ -750,7 +750,7 @@ public class KubernetesClusterActionWorker { try { Thread.sleep(5 * 1000L); } catch (InterruptedException ie) { - LOGGER.error(String.format("Error while attempting to taint nodes on Kubernetes cluster: %s", kubernetesCluster.getName()), ie); + logger.error(String.format("Error while attempting to taint nodes on Kubernetes cluster: %s", kubernetesCluster.getName()), ie); } retryCounter++; } diff --git a/server/src/main/java/com/cloud/api/ApiResponseHelper.java b/server/src/main/java/com/cloud/api/ApiResponseHelper.java index 81757721a3f..794f7aa96e5 100644 --- a/server/src/main/java/com/cloud/api/ApiResponseHelper.java +++ b/server/src/main/java/com/cloud/api/ApiResponseHelper.java @@ -5416,7 +5416,7 @@ public class ApiResponseHelper implements ResponseGenerator { String rangeText = String.format("%s-%s", range.getStartASNumber(), range.getEndASNumber()); response.setAsNumberRange(rangeText); } else { - s_logger.info("is null for as number: "+ asn.getAsNumber()); + logger.info("is null for as number: "+ asn.getAsNumber()); } response.setAllocated(asn.getAllocatedTime()); response.setAllocationState(asn.isAllocated() ? "Allocated" : "Free"); diff --git a/server/src/main/java/com/cloud/server/ManagementServerImpl.java b/server/src/main/java/com/cloud/server/ManagementServerImpl.java index 73a466e3aaa..9fa231f6cc5 100644 --- a/server/src/main/java/com/cloud/server/ManagementServerImpl.java +++ b/server/src/main/java/com/cloud/server/ManagementServerImpl.java @@ -4999,7 +4999,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe return caller; } - private SSHKeyPair createAndSaveSSHKeyPair(final String name, final String fingerprint, final String publicKey, final String privateKey, final Account owner) { + private SSHKeyPair createAndSaveSSHKeyPair(final String name, final String fingerprint, final String publicKey, final String privateKey, final Account owner) { final SSHKeyPairVO newPair = new SSHKeyPairVO(); newPair.setAccountId(owner.getAccountId()); diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index c26284ae071..9c306f16093 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -963,11 +963,14 @@ export default { label: 'label.remove.user.data', message: 'message.please.confirm.remove.user.data', dataView: true, - args: ['id', 'account', 'domainid'], + args: ['id', 'account', 'domainid', 'projectid'], mapping: { id: { value: (record, params) => { return record.id } }, + projectid: { + value: (record, params) => { return record.projectid } + }, account: { value: (record, params) => { return record.account } }, @@ -981,7 +984,10 @@ export default { return selection.map(x => { const data = record.filter(y => { return y.id === x }) return { - id: x, account: data[0].account, domainid: data[0].domainid + id: x, + account: data[0].account, + domainid: data[0].domainid, + projectid: data[0].projectid } }) } @@ -1040,11 +1046,14 @@ export default { label: 'label.remove.user.data', message: 'message.please.confirm.remove.user.data', dataView: true, - args: ['id', 'account', 'domainid'], + args: ['id', 'account', 'domainid', 'projectid'], mapping: { id: { value: (record, params) => { return record.id } }, + projectid: { + value: (record, params) => { return record.projectid } + }, account: { value: (record, params) => { return record.account } }, @@ -1058,7 +1067,10 @@ export default { return selection.map(x => { const data = record.filter(y => { return y.id === x }) return { - id: x, account: data[0].account, domainid: data[0].domainid + id: x, + account: data[0].account, + domainid: data[0].domainid, + projectid: data[0].projectid } }) }