The profile's 'server' attribute address may not be addressable by the
VM host for retrieving the kickstart file to obtain install tree
information.

Instead, retrieve the kickstart file from the cobbler server specified
in the '--server' argument.

Signed-off-by: John Morris <[email protected]>
---
 koan/app.py |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/koan/app.py b/koan/app.py
index 01659dd..f984cd4 100755
--- a/koan/app.py
+++ b/koan/app.py
@@ -689,7 +689,16 @@ class Koan:
                     break
         else:
             try:
-                raw = utils.urlread(profile_data["kickstart"])
+                if profile_data["kickstart"][:4] == "http":
+                    if not self.system:
+                        url_fmt = "http://%s/cblr/svc/op/ks/profile/%s";
+                    else:
+                        url_fmt = "http://%s/cblr/svc/op/ks/system/%s";
+                    url = url_fmt % (self.server, profile_data['name'])
+                else:
+                    url = profile_data["kickstart"]
+
+                raw = utils.urlread(url)
                 lines = raw.splitlines()
 
                 method_re = 
re.compile('(?P<urlcmd>\s*url\s.*)|(?P<nfscmd>\s*nfs\s.*)')
-- 
1.7.1

_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler

Reply via email to