Permalink
Browse files

REMOTE_ADDR was not being set in the arguments in calls to CobblerSvc…

… instance causing ip address not to show up in install.log.
  • Loading branch information...
1 parent bad8d74 commit 017f27d157f3827c8b83401a38af6872f65c8852 @jbweber jbweber committed Jan 11, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 scripts/services.py
View
@@ -57,6 +57,10 @@ def application(environ, start_response):
# like: eth0 XX:XX:XX:XX:XX:XX
form["REMOTE_MAC"] = form.get("HTTP_X_RHN_PROVISIONING_MAC_0", None)
+ # REMOTE_ADDR isn't a required wsgi attribute so it may be naive to assume
+ # it's always present in this context.
+ form["REMOTE_ADDR"] = environ.get("REMOTE_ADDR", None)
+
# Read config for the XMLRPC port to connect to:
fd = open("/etc/cobbler/settings")
data = fd.read()

0 comments on commit 017f27d

Please sign in to comment.