Forum Discussion
Using an asynchronous task | Creating UCS File
- Apr 24, 2020
; to close the loop on this one, it appears that you the part that was missing in your request is the -X PUT request, to set the state to 'VALIDATING'
# curl -k -u admin:admin -H 'Content-Type: application/json' -X PUT -d '{"_taskState":"VALIDATING"}' https://localhost/mgmt/tm/task/sys/ucs/1563478591515657?ver=12.1.3.4 { "code":202, "message":"Task will execute asynchronously.", "errorStack":[] }
That is the request which is necessary to cause any task to begin processing. Until then, the task is waiting for any number of additional tasks to be added together.
Hi,
Tested on v15.0.0 looks OK for me.
What BIG-IP version are you trying to?
curl -k -u admin:admin -X POST -H 'Content-Type: application/json' -d '{ "command": "save", "name": "UCS01" }' https://localhost/mgmt/tm/task/sys/ucs
{
"_taskId": 1563470408202544,
"_taskState": "STARTED",
"_taskTimeInStateMs": 0,
"_taskResultLink": "https://localhost/mgmt/tm/task/sys/ucs/1563470408202544/result?ver=15.0.0",
"selfLink": "https://localhost/mgmt/tm/task/sys/ucs/1563470408202544?ver=15.0.0"
}
curl -k -u admin:admin -H 'Content-Type: application/json' -X PUT -d '{"_taskState":"VALIDATING"}' https://localhost/mgmt/tm/task/sys/ucs/1563470408202544
{
"code": 202,
"message": "Task will execute asynchronously.",
"errorStack": []
}
curl -k -u admin:admin https://localhost/mgmt/tm/task/sys/ucs/1563470408202544
{
"selfLink": "https://localhost/mgmt/tm/task/sys/ucs/1563470408202544?ver=15.0.0",
"_taskId": 1563470408202544,
"_taskState": "COMPLETED",
"_taskTimeInStateMs": 13000,
"_taskResultLink": "https://localhost/mgmt/tm/task/sys/ucs/1563470408202544/result?ver=15.0.0"
}
# ls -la /var/local/ucs
total 484520
drwxr-xr-x. 3 root root 4096 Jul 18 14:29 .
drwxr-xr-x. 9 root root 4096 Jun 28 12:23 ..
-rw-r--r--. 1 root root 195341011 Jun 28 12:23 config.ucs
-r--r--r--. 1 root root 114 May 10 05:57 cs_backup_rotate.conf
drwxr-xr-x. 2 root root 4096 Jun 28 12:43 tmp
-rw-r--r--. 1 root root 300789664 Jul 18 14:15 UCS01.ucs
- Julio_NavarroJul 18, 2019Cirrostratus
Hi, we are on version 12.1.3.4
- cjuniorJul 18, 2019Nacreous
Buddy, It works for me on v12.1.3.4.
# curl -k -u admin:admin -X POST -H 'Content-Type: application/json' -d '{ "command": "save", "name": "UCS01" }' https://localhost/mgmt/tm/task/sys/ucs { "_taskId":1563478591515657, "_taskState":"STARTED", "_taskTimeInStateMs":0, "_taskResultLink":"https://localhost/mgmt/tm/task/sys/ucs/1563478591515657/result?ver=12.1.3.4", "selfLink":"https://localhost/mgmt/tm/task/sys/ucs/1563478591515657?ver=12.1.3.4" } # curl -k -u admin:admin -H 'Content-Type: application/json' -X PUT -d '{"_taskState":"VALIDATING"}' https://localhost/mgmt/tm/task/sys/ucs/1563478591515657?ver=12.1.3.4 { "code":202, "message":"Task will execute asynchronously.", "errorStack":[] } # curl -k -u admin:admin https://localhost/mgmt/tm/task/sys/ucs/1563478591515657?ver=12.1.3.4 { "selfLink":"https://localhost/mgmt/tm/task/sys/ucs/1563478591515657?ver=12.1.3.4", "_taskId":1563478591515657, "_taskState":"COMPLETED", "_taskTimeInStateMs":10000, "_taskResultLink":"https://localhost/mgmt/tm/task/sys/ucs/1563478591515657/result?ver=12.1.3.4" } # ls -la /var/local/ucs total 3976 drwxr-xr-x. 3 root root 4096 2019-07-18 12:37 . drwxr-xr-x. 9 root root 4096 2019-07-18 12:20 .. -r--r--r--. 1 root root 114 2018-04-10 13:52 cs_backup_rotate.conf drwxr-xr-x. 2 root root 4096 2019-07-18 12:22 tmp -rw-r--r--. 1 root root 4049809 2019-07-18 12:37 UCS01.ucs
So, if you can save UCS from another way, we can't confirm issues during save the file.
It sounds strange to me 😞
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com