Commit af9ed869 authored by Srikanth Raju's avatar Srikanth Raju Committed by Leigh B Stoller
Browse files

Use IP of boss in meta server

Ignore Metadata version
parent 39ed8ed6
......@@ -28,8 +28,9 @@ class Ec2MetaHandler(BaseHTTPRequestHandler):
if only_path=="/":
break;
if len(folders) > 0:
folders.pop() #Ignore version
folders.reverse()
print folders
try:
message = self.handle_req(folders, self.metas)
......@@ -178,7 +179,6 @@ class Ec2MetaHandler(BaseHTTPRequestHandler):
return key[0]
metas = {
"latest" : {
"meta-data" : {
"placement" : {"availability-zone" : doavail},
"ami-id": doamiid,
......@@ -190,12 +190,13 @@ class Ec2MetaHandler(BaseHTTPRequestHandler):
"public-keys": dopublic_keys },
"user-data" : do_userdata
}
}
if __name__ == '__main__':
from BaseHTTPServer import HTTPServer
server = HTTPServer(('155.98.36.155', 8787), Ec2MetaHandler)
import socket
server = HTTPServer((socket.gethostbyname(socket.gethostname()), 8787), Ec2MetaHandler)
print 'Starting server, use <Ctrl-C> to stop'
server.serve_forever()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment