From 5705021ba44ead69a3d6ce572bb3a8be654ad8d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= <cedric.dsm@tiolive.com>
Date: Wed, 14 Jan 2015 15:29:54 +0100
Subject: [PATCH] slaprunner: change clone ports.

Also remove unused variable in nginx-conf.
---
 software/slaprunner/common.cfg                    | 6 +++---
 software/slaprunner/instance-runner-import.cfg.in | 8 ++++++++
 software/slaprunner/instance-runner.cfg           | 1 -
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/software/slaprunner/common.cfg b/software/slaprunner/common.cfg
index bc70c17d2..c89b4ab08 100644
--- a/software/slaprunner/common.cfg
+++ b/software/slaprunner/common.cfg
@@ -45,7 +45,7 @@ mode = 0644
 recipe = slapos.recipe.template
 url = ${:_profile_base_location_}/instance-runner.cfg
 output = ${buildout:directory}/template-runner.cfg.in
-md5sum = a9977e1c7eed82ab3c2d405f7a3adfad
+md5sum = 27b20fe461b177f5ee53570f643cf0b7
 mode = 0644
 
 [template-runner-import-script]
@@ -60,7 +60,7 @@ mode = 0644
 recipe = slapos.recipe.template
 url = ${:_profile_base_location_}/instance-runner-import.cfg.in
 output = ${buildout:directory}/instance-runner-import.cfg
-md5sum = b1ab64f54a44e998e8e8fecb565812cd
+md5sum = 1e504da0fd4ce7f5130df9c5166dcc7c
 mode = 0644
 
 [template-runner-export-script]
@@ -75,7 +75,7 @@ mode = 0644
 recipe = slapos.recipe.template
 url = ${:_profile_base_location_}/instance-runner-export.cfg.in
 output = ${buildout:directory}/instance-runner-export.cfg
-md5sum = 49bc44385c9da2fac0cdd559713368d5
+md5sum = 2df7ed6a6dc1250b317ef1a4d1376e2b
 mode = 0644
 
 [template-resilient]
diff --git a/software/slaprunner/instance-runner-import.cfg.in b/software/slaprunner/instance-runner-import.cfg.in
index 1f39864f5..f2f3bc66f 100644
--- a/software/slaprunner/instance-runner-import.cfg.in
+++ b/software/slaprunner/instance-runner-import.cfg.in
@@ -53,6 +53,14 @@ parts +=
 ## Monitor for import runner
   monitor-latest-restored-backup
 
+# For the needs of importer, we run the full slaprunner
+# In case both exporter and importer (aka main instance and clone instance)
+# run with the same IP (usually for testing purposes),
+# run slaprunner using different ports.
+[slaprunner]
+proxy_port = 50000
+runner_port = 50005
+
 [importer]
 recipe = slapos.recipe.template:jinja2
 template = ${template-runner-import-script:location}/${template-runner-import-script:filename}
diff --git a/software/slaprunner/instance-runner.cfg b/software/slaprunner/instance-runner.cfg
index 995d0cf4e..79e302d9d 100644
--- a/software/slaprunner/instance-runner.cfg
+++ b/software/slaprunner/instance-runner.cfg
@@ -265,7 +265,6 @@ scgi_temp_path = $${directory:tmp}/scgi_temp_path
 nb_workers = 2
 # Network
 local-ip = $${slap-network-information:local-ipv4}
-port = 30001
 global-ip = $${slap-network-information:global-ipv6}
 global-port = $${slaprunner:runner_port}
 # Backend
-- 
2.30.9