Skip to content
Permalink
Browse files

fix: cloud moving to non validated on subsequent M&R runs

Change-Id: I1cba48ae09f2255b8d931a6bf1c4889e293f9a5c
  • Loading branch information
grafuls committed Dec 23, 2019
1 parent 082cc0c commit c2dc994c6f32e00d0b4d523910dd28ff3ded275c
Showing with 4 additions and 4 deletions.
  1. +4 −4 bin/quads-cli
@@ -484,10 +484,6 @@ def main(_args):
# https://projects.theforeman.org/issues/27953#change-127120
semaphore = asyncio.Semaphore(1)
for _cloud, results in _clouds.items():
cloud = Cloud.objects(name=_cloud).first()
has_active_schedule = Schedule.current_schedule(cloud=cloud)
if has_active_schedule:
cloud.update(validated=False)
provisioned = True
tasks = []
switch_tasks = []
@@ -498,6 +494,10 @@ def main(_args):
cloud = Cloud.objects(name=new).first()
logger.info('Moving %s from %s to %s, wipe = %s' % (host, current, new, cloud.wipe))
if not _args.dryrun:
if new != "cloud01":
has_active_schedule = Schedule.current_schedule(cloud=cloud)
if has_active_schedule:
cloud.update(validated=False)
try:
if _args.movecommand == default_move_command:
fn = functools.partial(move_and_rebuild, host, new, semaphore, cloud.wipe)

0 comments on commit c2dc994

Please sign in to comment.
You can’t perform that action at this time.