You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Check if the cloud account is Managed and if so, confirm that server level automation (Servermill) has completed
351
+
#
352
+
FunctionTest-rsManaged
353
+
{
354
+
if(Test-rsCloud)
355
+
{
356
+
if ((Get-rsAccountDetails).isManaged)
357
+
{
358
+
$automationComlete=$false
359
+
$Timeout=1800# Default timeout set to about 30 minutes
360
+
do
361
+
{
362
+
Write-EventLog-LogName DevOps -Source rsCommon -EntryType Information -EventId 1000-Message "Testing for rax_service_level_automation."
363
+
if ((Get-rsXenInfo-value "vm-data/user-metadata/rax_service_level_automation") -ne"Complete")
364
+
{
365
+
$automationComlete=$false
366
+
Write-EventLog-LogName DevOps -Source rsCommon -EntryType Information -EventId 1000-Message "Waiting for rax_service_level_automation."
367
+
Start-Sleep-Seconds 60
368
+
$Timeout= ($Timeout-60)
369
+
}
370
+
else
371
+
{
372
+
$automationComlete=$true
373
+
Write-EventLog-LogName DevOps -Source rsCommon -EntryType Information -EventId 1000-Message "rax_service_level_automation complete."
374
+
}
375
+
}
376
+
while (($automationComlete-eq$false) -or ($Timeout-lt0))
377
+
378
+
if (($automationComlete-eq$false) -and ($Timeout-lt0))
379
+
{
380
+
Write-EventLog-LogName DevOps -Source rsCommon -EntryType Error -EventId 1000-Message "rax_service_level_automation process timed out - some or all Rackspace cloud automation steps did not complete."
381
+
}
354
382
}
355
-
else {
356
-
$exists=$false
357
-
Write-EventLog-LogName DevOps -Source rsCommon -EntryType Information -EventId 1000-Message "Testing for rax_service_level_automation."
358
-
}
359
-
if ( $exists )
383
+
else
360
384
{
361
-
do {
362
-
Write-EventLog-LogName DevOps -Source rsCommon -EntryType Information -EventId 1000-Message "Waiting for rax_service_level_automation."
363
-
Start-Sleep-Seconds 30
364
-
}
365
-
while ( (Test-Path"C:\Windows\Temp\rs_managed_cloud_automation_complete.txt" ) -eq$false)
366
-
Write-EventLog-LogName DevOps -Source rsCommon -EntryType Information -EventId 1000-Message "rax_service_level_automation complete."
385
+
Write-EventLog-LogName DevOps -Source rsCommon -EntryType Information -EventId 1000-Message "Account is not managed, skipping wait for rax_service_level_automation"
0 commit comments