Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeing issues while adding a new policy in PolicyBucket.Add () and deploy the UCS Server Profile #174

Open
mdk85-start opened this issue Nov 15, 2024 · 0 comments

Comments

@mdk85-start
Copy link

mdk85-start commented Nov 15, 2024

Describe the bug

We have encountered an issue when attempting to add an existing policy on an existing UCS server profile for CIMC. Please find below the workflow for the code.

Add the policy in policyBucket
Set-IntersightServerProfile on the UCS Server Profile
Add Start-Sleep for ~5 secs
Deploy the UCS Server Profile

Previously, it was not necessary to include Start-Sleep when adding a policy to policyBucket and then deploying the UCS Server Profile.

To Reproduce
Steps to reproduce the behavior

    foreach ($serverProfile in $serverProfiles) {

      $serverProfileDetail = Get-IntersightServerProfile -Name $serverProfile -Organization $org
    $checkvKVMPolicy = $serverProfileDetail.PolicyBucket | Where-Object{$_.ActualInstance.ObjectType -eq "KvmPolicy"}
    $serverProfileName = $serverProfileDetail.Name
    $serverProfileDetail.PolicyBucket.Add($kvmPolicy)
         
     $ScheduledActions11 = Initialize-IntersightPolicyScheduledAction -Action "Deploy"
     $ScheduledActions21 = Initialize-IntersightPolicyScheduledAction -Action "Activate" -ProceedOnReboot $false

      $serverProfileKVM = @()
          
      $serverProfileKVM = $serverProfileDetail | Set-IntersightServerProfile 

       Start-Sleep -s 5

       Write-Host "Update policy bucket for UCS Server Profile $serverProfileName ....  `n" -ForegroundColor Green

       $serverProfileKVM | Set-IntersightServerProfile -ScheduledActions @($ScheduledActions11, $ScheduledActions21) -Action "Deploy" | Out-Null

       Write-Host "Re-Deploying UCS Server Profile $serverProfileName ....  `n" -ForegroundColor Yellow

       Start-Sleep -s 5

     }

**

Version used

Intersight PowerShell Module version (1.0.11.18775) and (1.0.11.2024100405)

Expected behavior
Can the back-end handle the pause instead of adding it in the scripts?

Screenshots

Additional context
Add any other context about the problem here.

@mdk85-start mdk85-start reopened this Nov 15, 2024
@mdk85-start mdk85-start changed the title Issue Reoccuring - No longer able to add policies using PolicyBucket.Add() on UCS Server Profile Seeing issues while adding a new policy in PolicyBucket.Add () and deploy the UCS Server Profile Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant