HPE OneView
1827821 Members
1864 Online
109969 Solutions
New Discussion

Creating new server profile from template error

 
BradV
Esteemed Contributor

Creating new server profile from template error

I have a server profile object in a BASH variable that I created from a template (GET /rest/server-profiles/{uuid}/new-profile) and modified for the given server.  When I attempt to apply the profile to the server: 

curl --insecure \
     --include \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${NEW_PROF}" \
     --request GET ${OneView}/rest/server-profiles

I am getting back: 

"taskState": "Error",
"taskStatus": "Unable to create server profile: this-host",
"taskErrors": [
  {
    "recommendedActions": "Try the operation again.  If the problem persists, contact your authorized support representative and provide them with a support dump." ],
  "message": "Unable to apply firmware baseline settings on the server due to an unexpected problem encoutered while writing the settings on the server.",
"errorCode": "RIS_OSSETTINGS_APPLY_INTERNAL_ERROR" } ],

So, I define a DATA variable: 

DATA='[{ "op": "replace", "path": "/firmware/reapplyState", "value": "ApplyPending" }]"

 and get the server profile id from the task uri: 

SRV_PROF_ID=$(curl --insecure \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --request GET ${OneView}/rest/tasks/${TASK_ID} | jq -r '.associatedResource | .resourceUri')

and then attempt to reapply the firmware: 

curl --insecure \
     --include \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${DATA}" \
     --request PATCH ${OneView}${SRV_PROF_ID} | jq -r '.'

I'm getting back: 

parse error: Invalid numeric literal at line 1, column 9

I don't have any numerics in DATA.  Not sure what it is referring to?  

1 REPLY 1
ChrisLynch
HPE Pro

Re: Creating new server profile from template error

What is the generation of server you attempted to deploy the profile to?  If it is a Gen8 or Gen9 server, I would suggest you review this Customer Advisory.  If it is a Gen10 server, I would review this Customer Advisory.

 

And you have a typo on the re-apply profile operation attempt:

 

DATA='[{ "op": "replace", "path": "/firmware/reapplyState", "value": "ApplyPending" }]"

 

 

Your end quote is a double quote, where you started with a single quote right after the = sign.

 

DATA='[{ "op": "replace", "path": "/firmware/reapplyState", "value": "ApplyPending" }]'

 

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo