summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-12-09 17:22:55 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-12-09 17:22:55 +0000
commitd132920c68b8d01b4555c4a5a5f72b6cfe293f2e (patch)
tree88b0a3f7ded56e9aabf1818b23d924e20e121ee9
parent73713021930be2b40d67e8bda41159699bae839e (diff)
downloadbcfg2-d132920c68b8d01b4555c4a5a5f72b6cfe293f2e.tar.gz
bcfg2-d132920c68b8d01b4555c4a5a5f72b6cfe293f2e.tar.bz2
bcfg2-d132920c68b8d01b4555c4a5a5f72b6cfe293f2e.zip
Metadata: fix use of session cache for cert-recognized clients
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5615 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/Metadata.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index 05746f22d..4468cd990 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -458,7 +458,8 @@ class Metadata(Bcfg2.Server.Plugin.Plugin,
if addresspair in self.session_cache:
# we are working with a uuid'd client
lxml.etree.SubElement(self.clientdata_original.getroot(),
- 'Client', name=client,
+ 'Client',
+ name=self.session_cache[addresspair][1],
uuid=client, profile=profile,
address=addresspair[0])
else:
@@ -503,8 +504,8 @@ class Metadata(Bcfg2.Server.Plugin.Plugin,
#print self.session_cache
if addresspair in self.session_cache:
(stamp, uuid) = self.session_cache[addresspair]
- if time.time() - stamp < 60:
- return self.uuid[uuid]
+ if time.time() - stamp < 90:
+ return self.session_cache[addresspair][1]
address = addresspair[0]
if address in self.addresses:
if len(self.addresses[address]) != 1: