summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Saha <asaha@redhat.com>2014-07-02 20:07:26 +1000
committerGerrit Code Review <gerrit@beaker-project.org>2014-07-03 00:27:53 +0000
commit97ab8f4c5f453870a06cf37f70c9e8ed9f68aca5 (patch)
tree8eb1561476263a560477087bfa327029d580f246
parent49e16e2fc348f20c062b330fa53778d0fdc9fb7b (diff)
Include remote_post for manually provisioned systems as well
(The original patch introduced this in 1479a07) Bug: 1099231
-rw-r--r--IntegrationTests/src/bkr/inttest/server/test_kickstart.py8
-rw-r--r--Server/bkr/server/snippets/rhts_post2
2 files changed, 9 insertions, 1 deletions
diff --git a/IntegrationTests/src/bkr/inttest/server/test_kickstart.py b/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
index 5642578..649cd34 100644
--- a/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
+++ b/IntegrationTests/src/bkr/inttest/server/test_kickstart.py
@@ -2530,3 +2530,11 @@ part /mnt/testarea2 --size=10240 --fstype btrfs
self.assertIn("curl --retry 20 -o remote_script 'http://path/to/~scriptsdir/myscript' "
"&& chmod +x remote_script && ./remote_script",
ks)
+ # Manual provision
+ self.system.provisions[self.system.arch[0]] = Provision(arch=self.system.arch[0],
+ ks_meta=u'remote_post=http://path/to/myscript')
+ tree = self.rhel62_server_x86_64
+ install_options = self.system.install_options(tree)
+ ks = generate_kickstart(install_options, tree, self.system, self.user).kickstart
+ self.assertIn("curl --retry 20 -o remote_script http://path/to/myscript "
+ "&& chmod +x remote_script && ./remote_script", ks.splitlines())
diff --git a/Server/bkr/server/snippets/rhts_post b/Server/bkr/server/snippets/rhts_post
index 79f2b34..490efef 100644
--- a/Server/bkr/server/snippets/rhts_post
+++ b/Server/bkr/server/snippets/rhts_post
@@ -145,8 +145,8 @@ useradd --password '$6$oIW3o2Mr$XbWZKaM7nA.cQqudfDJScupXOia5h1u517t6Htx/Q/MgXm82
{% if system and system.kernel_type.kernel_type == 'mvebu' %}
{% snippet 'mvebu' %}
{% endif %}
-{% if recipe %}
{% snippet 'remote_post' %}
+{% if recipe %}
# Check in with Beaker Server, record our postinstall time.
{% if distro is osmajor('RedHatEnterpriseLinux3', 'RedHatEnterpriseLinux4', 'RedHatEnterpriseLinuxServer5', 'RedHatEnterpriseLinuxServerGrid5', 'RedHatEnterpriseLinuxClient5') %}
wget -O - http://{{ lab_controller.fqdn }}:8000/postinstall_done/{{ recipe.id }}