Forum Discussion
Julio_Navarro
Jul 18, 2019Cirrostratus
Using an asynchronous task | Creating UCS File
Hi, I am trying the following REST URL to create a task to generate a UCS File: Method: Post
URI: mgmt/tm/task/sys/ucs/
Body: { "command": "save", "name": "UCS01" }
So, I get back: {...
- 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.
Julio_Navarro
Cirrostratus
Hi, we are on version 12.1.3.4
cjunior
Jul 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
DevCentral Quicklinks
* 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
Discover DevCentral Connects