ceph / chacra

A binary/file REST API to aid in multi-distro|arch|release management
9 stars 18 forks source link

Repos in shaman and chacra is NULL while Finished is SUCCESS? #225

Closed Songweibin closed 7 years ago

Songweibin commented 7 years ago

I make a run.py just like "shaman/config/run.py" to run chacra. After the Jenkins build finished with success, the Repos in shaman and chacra is NULL. Would you tell me why is this or how to start (setup) chacra. Thank you. @andrewschoen @alfredodeza The following is part of log:

andrewschoen commented 7 years ago

The log here makes it look like the binaries were uploaded to chacra correctly. What do you see at these endpoints? Checking these will let you know if the binaries have been uploaded and if the repo was created successfully.

http://192.168.34.252/repos/ceph/master/da06227c7fdd71936fc152e29551268e78541e21/ubuntu/trusty/

http://192.168.34.252/binaries/ceph/master/da06227c7fdd71936fc152e29551268e78541e21/ubuntu/

Also, for status to show up in shaman you need to configure it as a callback_url in chacra using this config option: https://github.com/ceph/chacra/blob/master/deploy/playbooks/roles/common/templates/prod_callbacks.py.j2#L3

That needs to be set to the api/repos/ endpoint of your shaman node.

Songweibin commented 7 years ago

Thanks a lot. I can see these information in that two url, it looks like the binaries have been uploaded and the repo was created successfully.

{"project_name": "ceph", "extra": {"build_url": "http://jenkins.star.com.cn/job/ceph-dev-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=trusty,DIST=trusty/109/", "root_build_cause": "MANUALTRIGGER", "version": "12.0.0-810-gda06227", "node_name": "phy-10.118.203.10-ubuntu-trusty", "job_name": "ceph-dev-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=trusty,DIST=trusty", "package_manager_version": "12.0.0-810-gda06227-1trusty"}, "distro_version": "trusty", "path": null, "flavor": "default", "size": 0, "needs_update": true, "sha1": "da06227c7fdd71936fc152e29551268e78541e21", "is_queued": false, "is_updating": false, "type": "deb", "modified": "2017-03-09 01:57:19.445524", "signed": false, "ref": "master", "archs": ["x86_64"], "distro": "ubuntu"}   

{"trusty": ["x86_64"]}    

But after setup callback_url in chacra, the Jinkens build failed with error code 500, maybe there is something wrong with my configure file.

[requests.packages.urllib3.connectionpool][DEBUG ] Starting new HTTP connection (1): 192.168.34.252
[requests.packages.urllib3.connectionpool][DEBUG ] http://192.168.34.252:80 "HEAD /repos/ceph/master/da06227c7fdd71936fc152e29551268e78541e21/ubuntu/trusty/flavors/default/update HTTP/1.1" 200 0
[chacractl.api.repos][INFO  ] POST: http://192.168.34.252/repos/ceph/master/da06227c7fdd71936fc152e29551268e78541e21/ubuntu/trusty/flavors/default/update
[requests.packages.urllib3.connectionpool][DEBUG ] Starting new HTTP connection (1): 192.168.34.252
[requests.packages.urllib3.connectionpool][DEBUG ] http://192.168.34.252:80 "POST /repos/ceph/master/da06227c7fdd71936fc152e29551268e78541e21/ubuntu/trusty/flavors/default/update HTTP/1.1" 500 7134
[chacractl][ERROR ] RuntimeError: POST for http://192.168.34.252/repos/ceph/master/da06227c7fdd71936fc152e29551268e78541e21/ubuntu/trusty/flavors/default/update failed: 500 

+ rm -fr /tmp/install-deps.4386
Build step 'Execute shell' marked build as failure
Notifying upstream projects of job completion
Finished: FAILURE 
alfredodeza commented 7 years ago

@Songweibin an HTTP 500 means that there was an unhandled error in the Python app (chacra in this case). I would suggest looking at what the logs for chacra look for that POST url:

[chacractl][ERROR ] RuntimeError: POST for http://192.168.34.252/repos/ceph/master/da06227c7fdd71936fc152e29551268e78541e21/ubuntu/trusty/flavors/default/update failed: 500