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

PoSH Update-OVServerProfile Staging Updates - Error #662

Open
ChrisLynchHPE opened this issue Nov 4, 2023 Discussed in #661 · 3 comments
Open

PoSH Update-OVServerProfile Staging Updates - Error #662

ChrisLynchHPE opened this issue Nov 4, 2023 Discussed in #661 · 3 comments
Assignees
Labels
6.60 Impacts HPE OneView 6.60 library 8.00 Impacts HPE OneView 8.00 library 8.30 Impacts HPE OneView 8.30 library 8.40 Impacts HPE OneView 8.40 8.50 Impacts HPE OneView 8.50 8.60 Impacts HPE OneView 8.60 Bug Impact - Medium Server Profiles

Comments

@ChrisLynchHPE
Copy link
Member

Discussed in #661

Originally posted by KeithS011 November 3, 2023

Expected Behavior

Update-OVServerProfile -ServerName "Server" -Stage -Confirm:$false

should stage updates that require reboot, as of 8.30.3660.2366 update. Such as Firmware baseline when reapplying from the ServerProfileTemplate, and apply them when the server is next powered down via HPEOV.

Actual Behavior

errorCode":"ServerNotOffWithCauseForNoServerChange","errorSource":null,"message":"The requested changes cannot be applied because {\"name\":\"Redacted, bay 12\", \"uri\":\"/rest/server-hardware/Redacted\"} is powered on and the changes made to the following sections can only be applied when the power is off: \n* Firmware","nestedErrors":[],"recommendedActions":["Power off the server or adjust the settings and retry. {\"name\":\"Learn more\", \"uri\":\"/doc#/cic/profiles/edit\"}"]}],"taskOutput":[],"taskState":"Error","taskStatus":"Unable to edit server profile: Redacted."

Steps to reproduce

Update-OVServerProfile -ServerName "Server" -Stage -Confirm:$false

Get-OVCommandTrace-log.txt

Version Information

HPE OneView PowerShell Library Version (Get-HPOVVersion or $PSLibraryVersion):

ApplianceVersion: 8.30.01.482646.00 8.30.3660.2366
C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3660.2366

Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Microsoft Windows 10.0.14393
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Log has been sanitized.

@ChrisLynchHPE ChrisLynchHPE self-assigned this Nov 4, 2023
@ChrisLynchHPE ChrisLynchHPE added 8.30 Impacts HPE OneView 8.30 library Bug Server Profiles Impact - Medium 8.40 Impacts HPE OneView 8.40 8.60 Impacts HPE OneView 8.60 labels Nov 4, 2023
@ChrisLynchHPE
Copy link
Member Author

I found and have resolved the issue. It was a logic validation issue. Here is what the experience will look like:

[PS] C:\Users\user> Get-OVServerProfile -name prf1

Name Status  Compliance   Template Server Hardware Server Hardware Type Enclosure Group Affinity
---- ------  ----------   -------- --------------- -------------------- --------------- --------
prf1 Warning NotCompliant spt1     172.18.31.1     DL380 Gen10

[PS] C:\Users\user> Get-OVServerProfile -name prf1 | Update-OVServerProfile -stage

Confirm
Are you sure you want to perform this action?
Performing the operation "Update Server Profile configuration. WARNING: Depending on this action, there might be a
brief outage." on target "prf1".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Appliance             Name                 Owner         Created              Duration TaskState PercentComplete
---------             ----                 -----         -------              -------- --------- ---------------
OV5.doctors-lab.local Update from template Administrator 11/8/2023 5:40:59 PM 00:00:01 Completed 100

[PS] C:\Users\user> Get-OVServerProfile -name prf1

Name Status  Compliance        Template Server Hardware Server Hardware Type Enclosure Group Affinity
---- ------  ----------        -------- --------------- -------------------- --------------- --------
prf1 Warning PendingCompliance spt1     172.18.31.1     DL380 Gen10

@ChrisLynchHPE ChrisLynchHPE added 6.60 Impacts HPE OneView 6.60 library 8.00 Impacts HPE OneView 8.00 library 8.50 Impacts HPE OneView 8.50 labels Nov 8, 2023
@KeithS011
Copy link

was this not updated in the 8.30 module download ?
I grabbed it again today, and still getting the same error as before.

$stage = Get-OVServerProfile -Name $SP | Update-OVServerProfile -stage

$stage.taskErrors

data :
details :
errorCode : ServerNotOffWithCauseForNoServerChange
errorSource :
message : The requested changes cannot be applied because {"name":"redacted, bay 1", "uri":"/rest/server-hardware/redacted"} is powered on and the changes made to the
following sections can only be applied when the power is off:
* Firmware
nestedErrors : {}
recommendedActions : {Power off the server or adjust the settings and retry. {"name":"Learn more", "uri":"/doc#/cic/profiles/edit"}}

ChrisLynchHPE added a commit that referenced this issue Sep 11, 2024
- Initial HPE OneView 8.60 library release.
- Support for PowerShell 5 and 6 is now deprecated and is no longer supported.
- [#647] Fixed ConvertTo-OVPowerShellScript mishandling BIOS consistency policy when parsing a server profile template.
- [#642] Fixed incorrect use of internal variable within Update-OVServerFirmware.
- [#654] Fixed ConvertTo-OVPowerShellScript mishandling Tunnel uplink set resources.
- [#656] Fixed parameter evaluation bug with Update-OVServerProfile and the -Stage parameter.
- Added Cmdlets to manage HPE GreenLake for Compute Ops Managment - OneView Edition service configuration and status from the appliance.
- Added workaround to supporting Gen10 Plus V2 platforms and supporting firmware management.
- Added Update-OVRemoteSupportEntitlement Cmdlet to refresh remote support entitlement data with the backend.
- Updated Get-OVRemoteSupportSetting and Get-OVRemoteSupportEntitlementStatus to support interconnect resources.
- Added HPE GreenLake for Compute Ops Management - OneView Edition Cmdlets; Get-OVComputeOpsManagement, Set-OVComputeOpsManagement, Connect-OVComputeOpsManagement, Enable-OVComputeOpsManagement, Disable-OVComputeOpsManagement
- Added Alletra 9000 FC-NVMe support to Add-OVStorageSystem.
- Added MegaRAID support to New-OVServerProfileLogicalDiskController.
- Added Get-OVServerHardwareAvailableController to return discovered disk drive controllers for volume servers (DL, ML, Apollo) and drives.  New classes added HPEOneView.Servers.StorageController and HPEOneView.Servers.PhysicalDrive.
- Added the ability to specify controller returned from Get-OVServerHardwareAvailableController.
- Added the ability to specify specific drives in New-OVServerProfileLogicalDisk after invoking Get-OVServerHardwareAvailableController to get list of controllers and available drives that are part of the HPEOneView.Servers.StorageController.Drives property.
- Updated core library to handle web proxy in a more efficient method.
- Updated core library to use TLS1.2 only.
- [#659] Enhanced Show-OVFirmwareReport to provide available baseline version.
- [#662] Resolved issue with Update-OVServerProfile not handling -Stage parameter correctly.
- Enhanced New-OVBackup to require passphrase to create backup file.
- Enhanced Send-OVRequest to handle appliance certificate validation errors correctly.
- Changed Get-OVApplianceUpdateSchedule to Get-OVFirmwareBundleUpdateSchedule.  Alias to original Cmdlet is available for backwards compatibility.  Please update your scripts.
- Changed Set-OVApplianceUpdateSchedule to Set-OVFirmwareBundleUpdateSchedule.  Alias to original Cmdlet is available for backwards compatibility.  Please update your scripts.
- Changed Get-OVApplianceUpdate to Get-OVFirmwareBundleUpdate.  Alias to original Cmdlet is available for backwards compatibility.  Please update your scripts.
- Changed HPEOneView.Appliance.ApplianceUpdate class to HPEOneView.Appliance.FirmwareBundleUpdate.
- Changed HPEOneView.Appliance.ApplianceUpdateSchedule class to HPEOneView.Appliance.FirmwareBundleUpdateSchedule.
- Removed -PreviewOnly switch parameter from Update-OVServerFirmware, as the API doesn't provide a compliance feature.
- Fixed an issue with Set-OVFirmwareBundleUpdateSchedule where the value for -Time was not properly handled when converting to UTC time.

Signed-off-by: Chris Lynch <[email protected]>
@ChrisLynchHPE
Copy link
Member Author

This was resolved in the recently released 8.60, 9.00 and 9.10 PowerShell libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.60 Impacts HPE OneView 6.60 library 8.00 Impacts HPE OneView 8.00 library 8.30 Impacts HPE OneView 8.30 library 8.40 Impacts HPE OneView 8.40 8.50 Impacts HPE OneView 8.50 8.60 Impacts HPE OneView 8.60 Bug Impact - Medium Server Profiles
Projects
None yet
Development

No branches or pull requests

2 participants