Older Windows agents are very picky about the data sent to it. It also requires the public key for the password exchange to be in a string format and not an integer.
Also, because of the length of time it takes Windows to boot fully (including a full reboot), the reset network command gets lost. Move this to after we've made sure the agent is up and running successfully.
This commit is contained in:
commit
d86af556f4
@ -340,6 +340,7 @@ class VMOps(object):
|
||||
_check_agent_version()
|
||||
_inject_files()
|
||||
_set_admin_password()
|
||||
self.reset_network(instance, vm_ref)
|
||||
return True
|
||||
except Exception, exc:
|
||||
LOG.warn(exc)
|
||||
@ -349,9 +350,6 @@ class VMOps(object):
|
||||
|
||||
timer.f = _wait_for_boot
|
||||
|
||||
# call to reset network to configure network from xenstore
|
||||
self.reset_network(instance, vm_ref)
|
||||
|
||||
return timer.start(interval=0.5, now=True)
|
||||
|
||||
def _handle_spawn_error(self, vdis, spawn_error):
|
||||
|
@ -72,7 +72,9 @@ def key_init(self, arg_dict):
|
||||
info to be passed, such as passwords. Returns the shared
|
||||
secret key value.
|
||||
"""
|
||||
pub = int(arg_dict["pub"])
|
||||
# WARNING: Some older Windows agents will crash if the public key isn't
|
||||
# a string
|
||||
pub = arg_dict["pub"]
|
||||
arg_dict["value"] = json.dumps({"name": "keyinit", "value": pub})
|
||||
request_id = arg_dict["id"]
|
||||
arg_dict["path"] = "data/host/%s" % request_id
|
||||
|
Loading…
x
Reference in New Issue
Block a user