Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F #3124: Add COMPACT_MEMORY option to kvmrc #3126

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion share/pkgs/CentOS/opennebula.sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Cmnd_Alias ONE_XEN = /usr/sbin/xentop, /usr/sbin/xl, /usr/sbin/xm
Cmnd_Alias ONE_CEPH = /usr/bin/rbd
Cmnd_Alias ONE_MARKET = /usr/lib/one/sh/create_container_image.sh
Cmnd_Alias ONE_HA = /usr/bin/systemctl start opennebula-flow, /usr/bin/systemctl stop opennebula-flow, /usr/bin/systemctl start opennebula-gate, /usr/bin/systemctl stop opennebula-gate, /usr/sbin/service opennebula-flow start, /usr/sbin/service opennebula-flow stop, /usr/sbin/service opennebula-gate start, /usr/sbin/service opennebula-gate stop
Cmnd_Alias ONE_SYSCTL = /usr/sbin/sysctl vm.compact_memory=1

oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_CEPH, ONE_MARKET, ONE_HA
oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_CEPH, ONE_MARKET, ONE_HA, ONE_SYSCTL
3 changes: 2 additions & 1 deletion share/pkgs/Debian7/opennebula.sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Cmnd_Alias ONE_XEN = /usr/sbin/xentop, /usr/sbin/xl, /usr/sbin/xm
Cmnd_Alias ONE_CEPH = /usr/bin/rbd
Cmnd_Alias ONE_MARKET = /usr/lib/one/sh/create_container_image.sh
Cmnd_Alias ONE_HA = /bin/systemctl start opennebula-flow, /bin/systemctl stop opennebula-flow, /bin/systemctl start opennebula-gate, /bin/systemctl stop opennebula-gate, /usr/sbin/service opennebula-flow start, /usr/sbin/service opennebula-flow stop, /usr/sbin/service opennebula-gate start, /usr/sbin/service opennebula-gate stop
Cmnd_Alias ONE_SYSCTL = /sbin/sysctl vm.compact_memory=1

oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_CEPH, ONE_MARKET, ONE_HA
oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_CEPH, ONE_MARKET, ONE_HA, ONE_SYSCTL
3 changes: 2 additions & 1 deletion share/pkgs/Debian8/opennebula.sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Cmnd_Alias ONE_XEN = /usr/sbin/xentop, /usr/sbin/xl, /usr/sbin/xm
Cmnd_Alias ONE_CEPH = /usr/bin/rbd
Cmnd_Alias ONE_MARKET = /usr/lib/one/sh/create_container_image.sh
Cmnd_Alias ONE_HA = /bin/systemctl start opennebula-flow, /bin/systemctl stop opennebula-flow, /bin/systemctl start opennebula-gate, /bin/systemctl stop opennebula-gate, /usr/sbin/service opennebula-flow start, /usr/sbin/service opennebula-flow stop, /usr/sbin/service opennebula-gate start, /usr/sbin/service opennebula-gate stop
Cmnd_Alias ONE_SYSCTL = /sbin/sysctl vm.compact_memory=1

oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_CEPH, ONE_MARKET, ONE_HA
oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_CEPH, ONE_MARKET, ONE_HA, ONE_SYSCTL
3 changes: 2 additions & 1 deletion share/pkgs/Ubuntu/opennebula.sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Cmnd_Alias ONE_XEN = /usr/sbin/xentop, /usr/sbin/xl, /usr/sbin/xm
Cmnd_Alias ONE_CEPH = /usr/bin/rbd
Cmnd_Alias ONE_MARKET = /usr/lib/one/sh/create_container_image.sh
Cmnd_Alias ONE_HA = /bin/systemctl start opennebula-flow, /bin/systemctl stop opennebula-flow, /bin/systemctl start opennebula-gate, /bin/systemctl stop opennebula-gate, /usr/sbin/service opennebula-flow start, /usr/sbin/service opennebula-flow stop, /usr/sbin/service opennebula-gate start, /usr/sbin/service opennebula-gate stop
Cmnd_Alias ONE_SYSCTL = /sbin/sysctl vm.compact_memory=1

oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_CEPH, ONE_MARKET, ONE_HA
oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_CEPH, ONE_MARKET, ONE_HA, ONE_SYSCTL
3 changes: 2 additions & 1 deletion share/pkgs/openSUSE/opennebula.sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Cmnd_Alias ONE_OVS = /usr/bin/ovs-ofctl, /usr/bin/ovs-vsctl
Cmnd_Alias ONE_XEN = /usr/sbin/xentop, /usr/sbin/xl, /usr/sbin/xm
Cmnd_Alias ONE_MARKET = /usr/lib/one/sh/create_container_image.sh
Cmnd_Alias ONE_HA = /usr/bin/systemctl start opennebula-flow, /usr/bin/systemctl stop opennebula-flow, /usr/bin/systemctl start opennebula-gate, /usr/bin/systemctl stop opennebula-gate, /sbin/service opennebula-flow start, /sbin/service opennebula-flow stop, /sbin/service opennebula-gate start, /sbin/service opennebula-gate stop
Cmnd_Alias ONE_SYSCTL = /usr/sbin/sysctl vm.compact_memory=1

oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_MARKET, ONE_HA
oneadmin ALL=(ALL) NOPASSWD: ONE_MISC, ONE_NET, ONE_LVM, ONE_ISCSI, ONE_OVS, ONE_XEN, ONE_MARKET, ONE_HA, ONE_SYSCTL
4 changes: 4 additions & 0 deletions src/vmm_mad/remotes/kvm/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ DEP_FILE_LOCATION=$(dirname $DEP_FILE)
mkdir -p $DEP_FILE_LOCATION
cat > $DEP_FILE

if [ "x$COMPACT_MEMORY" = "xyes" ]; then
sudo sysctl vm.compact_memory=1 >/dev/null
fi

DATA=`virsh --connect $LIBVIRT_URI create $DEP_FILE`

if [ "x$?" = "x0" ]; then
Expand Down
3 changes: 3 additions & 0 deletions src/vmm_mad/remotes/kvm/kvmrc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export LIBVIRT_MD_KEY=one
# Seconds to wait after shutdown until timeout
export SHUTDOWN_TIMEOUT=300

# Uncomment this line to compact memory before running the VM
#export COMPACT_MEMORY=yes

# Uncomment this line to force VM cancellation after shutdown timeout
#export FORCE_DESTROY=yes

Expand Down