From e290ac54514ab1868d775f18a3e783cb30d6d5d5 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Tue, 10 Oct 2023 12:16:44 +0200 Subject: [PATCH 1/3] systemvm: remove config in /etc/pam.d/systemd-user to fix user@0.service (#8048) the service `user@0.service` fails in system vms and virtual routers This PR removes a change to fix memory leak of SSH connections in the systemvm templates with old linux kernel. --- systemvm/debian/opt/cloud/bin/setup/init.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/setup/init.sh b/systemvm/debian/opt/cloud/bin/setup/init.sh index 436b8349336..ae13700fffd 100644 --- a/systemvm/debian/opt/cloud/bin/setup/init.sh +++ b/systemvm/debian/opt/cloud/bin/setup/init.sh @@ -209,8 +209,7 @@ setup_interface_sshd() { fi systemctl restart systemd-journald - # Patch known systemd/sshd memory leak - https://github.com/systemd/systemd/issues/8015#issuecomment-476160981 - echo '@include null' >> /etc/pam.d/systemd-user + # Enable and Start SSH systemctl enable --now --no-block ssh } From a9f3af85cb13cc1d6482778840ab19f8865a40a6 Mon Sep 17 00:00:00 2001 From: Harikrishna Date: Tue, 10 Oct 2023 15:49:57 +0530 Subject: [PATCH 2/3] Default value of force should be false for template delete operation (#7731) * default value of force should be false * Added force flag in tests --- .../api/command/user/template/DeleteTemplateCmd.java | 4 +++- test/integration/smoke/test_templates.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java index 6923751ea77..3d7aaaec31c 100755 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java @@ -16,6 +16,7 @@ // under the License. package org.apache.cloudstack.api.command.user.template; +import org.apache.commons.lang3.BooleanUtils; import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; @@ -67,8 +68,9 @@ public class DeleteTemplateCmd extends BaseAsyncCmd { } public boolean isForced() { - return (forced != null) ? forced : true; + return BooleanUtils.toBooleanDefaultIfNull(forced, false); } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index 00ad2201b44..bd5f522e440 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templates.py @@ -115,6 +115,7 @@ class TestCreateTemplateWithChecksum(cloudstackTestCase): cmd = deleteTemplate.deleteTemplateCmd() cmd.id = temp.id cmd.zoneid = self.zone.id + cmd.forced = True self.apiclient.deleteTemplate(cmd) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) From 864a195868036b367ccf22ec1f26b08ce7d931d7 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Tue, 10 Oct 2023 13:58:58 +0200 Subject: [PATCH 3/3] .github: run Sonar Check only on PRs from apache/cloudstack branches (#8058) This PR fixes #8050 --- .github/workflows/sonar-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar-check.yml b/.github/workflows/sonar-check.yml index 196cbc93e36..71ca75bb554 100644 --- a/.github/workflows/sonar-check.yml +++ b/.github/workflows/sonar-check.yml @@ -28,7 +28,7 @@ concurrency: jobs: build: - if: github.repository == 'apache/cloudstack' + if: github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository name: Sonar JaCoCo Coverage runs-on: ubuntu-22.04 steps: