Hello all,
I'm installing Squad to integrate with Lava server that's already working on production.
Followed instructions from the links below but the first basic test is failing.
It is basically saying that submitjob is not found.
If I go to Squad's /api there is no submitjob there. I can see others (groups,usergroups,projects,builds,testjobs,testruns,tests,suites,environments,backends,emailtemplates,knownissues,patchsources,suitemetadata,annotations,metricthresholds,reports)
Could somebody point me what is missing here? Appreciate any help! Thanks.
_____________________________________ Installation links: https://squad.readthedocs.io/en/latest/install.html https://squad.readthedocs.io/en/latest/lava_usecase.html ____________________________________ Test ERROR:
$ curl localhost:5000/api/submitjob/group-slug/project-slug/ \ --header "Auth-Token: XXXXXXXX" \ --form "backend=lava_swtest" \ --form "definition=@qemu-pipeline-first-job.yaml"
[2019-03-11 15:48:41 +0000] [WARNING] Not Found: /api/submitjob/group-slug/project-slug/
*** Bellow are the info when starting squad, worker etc:*** _____________________________________ $ squad --bind 0.0.0.0:5000 &
Operations to perform: Apply all migrations: admin, auth, authtoken, ci, contenttypes, core, sessions Running migrations: No migrations to apply. [2019-03-11 15:16:30 +0000] [3429] [INFO] Starting gunicorn 19.9.0 [2019-03-11 15:16:30 +0000] [3429] [INFO] Listening at: http://0.0.0.0:5000 (3429) [2019-03-11 15:16:30 +0000] [3429] [INFO] Using worker: sync [2019-03-11 15:16:30 +0000] [3471] [INFO] Booting worker with pid: 3471 [2019-03-11 15:17:00 +0000] [WARNING] Task squad.ci.tasks.poll() consumed 1MB of memory [2019-03-11 15:17:24 +0000] [3429] [CRITICAL] WORKER TIMEOUT (pid:3471) [2019-03-11 15:17:24 +0000] [3471] [INFO] Worker exiting (pid: 3471) [2019-03-11 15:17:24 +0000] [3521] [INFO] Booting worker with pid: 3521
_____________________________________ $ celery -A squad worker
-------------- celery@0938574e5ae7 v4.2.1 (windowlicker) ---- **** ----- --- * *** * -- Linux-4.9.0-8-amd64-x86_64-with-debian-9.7 2019-03-11 13:30:40 -- * - **** --- - ** ---------- [config] - ** ---------- .> app: squad:0x7fd9e5554d68 - ** ---------- .> transport: amqp://guest:**@localhost:5672// - ** ---------- .> results: disabled:// - *** --- * --- .> concurrency: 4 (prefork) -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery
_____________________________________ $ celery -A squad beat
LocalTime -> 2019-03-11 13:31:18 Configuration -> . broker -> amqp://guest:**@localhost:5672// . loader -> celery.loaders.app.AppLoader . scheduler -> celery.beat.PersistentScheduler . db -> celerybeat-schedule . logfile -> [stderr]@%WARNING . maxinterval -> 5.00 minutes (300s)
_____________________________________ $ squad-admin listen
[2019-03-11 13:31:35 +0000] [INFO] Backend lava_swtest starting [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connecting to tcp:// company.net:5500 [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connected to tcp:// company.net:5500
On Mon, 11 Mar 2019 at 17:10, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hello all,
I'm installing Squad to integrate with Lava server that's already working on production.
Followed instructions from the links below but the first basic test is failing.
It is basically saying that submitjob is not found.
If I go to Squad's /api there is no submitjob there. I can see others (groups,usergroups,projects,builds,testjobs,testruns,tests,suites,environments,backends,emailtemplates,knownissues,patchsources,suitemetadata,annotations,metricthresholds,reports)
Could somebody point me what is missing here? Appreciate any help! Thanks.
Installation links: https://squad.readthedocs.io/en/latest/install.html https://squad.readthedocs.io/en/latest/lava_usecase.html ____________________________________ Test ERROR:
$ curl localhost:5000/api/submitjob/group-slug/project-slug/ \ --header "Auth-Token: XXXXXXXX" \ --form "backend=lava_swtest" \ --form "definition=@qemu-pipeline-first-job.yaml"
[2019-03-11 15:48:41 +0000] [WARNING] Not Found: /api/submitjob/group-slug/project-slug/
do you have a group with slug 'group-slug' and project 'project-slug' in this group? If not, that's what's giving you 404. submitjob API is not one of the listed in the /api path.
milosz
*** Bellow are the info when starting squad, worker etc:*** _____________________________________ $ squad --bind 0.0.0.0:5000 &
Operations to perform: Apply all migrations: admin, auth, authtoken, ci, contenttypes, core, sessions Running migrations: No migrations to apply. [2019-03-11 15:16:30 +0000] [3429] [INFO] Starting gunicorn 19.9.0 [2019-03-11 15:16:30 +0000] [3429] [INFO] Listening at: http://0.0.0.0:5000 (3429) [2019-03-11 15:16:30 +0000] [3429] [INFO] Using worker: sync [2019-03-11 15:16:30 +0000] [3471] [INFO] Booting worker with pid: 3471 [2019-03-11 15:17:00 +0000] [WARNING] Task squad.ci.tasks.poll() consumed 1MB of memory [2019-03-11 15:17:24 +0000] [3429] [CRITICAL] WORKER TIMEOUT (pid:3471) [2019-03-11 15:17:24 +0000] [3471] [INFO] Worker exiting (pid: 3471) [2019-03-11 15:17:24 +0000] [3521] [INFO] Booting worker with pid: 3521
$ celery -A squad worker
-------------- celery@0938574e5ae7 v4.2.1 (windowlicker) ---- **** ----- --- * *** * -- Linux-4.9.0-8-amd64-x86_64-with-debian-9.7 2019-03-11 13:30:40 -- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: squad:0x7fd9e5554d68
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery
$ celery -A squad beat
LocalTime -> 2019-03-11 13:31:18 Configuration -> . broker -> amqp://guest:**@localhost:5672// . loader -> celery.loaders.app.AppLoader . scheduler -> celery.beat.PersistentScheduler . db -> celerybeat-schedule . logfile -> [stderr]@%WARNING . maxinterval -> 5.00 minutes (300s)
$ squad-admin listen
[2019-03-11 13:31:35 +0000] [INFO] Backend lava_swtest starting [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connecting to tcp:// company.net:5500 [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connected to tcp:// company.net:5500 _______________________________________________ Squad-dev mailing list Squad-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/squad-dev
Hi Miloz, Thank you for answering!
Yes, the names are correct. I tried creating and using other names as well but the answer is always the same,
Not Found: /api/submitjob/fabsluggroup/fabproj/
Searching for projects I'm receiving this:
curl localhost:5000/api/projects/ {"count":2,"next":null,"previous":null,"results":[{"url":" http://localhost:5000/api/projects/2/%22,%22builds":" http://localhost:5000/api/projects/2/builds/ ","id":2,"full_name":"fabsluggroup/fabproj","slug":"fabproj","name":"fabprojname","is_public":true,"html_mail":true,"moderate_notifications":false,"description":"","important_metadata_keys":"","enabled_plugins_list":"['']","wait_before_notification":null,"notification_timeout":null,"data_retention_days":0,"project_settings":"","group":" http://localhost:5000/api/groups/2/%22,%22custom_email_template%22:null%7D,%...":" http://localhost:5000/api/projects/1/%22,%22builds":" http://localhost:5000/api/projects/1/builds/ ","id":1,"full_name":"group_slug/project_slug","slug":"project_slug","name":"project_slug","is_public":true,"html_mail":true,"moderate_notifications":false,"description":"","important_metadata_keys":"","enabled_plugins_list":"['']","wait_before_notification":null,"notification_timeout":null,"data_retention_days":0,"project_settings":"","group":" http://localhost:5000/api/groups/1/%22,%22custom_email_template%22:null%7D%5...
If I try just submitjob:
curl 0.0.0.0:5000/api/submitjob/
[2019-03-12 10:33:56 +0000] [WARNING] Not Found: /api/submitjob/
Em seg, 11 de mar de 2019 às 19:05, Milosz Wasilewski < milosz.wasilewski@linaro.org> escreveu:
On Mon, 11 Mar 2019 at 17:10, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hello all,
I'm installing Squad to integrate with Lava server that's already working on production.
Followed instructions from the links below but the first basic test is failing.
It is basically saying that submitjob is not found.
If I go to Squad's /api there is no submitjob there. I can see others
(groups,usergroups,projects,builds,testjobs,testruns,tests,suites,environments,backends,emailtemplates,knownissues,patchsources,suitemetadata,annotations,metricthresholds,reports)
Could somebody point me what is missing here? Appreciate any help! Thanks.
Installation links: https://squad.readthedocs.io/en/latest/install.html https://squad.readthedocs.io/en/latest/lava_usecase.html ____________________________________ Test ERROR:
$ curl localhost:5000/api/submitjob/group-slug/project-slug/ \ --header "Auth-Token: XXXXXXXX" \ --form "backend=lava_swtest" \ --form "definition=@qemu-pipeline-first-job.yaml"
[2019-03-11 15:48:41 +0000] [WARNING] Not Found: /api/submitjob/group-slug/project-slug/
do you have a group with slug 'group-slug' and project 'project-slug' in this group? If not, that's what's giving you 404. submitjob API is not one of the listed in the /api path.
milosz
*** Bellow are the info when starting squad, worker etc:*** _____________________________________ $ squad --bind 0.0.0.0:5000 &
Operations to perform: Apply all migrations: admin, auth, authtoken, ci, contenttypes, core, sessions Running migrations: No migrations to apply. [2019-03-11 15:16:30 +0000] [3429] [INFO] Starting gunicorn 19.9.0 [2019-03-11 15:16:30 +0000] [3429] [INFO] Listening at:
(3429) [2019-03-11 15:16:30 +0000] [3429] [INFO] Using worker: sync [2019-03-11 15:16:30 +0000] [3471] [INFO] Booting worker with pid: 3471 [2019-03-11 15:17:00 +0000] [WARNING] Task squad.ci.tasks.poll() consumed 1MB of memory [2019-03-11 15:17:24 +0000] [3429] [CRITICAL] WORKER TIMEOUT (pid:3471) [2019-03-11 15:17:24 +0000] [3471] [INFO] Worker exiting (pid: 3471) [2019-03-11 15:17:24 +0000] [3521] [INFO] Booting worker with pid: 3521
$ celery -A squad worker
-------------- celery@0938574e5ae7 v4.2.1 (windowlicker) ---- **** ----- --- * *** * -- Linux-4.9.0-8-amd64-x86_64-with-debian-9.7 2019-03-11 13:30:40 -- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: squad:0x7fd9e5554d68
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery
$ celery -A squad beat
LocalTime -> 2019-03-11 13:31:18 Configuration -> . broker -> amqp://guest:**@localhost:5672// . loader -> celery.loaders.app.AppLoader . scheduler -> celery.beat.PersistentScheduler . db -> celerybeat-schedule . logfile -> [stderr]@%WARNING . maxinterval -> 5.00 minutes (300s)
$ squad-admin listen
[2019-03-11 13:31:35 +0000] [INFO] Backend lava_swtest starting [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connecting to tcp:// company.net:5500 [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connected to tcp:// company.net:5500 _______________________________________________ Squad-dev mailing list Squad-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/squad-dev
My mistake. I think I know what the problem is. You're missing 2 parameters in the URL path. The entry in the urls.py looks as follows:
url(r'^submitjob/(%s)/(%s)/(%s)/(%s)' % ((slug_pattern,) * 4), ci.submit_job),
So your URL should look sth like: localhost:5000/api/submitjob/group-slug/project-slug/<your version string>/<your environment name>/
Please check the docs for more details: https://squad.readthedocs.io/en/latest/ci.html#ci-job-ref-label
milosz
On Tue, 12 Mar 2019 at 10:38, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hi Miloz, Thank you for answering!
Yes, the names are correct. I tried creating and using other names as well but the answer is always the same,
Not Found: /api/submitjob/fabsluggroup/fabproj/
Searching for projects I'm receiving this:
curl localhost:5000/api/projects/ {"count":2,"next":null,"previous":null,"results":[{"url":"http://localhost:5000/api/projects/2/%22,%22builds%22:%22http://localhost:50...
If I try just submitjob:
curl 0.0.0.0:5000/api/submitjob/ [2019-03-12 10:33:56 +0000] [WARNING] Not Found: /api/submitjob/
Em seg, 11 de mar de 2019 às 19:05, Milosz Wasilewski milosz.wasilewski@linaro.org escreveu:
On Mon, 11 Mar 2019 at 17:10, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hello all,
I'm installing Squad to integrate with Lava server that's already working on production.
Followed instructions from the links below but the first basic test is failing.
It is basically saying that submitjob is not found.
If I go to Squad's /api there is no submitjob there. I can see others (groups,usergroups,projects,builds,testjobs,testruns,tests,suites,environments,backends,emailtemplates,knownissues,patchsources,suitemetadata,annotations,metricthresholds,reports)
Could somebody point me what is missing here? Appreciate any help! Thanks.
Installation links: https://squad.readthedocs.io/en/latest/install.html https://squad.readthedocs.io/en/latest/lava_usecase.html ____________________________________ Test ERROR:
$ curl localhost:5000/api/submitjob/group-slug/project-slug/ \ --header "Auth-Token: XXXXXXXX" \ --form "backend=lava_swtest" \ --form "definition=@qemu-pipeline-first-job.yaml"
[2019-03-11 15:48:41 +0000] [WARNING] Not Found: /api/submitjob/group-slug/project-slug/
do you have a group with slug 'group-slug' and project 'project-slug' in this group? If not, that's what's giving you 404. submitjob API is not one of the listed in the /api path.
milosz
*** Bellow are the info when starting squad, worker etc:*** _____________________________________ $ squad --bind 0.0.0.0:5000 &
Operations to perform: Apply all migrations: admin, auth, authtoken, ci, contenttypes, core, sessions Running migrations: No migrations to apply. [2019-03-11 15:16:30 +0000] [3429] [INFO] Starting gunicorn 19.9.0 [2019-03-11 15:16:30 +0000] [3429] [INFO] Listening at: http://0.0.0.0:5000 (3429) [2019-03-11 15:16:30 +0000] [3429] [INFO] Using worker: sync [2019-03-11 15:16:30 +0000] [3471] [INFO] Booting worker with pid: 3471 [2019-03-11 15:17:00 +0000] [WARNING] Task squad.ci.tasks.poll() consumed 1MB of memory [2019-03-11 15:17:24 +0000] [3429] [CRITICAL] WORKER TIMEOUT (pid:3471) [2019-03-11 15:17:24 +0000] [3471] [INFO] Worker exiting (pid: 3471) [2019-03-11 15:17:24 +0000] [3521] [INFO] Booting worker with pid: 3521
$ celery -A squad worker
-------------- celery@0938574e5ae7 v4.2.1 (windowlicker) ---- **** ----- --- * *** * -- Linux-4.9.0-8-amd64-x86_64-with-debian-9.7 2019-03-11 13:30:40 -- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: squad:0x7fd9e5554d68
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery
$ celery -A squad beat
LocalTime -> 2019-03-11 13:31:18 Configuration -> . broker -> amqp://guest:**@localhost:5672// . loader -> celery.loaders.app.AppLoader . scheduler -> celery.beat.PersistentScheduler . db -> celerybeat-schedule . logfile -> [stderr]@%WARNING . maxinterval -> 5.00 minutes (300s)
$ squad-admin listen
[2019-03-11 13:31:35 +0000] [INFO] Backend lava_swtest starting [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connecting to tcp:// company.net:5500 [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connected to tcp:// company.net:5500 _______________________________________________ Squad-dev mailing list Squad-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/squad-dev
Yes, you're wright!
I thought those parameters where not needed.
From squad/lava integration instructions :
"...whereas build-version and env do not need to exist before submitting a job."
Thank you very much for your help!
Em ter, 12 de mar de 2019 às 12:07, Milosz Wasilewski < milosz.wasilewski@linaro.org> escreveu:
My mistake. I think I know what the problem is. You're missing 2 parameters in the URL path. The entry in the urls.py looks as follows:
url(r'^submitjob/(%s)/(%s)/(%s)/(%s)' % ((slug_pattern,) * 4), ci.submit_job),
So your URL should look sth like: localhost:5000/api/submitjob/group-slug/project-slug/<your version string>/<your environment name>/
Please check the docs for more details: https://squad.readthedocs.io/en/latest/ci.html#ci-job-ref-label
milosz
On Tue, 12 Mar 2019 at 10:38, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hi Miloz, Thank you for answering!
Yes, the names are correct. I tried creating and using other names as
well but the answer is always the same,
Not Found: /api/submitjob/fabsluggroup/fabproj/
Searching for projects I'm receiving this:
curl localhost:5000/api/projects/ {"count":2,"next":null,"previous":null,"results":[{"url":"
http://localhost:5000/api/projects/2/%22,%22builds":" http://localhost:5000/api/projects/2/builds/ ","id":2,"full_name":"fabsluggroup/fabproj","slug":"fabproj","name":"fabprojname","is_public":true,"html_mail":true,"moderate_notifications":false,"description":"","important_metadata_keys":"","enabled_plugins_list":"['']","wait_before_notification":null,"notification_timeout":null,"data_retention_days":0,"project_settings":"","group":" http://localhost:5000/api/groups/2/ ","custom_email_template":null},{"url":" http://localhost:5000/api/projects/1/%22,%22builds":" http://localhost:5000/api/projects/1/builds/ ","id":1,"full_name":"group_slug/project_slug","slug":"project_slug","name":"project_slug","is_public":true,"html_mail":true,"moderate_notifications":false,"description":"","important_metadata_keys":"","enabled_plugins_list":"['']","wait_before_notification":null,"notification_timeout":null,"data_retention_days":0,"project_settings":"","group":" http://localhost:5000/api/groups/1/%22,%22custom_email_template%22:null%7D%5...
If I try just submitjob:
curl 0.0.0.0:5000/api/submitjob/ [2019-03-12 10:33:56 +0000] [WARNING] Not Found: /api/submitjob/
Em seg, 11 de mar de 2019 às 19:05, Milosz Wasilewski <
milosz.wasilewski@linaro.org> escreveu:
On Mon, 11 Mar 2019 at 17:10, Fabiano Ferronato fabiferro@hotmail.com
wrote:
Hello all,
I'm installing Squad to integrate with Lava server that's already
working
on production.
Followed instructions from the links below but the first basic test is failing.
It is basically saying that submitjob is not found.
If I go to Squad's /api there is no submitjob there. I can see others
(groups,usergroups,projects,builds,testjobs,testruns,tests,suites,environments,backends,emailtemplates,knownissues,patchsources,suitemetadata,annotations,metricthresholds,reports)
Could somebody point me what is missing here? Appreciate any help! Thanks.
Installation links: https://squad.readthedocs.io/en/latest/install.html https://squad.readthedocs.io/en/latest/lava_usecase.html ____________________________________ Test ERROR:
$ curl localhost:5000/api/submitjob/group-slug/project-slug/ \ --header "Auth-Token: XXXXXXXX" \ --form "backend=lava_swtest" \ --form "definition=@qemu-pipeline-first-job.yaml"
[2019-03-11 15:48:41 +0000] [WARNING] Not Found: /api/submitjob/group-slug/project-slug/
do you have a group with slug 'group-slug' and project 'project-slug' in this group? If not, that's what's giving you 404. submitjob API is not one of the listed in the /api path.
milosz
*** Bellow are the info when starting squad, worker etc:*** _____________________________________ $ squad --bind 0.0.0.0:5000 &
Operations to perform: Apply all migrations: admin, auth, authtoken, ci, contenttypes,
core,
sessions Running migrations: No migrations to apply. [2019-03-11 15:16:30 +0000] [3429] [INFO] Starting gunicorn 19.9.0 [2019-03-11 15:16:30 +0000] [3429] [INFO] Listening at:
(3429) [2019-03-11 15:16:30 +0000] [3429] [INFO] Using worker: sync [2019-03-11 15:16:30 +0000] [3471] [INFO] Booting worker with pid:
3471
[2019-03-11 15:17:00 +0000] [WARNING] Task squad.ci.tasks.poll()
consumed
1MB of memory [2019-03-11 15:17:24 +0000] [3429] [CRITICAL] WORKER TIMEOUT
(pid:3471)
[2019-03-11 15:17:24 +0000] [3471] [INFO] Worker exiting (pid: 3471) [2019-03-11 15:17:24 +0000] [3521] [INFO] Booting worker with pid:
3521
$ celery -A squad worker
-------------- celery@0938574e5ae7 v4.2.1 (windowlicker) ---- **** ----- --- * *** * -- Linux-4.9.0-8-amd64-x86_64-with-debian-9.7 2019-03-11 13:30:40 -- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: squad:0x7fd9e5554d68
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in
this
worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery
$ celery -A squad beat
LocalTime -> 2019-03-11 13:31:18 Configuration -> . broker -> amqp://guest:**@localhost:5672// . loader -> celery.loaders.app.AppLoader . scheduler -> celery.beat.PersistentScheduler . db -> celerybeat-schedule . logfile -> [stderr]@%WARNING . maxinterval -> 5.00 minutes (300s)
$ squad-admin listen
[2019-03-11 13:31:35 +0000] [INFO] Backend lava_swtest starting [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connecting to tcp:// company.net:5500 [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connected to tcp:// company.net:5500 _______________________________________________ Squad-dev mailing list Squad-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/squad-dev
On Tue, 12 Mar 2019 at 13:22, Fabiano Ferronato fabiferro@hotmail.com wrote:
Yes, you're wright!
I thought those parameters where not needed. From squad/lava integration instructions : "...whereas build-version and env do not need to exist before submitting a job."
It's a bit unfortunate wording I suppose. They will be added to the database when you use them in the URL. But they're mandatory for the URL.
milosz
Thank you very much for your help!
Em ter, 12 de mar de 2019 às 12:07, Milosz Wasilewski milosz.wasilewski@linaro.org escreveu:
My mistake. I think I know what the problem is. You're missing 2 parameters in the URL path. The entry in the urls.py looks as follows:
url(r'^submitjob/(%s)/(%s)/(%s)/(%s)' % ((slug_pattern,) * 4), ci.submit_job),
So your URL should look sth like: localhost:5000/api/submitjob/group-slug/project-slug/<your version string>/<your environment name>/
Please check the docs for more details: https://squad.readthedocs.io/en/latest/ci.html#ci-job-ref-label
milosz
On Tue, 12 Mar 2019 at 10:38, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hi Miloz, Thank you for answering!
Yes, the names are correct. I tried creating and using other names as well but the answer is always the same,
Not Found: /api/submitjob/fabsluggroup/fabproj/
Searching for projects I'm receiving this:
curl localhost:5000/api/projects/ {"count":2,"next":null,"previous":null,"results":[{"url":"http://localhost:5000/api/projects/2/%22,%22builds%22:%22http://localhost:50...
If I try just submitjob:
curl 0.0.0.0:5000/api/submitjob/ [2019-03-12 10:33:56 +0000] [WARNING] Not Found: /api/submitjob/
Em seg, 11 de mar de 2019 às 19:05, Milosz Wasilewski milosz.wasilewski@linaro.org escreveu:
On Mon, 11 Mar 2019 at 17:10, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hello all,
I'm installing Squad to integrate with Lava server that's already working on production.
Followed instructions from the links below but the first basic test is failing.
It is basically saying that submitjob is not found.
If I go to Squad's /api there is no submitjob there. I can see others (groups,usergroups,projects,builds,testjobs,testruns,tests,suites,environments,backends,emailtemplates,knownissues,patchsources,suitemetadata,annotations,metricthresholds,reports)
Could somebody point me what is missing here? Appreciate any help! Thanks.
Installation links: https://squad.readthedocs.io/en/latest/install.html https://squad.readthedocs.io/en/latest/lava_usecase.html ____________________________________ Test ERROR:
$ curl localhost:5000/api/submitjob/group-slug/project-slug/ \ --header "Auth-Token: XXXXXXXX" \ --form "backend=lava_swtest" \ --form "definition=@qemu-pipeline-first-job.yaml"
[2019-03-11 15:48:41 +0000] [WARNING] Not Found: /api/submitjob/group-slug/project-slug/
do you have a group with slug 'group-slug' and project 'project-slug' in this group? If not, that's what's giving you 404. submitjob API is not one of the listed in the /api path.
milosz
*** Bellow are the info when starting squad, worker etc:*** _____________________________________ $ squad --bind 0.0.0.0:5000 &
Operations to perform: Apply all migrations: admin, auth, authtoken, ci, contenttypes, core, sessions Running migrations: No migrations to apply. [2019-03-11 15:16:30 +0000] [3429] [INFO] Starting gunicorn 19.9.0 [2019-03-11 15:16:30 +0000] [3429] [INFO] Listening at: http://0.0.0.0:5000 (3429) [2019-03-11 15:16:30 +0000] [3429] [INFO] Using worker: sync [2019-03-11 15:16:30 +0000] [3471] [INFO] Booting worker with pid: 3471 [2019-03-11 15:17:00 +0000] [WARNING] Task squad.ci.tasks.poll() consumed 1MB of memory [2019-03-11 15:17:24 +0000] [3429] [CRITICAL] WORKER TIMEOUT (pid:3471) [2019-03-11 15:17:24 +0000] [3471] [INFO] Worker exiting (pid: 3471) [2019-03-11 15:17:24 +0000] [3521] [INFO] Booting worker with pid: 3521
$ celery -A squad worker
-------------- celery@0938574e5ae7 v4.2.1 (windowlicker) ---- **** ----- --- * *** * -- Linux-4.9.0-8-amd64-x86_64-with-debian-9.7 2019-03-11 13:30:40 -- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: squad:0x7fd9e5554d68
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery
$ celery -A squad beat
LocalTime -> 2019-03-11 13:31:18 Configuration -> . broker -> amqp://guest:**@localhost:5672// . loader -> celery.loaders.app.AppLoader . scheduler -> celery.beat.PersistentScheduler . db -> celerybeat-schedule . logfile -> [stderr]@%WARNING . maxinterval -> 5.00 minutes (300s)
$ squad-admin listen
[2019-03-11 13:31:35 +0000] [INFO] Backend lava_swtest starting [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connecting to tcp:// company.net:5500 [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connected to tcp:// company.net:5500 _______________________________________________ Squad-dev mailing list Squad-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/squad-dev
Thank you Milosz and Antonio for your answers.
Now I can send and automatically receive status (Fail , Pass) but I'm receiving measurements automatically only for tests the uses one board (DUT).
As I have communication tests using 2 or more boards, there 2 or more lava test IDs, one for each board.
After Squad test submission, in /admin is signed as "fetched"
Failure field says: <Fault -32603: 'Internal Server Error (contact server administrator for details): No TestJob matches the given query.'>
Job id: ['38721.0', '38721.1']
I suppose lava is complaining about the ID list.
Also if I click on Squad /admin job id link : http://lava.company.com/scheduler/job/%5B%2738721.0%27,%20%2738721.1']
Results in : 404 Not found
On Thu, Mar 14, 2019 at 05:49:22PM +0100, Fabiano Ferronato wrote:
Thank you Milosz and Antonio for your answers.
Now I can send and automatically receive status (Fail , Pass) but I'm receiving measurements automatically only for tests the uses one board (DUT).
As I have communication tests using 2 or more boards, there 2 or more lava test IDs, one for each board.
After Squad test submission, in /admin is signed as "fetched"
Failure field says: <Fault -32603: 'Internal Server Error (contact server administrator for details): No TestJob matches the given query.'>
Job id: ['38721.0', '38721.1']
I suppose lava is complaining about the ID list.
Also if I click on Squad /admin job id link : http://lava.company.com/scheduler/job/%5B%2738721.0%27,%20%2738721.1']
I don't think we support multinode jobs at the moment. we would need to modify squad to handle job_id being a list instead of a single value. the current behaviour is clearly broken at the moment. :-/
On Tue, Mar 12, 2019 at 11:38:44AM +0100, Fabiano Ferronato wrote:
Hi Miloz, Thank you for answering!
Yes, the names are correct. I tried creating and using other names as well but the answer is always the same,
Not Found: /api/submitjob/fabsluggroup/fabproj/
Searching for projects I'm receiving this:
curl localhost:5000/api/projects/ {"count":2,"next":null,"previous":null,"results":[{"url":" http://localhost:5000/api/projects/2/%22,%22builds":" http://localhost:5000/api/projects/2/builds/ ","id":2,"full_name":"fabsluggroup/fabproj","slug":"fabproj","name":"fabprojname","is_public":true,"html_mail":true,"moderate_notifications":false,"description":"","important_metadata_keys":"","enabled_plugins_list":"['']","wait_before_notification":null,"notification_timeout":null,"data_retention_days":0,"project_settings":"","group":" http://localhost:5000/api/groups/2/%22,%22custom_email_template%22:null%7D,%...":" http://localhost:5000/api/projects/1/%22,%22builds":" http://localhost:5000/api/projects/1/builds/ ","id":1,"full_name":"group_slug/project_slug","slug":"project_slug","name":"project_slug","is_public":true,"html_mail":true,"moderate_notifications":false,"description":"","important_metadata_keys":"","enabled_plugins_list":"['']","wait_before_notification":null,"notification_timeout":null,"data_retention_days":0,"project_settings":"","group":" http://localhost:5000/api/groups/1/%22,%22custom_email_template%22:null%7D%5...
If I try just submitjob:
curl 0.0.0.0:5000/api/submitjob/
[2019-03-12 10:33:56 +0000] [WARNING] Not Found: /api/submitjob/
just /api/submitjob/ is not defined, you need to use the full URL to submit a job:
/api/submitjob/${group}/${project}/${build}/${environment}