{"action":"created","issue":{"url":"https://api.github.com/repos/kimchi-project/ginger/issues/37","labels_url":"https://api.github.com/repos/kimchi-project/ginger/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/kimchi-project/ginger/issues/37/comments","events_url":"https://api.github.com/repos/kimchi-project/ginger/issues/37/events","html_url":"https://github.com/kimchi-project/ginger/issues/37","id":115049967,"number":37,"title":"Retrieval of tasks using Task API fails","user":{"login":"pawankg","id":12508064,"avatar_url":"https://avatars.githubusercontent.com/u/12508064?v=3","gravatar_id":"","url":"https://api.github.com/users/pawankg","html_url":"https://github.com/pawankg","followers_url":"https://api.github.com/users/pawankg/followers","following_url":"https://api.github.com/users/pawankg/following{/other_user}","gists_url":"https://api.github.com/users/pawankg/gists{/gist_id}","starred_url":"https://api.github.com/users/pawankg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawankg/subscriptions","organizations_url":"https://api.github.com/users/pawankg/orgs","repos_url":"https://api.github.com/users/pawankg/repos","events_url":"https://api.github.com/users/pawankg/events{/privacy}","received_events_url":"https://api.github.com/users/pawankg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-04T13:17:12Z","updated_at":"2015-11-04T13:39:06Z","closed_at":null,"body":"Retrieval of tasks using Task API fails\r\n\r\nI am using task API for DASD formatting. It is generating a task when I run the code.\r\n[root@zfwcec164 ginger]# curl -k -u root -H \"Content-Type: application/json\" -H \"Accept: application/json\" -X POST -d '{\"blk_size\" : \"4096\"}' https://9.152.151.164:8001/plugins/ginger/dasddevs/0.0.0224/format\r\n\r\n{\r\n  \"status\":\"running\",\r\n  \"message\":\"OK\",\r\n  \"id\":\"1\",\r\n  \"target_uri\":\"/dasddevs/dasdc/blksize/4096\"\r\n}\r\n\r\nBut when I am trying to retrieve task status using task api to see whether it is finished or not, it is returning an empty list.\r\n[root@zfwcec164 ginger]# curl -k -u root -H \"Content-Type: application/json\" -H \"Accept: application/json\" 'https://9.152.151.164:8001/tasks'                 \r\n[]\r\n\r\nWhen I am trying to retrieve task status with task api using task_id, it is giving this error.\r\n[root@zfwcec164 ~]# curl -k -u root -H \"Content-Type: application/json\" -H \"Accept: application/json\" 'https://9.152.151.164:8001/tasks/1'                    \r\n\r\n{\r\n  \"reason\":\"WOKOBJST0001E: Unable to find 1 in datastore\",\r\n  \"code\":\"404 Not Found\"\r\n} \r\n\r\nBut then I tried looking at task data stored in wok objectstore_ginger database. From database, I can see the information saved inside the database but the task api is not able to fetch it.  \r\n\r\n[root@zfwcec164 ginger]# sqlite3 /var/lib/wok/objectstore_ginger\r\nSQLite version 3.7.17 2013-05-20 00:56:22\r\nEnter \".help\" for instructions\r\nEnter SQL statements terminated with a \";\"\r\nsqlite> .dump\r\nPRAGMA foreign_keys=OFF;\r\nBEGIN TRANSACTION;\r\nCREATE TABLE objects\r\n                (id TEXT, type TEXT, json TEXT, PRIMARY KEY (id, type));\r\nINSERT INTO \"objects\" VALUES('1','task','{\"status\": \"finished\", \"message\": \"OK\", \"id\": \"1\", \"target_uri\": \"/dasddevs/dasdc/blksize/4096\"}');\r\nCOMMIT;\r\nsqlite> ;\r\nsqlite> .quit\r\n\r\nIt seems that Task API is trying to fetch task information from wok objectstore and not from wok objectstore_ginger, due to which it is returning empty list.\r\n\r\nDo some update in code is required or am I accessing the task in some wrong way here?"},"comment":{"url":"https://api.github.com/repos/kimchi-project/ginger/issues/comments/153721850","html_url":"https://github.com/kimchi-project/ginger/issues/37#issuecomment-153721850","issue_url":"https://api.github.com/repos/kimchi-project/ginger/issues/37","id":153721850,"user":{"login":"danielhb","id":866780,"avatar_url":"https://avatars.githubusercontent.com/u/866780?v=3","gravatar_id":"","url":"https://api.github.com/users/danielhb","html_url":"https://github.com/danielhb","followers_url":"https://api.github.com/users/danielhb/followers","following_url":"https://api.github.com/users/danielhb/following{/other_user}","gists_url":"https://api.github.com/users/danielhb/gists{/gist_id}","starred_url":"https://api.github.com/users/danielhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielhb/subscriptions","organizations_url":"https://api.github.com/users/danielhb/orgs","repos_url":"https://api.github.com/users/danielhb/repos","events_url":"https://api.github.com/users/danielhb/events{/privacy}","received_events_url":"https://api.github.com/users/danielhb/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T13:39:06Z","updated_at":"2015-11-04T13:39:06Z","body":"I'll require some digging because TBH I have no idea. I don't know if this is even a Ginger issue or a WoK one.\r\n\r\nI'll ask the WoK maintainer (Aline) about it. "}}