Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Takoudjou
slapos
Commits
e0ed7b64
Commit
e0ed7b64
authored
Jan 25, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm: don't request update tap route if not needed
parent
262e6629
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
software/kvm/common.cfg
software/kvm/common.cfg
+1
-1
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+13
-8
No files found.
software/kvm/common.cfg
View file @
e0ed7b64
...
@@ -105,7 +105,7 @@ recipe = hexagonit.recipe.download
...
@@ -105,7 +105,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
mode = 644
md5sum =
730d1b066f606e64b3652d83c3c54026
md5sum =
abd3663d78591888284838efc08f094e
download-only = true
download-only = true
on-update = true
on-update = true
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
e0ed7b64
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
{% set part_list = [] -%}
{% set part_list = [] -%}
{% set monitor = str(slapparameter_dict.get('enable-monitor', True)).lower() == 'true' -%}
{% set monitor = str(slapparameter_dict.get('enable-monitor', True)).lower() == 'true' -%}
{% set monitor_interface_url = slapparameter_dict.get('monitor-interface-url', 'https://monitor.app.officejs.com') -%}
{% set monitor_interface_url = slapparameter_dict.get('monitor-interface-url', 'https://monitor.app.officejs.com') -%}
{% set allow_to_move = str(slapparameter_dict.get('allow-to-move-vm', True)).lower() == 'true' -%}
{% set bootstrap_url = '' -%}
{% set bootstrap_url = '' -%}
{% set bootstrap_url_md5sum = '' -%}
{% set bootstrap_url_md5sum = '' -%}
...
@@ -24,7 +25,7 @@
...
@@ -24,7 +25,7 @@
{% if instance_type == 'cluster' -%}
{% if instance_type == 'cluster' -%}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '') -%}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '') -%}
{%
if str(slapparameter_dict.get('allow-to-move-vm', True)).lower() == 'true'
-%}
{%
allow_to_move
-%}
[before-server-ready-script]
[before-server-ready-script]
# Script to run before allow to clone this VM (only for kvm-cluster)
# Script to run before allow to clone this VM (only for kvm-cluster)
...
@@ -479,12 +480,16 @@ command =
...
@@ -479,12 +480,16 @@ command =
BASE_DIR=${directory:public}
BASE_DIR=${directory:public}
if [ -s "$DATA_DIR/ipv4" ]; then
if [ -s "$DATA_DIR/ipv4" ]; then
IPv4=$(cat $DATA_DIR/ipv4)
IPv4=$(cat $DATA_DIR/ipv4)
if [ "$IPv4" = "${:local-ipv4}" ]; then
rm -f $DATA_DIR/ipv4 $DATA_DIR/hostname
else
cat << EOF > ${buildout:directory}/.${slap-connection:partition-id}-request-update-route
cat << EOF > ${buildout:directory}/.${slap-connection:partition-id}-request-update-route
[${slap-connection:partition-id}-routes]
[${slap-connection:partition-id}-routes]
ip-to-interface = $IPv4
ip-to-interface = $IPv4
ip-to-interface-dnat = true
ip-to-interface-dnat = true
interface = ${slap-network-information:network-interface}
interface = ${slap-network-information:network-interface}
EOF
EOF
fi
else
else
IPv4=${:local-ipv4}
IPv4=${:local-ipv4}
fi
fi
...
@@ -550,7 +555,7 @@ command =
...
@@ -550,7 +555,7 @@ command =
rm -f ${directory:var}/request-bang-done
rm -f ${directory:var}/request-bang-done
rm -f ${directory:var}/server-is-ready
rm -f ${directory:var}/server-is-ready
rm -f ${buildout:directory}/.${slap-connection:partition-id}-request-update-route
rm -f ${buildout:directory}/.${slap-connection:partition-id}-request-update-route
update-command =
update-command =
${:command}
#############################
#############################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment