This is an automated email from the ASF dual-hosted git repository.

weizhouapache pushed a commit to branch 4.22
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.22 by this push:
     new 1c1611df2fd Ubuntu 26.04: remove requiretty from 
/etc/sudoers.d/cloudstack and fix setup-sysvm-tmplt (#13476)
1c1611df2fd is described below

commit 1c1611df2fd32ec160171de9f5f9031275f882bf
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Jul 10 15:28:33 2026 +0200

    Ubuntu 26.04: remove requiretty from /etc/sudoers.d/cloudstack and fix 
setup-sysvm-tmplt (#13476)
    
    * debian/rules: remove requiretty from /etc/sudoers.d/cloudstack
    
    * fix scripts/storage/secondary/setup-sysvm-tmplt
    
    /tmp is a tmpfs type of filesystem
    
    ```
        root@mgmt1:~# 
/usr/share/cloudstack-common/scripts/storage/secondary/setup-sysvm-tmplt -u 
002c593f-eac9-4fee-85dd-44887a3f2042 -f /usr/share/cloudstack-m
    +anagement/templates/systemvm/systemvmtemplate-4.22.0-x86_64-kvm.qcow2.bz2 
-h kvm -d /tmp/tmp5782242889444060623/template/tmpl/1/3
        ....
        Insufficient free disk space for target folder 
/tmp/tmp5782242889444060623/template/tmpl/1/3: avail=1739872k req=2120000k
    
        root@mgmt1:~# mount | grep /tmp
        tmpfs on /tmp type tmpfs 
(rw,nosuid,nodev,nr_inodes=1048576,inode64,usrquota)
      ```
    
    * marvin: revert mysql-connector-python to 8.0.30
    
    * Apply          "mysql-connector-python >= 8.4.0",
    
    * register systemvm template via /var/tmp in java too
    
    * Revert "register systemvm template via /var/tmp in java too"
    
    This reverts commit c0147c5e90b49dfeefae9cd10fbe02c3023854af.
    
    * mgmt: add -Djava.io.tmpdir=/var/tmp to JAVA_OPTS
    
    * fix scripts/storage/secondary/createtmplt.sh
---
 debian/rules                                    | 1 +
 packaging/systemd/cloudstack-management.default | 2 +-
 scripts/storage/secondary/createtmplt.sh        | 2 +-
 scripts/storage/secondary/setup-sysvm-tmplt     | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 842fc2408af..32744782330 100755
--- a/debian/rules
+++ b/debian/rules
@@ -95,6 +95,7 @@ override_dh_auto_install:
        # nast hack for a couple of configuration files
        mv $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/cloudstack-limits.conf 
$(DESTDIR)/$(SYSCONFDIR)/security/limits.d/
        mv $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/cloudstack-sudoers 
$(DESTDIR)/$(SYSCONFDIR)/sudoers.d/$(PACKAGE)
+       sed -i '/requiretty/d' $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/$(PACKAGE)
        chmod 0440 $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/$(PACKAGE)
 
        install -D client/target/utilities/bin/cloud-update-xenserver-licenses 
$(DESTDIR)/usr/bin/cloudstack-update-xenserver-licenses
diff --git a/packaging/systemd/cloudstack-management.default 
b/packaging/systemd/cloudstack-management.default
index a41338beda6..dbb7fa7d4bc 100644
--- a/packaging/systemd/cloudstack-management.default
+++ b/packaging/systemd/cloudstack-management.default
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-JAVA_OPTS="-Djava.security.properties=/etc/cloudstack/management/java.security.ciphers
 -Djava.awt.headless=true -Xmx2G -XX:+UseParallelGC -XX:MaxGCPauseMillis=500 
-XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/var/log/cloudstack/management/ 
-XX:ErrorFile=/var/log/cloudstack/management/cloudstack-management.err 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-exports=java.base/sun.security.x509=ALL-UNNAMED"
+JAVA_OPTS="-Djava.security.properties=/etc/cloudstack/management/java.security.ciphers
 -Djava.awt.headless=true -Xmx2G -XX:+UseParallelGC -XX:MaxGCPauseMillis=500 
-XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/var/log/cloudstack/management/ 
-XX:ErrorFile=/var/log/cloudstack/management/cloudstack-management.err 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-exports=java.base/sun.security.x509=ALL-UNNAMED -Djava.io.tmpdir=/var/tmp"
 
 
CLASSPATH="/usr/share/cloudstack-management/lib/*:/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/cloudstack-management:/usr/share/cloudstack-mysql-ha/lib/*"
 
diff --git a/scripts/storage/secondary/createtmplt.sh 
b/scripts/storage/secondary/createtmplt.sh
index cfc4be28a01..280f57e70fb 100755
--- a/scripts/storage/secondary/createtmplt.sh
+++ b/scripts/storage/secondary/createtmplt.sh
@@ -218,7 +218,7 @@ imgsize=$(ls -l $tmpltimg2| awk -F" " '{print $5}')
 if [ "$cloud" == "true" ]
 then
     create_from_file_user $tmpltfs $tmpltimg2 $tmpltname
-    tmpltfs=/tmp/cloud/templates/
+    tmpltfs=/var/tmp/cloud/templates/
 else
     create_from_file $tmpltfs $tmpltimg2 $tmpltname
 fi
diff --git a/scripts/storage/secondary/setup-sysvm-tmplt 
b/scripts/storage/secondary/setup-sysvm-tmplt
index 63006cc4e4c..96939707b91 100755
--- a/scripts/storage/secondary/setup-sysvm-tmplt
+++ b/scripts/storage/secondary/setup-sysvm-tmplt
@@ -105,7 +105,7 @@ if [[ "$destfiles" != "" ]]; then
   failed 2 "Data already exists at destination $destdir"
 fi
 
-tmpfolder=/tmp/cloud/templates/
+tmpfolder=/var/tmp/cloud/templates/
 mkdir -p $tmpfolder
 tmplfile=$tmpfolder/$localfile
 

Reply via email to