p.spawn(teuthology.provision.reimage, ctx, machine)
for machine in updatekeys_machines:
keys.do_update_keys([machine])
+ ops.update_nodes(reimage_machines + machines_to_update)
elif ctx.unlock:
if ctx.owner is None and user is None:
from teuthology.config import config
from teuthology.contextutil import safe_while
from teuthology.task import console_log
+import teuthology.task.internal
+from teuthology.misc import canonicalize_hostname
import util
import keys
log = logging.getLogger(__name__)
+def update_nodes(nodes):
+ for node in nodes:
+ remote = teuthology.orchestra.remote.Remote(
+ canonicalize_hostname(node))
+ inventory_info = remote.inventory_info
+ teuthology.lock.ops.update_inventory(inventory_info)
+
+
def lock_many_openstack(ctx, num, machine_type, user=None, description=None,
arch=None):
os_type = teuthology.provision.get_distro(ctx)
machine)
unlock_one(ctx, machine, user)
ok_machs = keys.do_update_keys(ok_machs.keys())[1]
+ update_nodes(ok_machs)
return ok_machs
elif machine_type in reimage_types:
reimaged = dict()
p.spawn(teuthology.provision.reimage, ctx, machine)
reimaged[machine] = machines[machine]
reimaged = keys.do_update_keys(reimaged.keys())[1]
+ update_nodes(reimaged)
return reimaged
return machines
elif response.status_code == 503: