Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better init script #48

Merged
merged 4 commits into from
Sep 13, 2016
Merged

Better init script #48

merged 4 commits into from
Sep 13, 2016

Conversation

ytjohn
Copy link

@ytjohn ytjohn commented Aug 11, 2016

  • enable start/stop/restart and pid monitoring
  • put logs in /var/log/rackhd

https://github.com/RackHD/on-http/issues/416

@ytjohn
Copy link
Author

ytjohn commented Aug 12, 2016

Upgraded script to use start-stop-daemon, ready for merge.

@jlongever
Copy link
Contributor

test this please

@jimturnquist
Copy link
Contributor

I loaded this on an appliance running RackHD and verified that start/stop/restart are working well.

+1

@ytjohn
Copy link
Author

ytjohn commented Aug 24, 2016

I did a bit more looking, and I realized I should add exit levels. Let me push up a commit that includes those.

https://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html

@JenkinsRHD
Copy link
Contributor

*** BUILD #714 ***
Test Name: test_get_sessions
Error Details: (500)
Reason: Internal Server Error
HTTP response headers: HTTPHeaderDict({'Content-Length': '154', 'X-Content-Type-Options': 'nosniff', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'Date': 'Tue, 30 Aug 2016 23:27:09 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html; charset=utf-8'})
HTTP response body: Error: EPROTO: protocol error, stat &#39;/home/vagrant/src/on-http/static/http/redfish/v1/SessionService/Sessions&#39;<br> &nbsp; &nbsp;at Error (native)


Stack Trace: Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/usr/lib/python2.7/unittest/case.py", line 1043, in runTest
    self._testFunc()
  File "/tmp/.venv/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
    compatability.capture_type_error(s_func)
  File "/tmp/.venv/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
    func()
  File "/tmp/.venv/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
    func(test_case.state.get_state())
  File "/home/jenkins/workspace/on-tftp/RackHD/test/tests/api/redfish_1_0/session_service_tests.py", line 69, in test_get_sessions
    redfish().get_sessions()
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_redfish_1_0/apis/redfishv_api.py", line 2601, in get_sessions
    callback=params.get('callback'))
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_redfish_1_0/api_client.py", line 322, in call_api
    response_type, auth_settings, callback)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_redfish_1_0/api_client.py", line 149, in __call_api
    post_params=post_params, body=body)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_redfish_1_0/api_client.py", line 342, in request
    headers=headers)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_redfish_1_0/rest.py", line 184, in GET
    query_params=query_params)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_redfish_1_0/rest.py", line 177, in request
    raise ApiException(http_resp=r)
ApiException: (500)
Reason: Internal Server Error
HTTP response headers: HTTPHeaderDict({'Content-Length': '154', 'X-Content-Type-Options': 'nosniff', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'Date': 'Tue, 30 Aug 2016 23:27:09 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html; charset=utf-8'})
HTTP response body: Error: EPROTO: protocol error, stat &#39;/home/vagrant/src/on-http/static/http/redfish/v1/SessionService/Sessions&#39;<br> &nbsp; &nbsp;at Error (native)




@changev
Copy link
Member

changev commented Sep 5, 2016

test this please

@jimturnquist
Copy link
Contributor

What is left for this to be merged?

@rackhdmirror
Copy link

Build finished.

@ytjohn
Copy link
Author

ytjohn commented Sep 9, 2016

Added error message suggested by @davidzuhn

root@rackhd01:~# /etc/init.d/on-taskgraph start
Service disabled due to absence of /etc/default/on-taskgraph
root@rackhd01:~# touch /etc/default/on-taskgraph
root@rackhd01:~# /etc/init.d/on-taskgraph start
on-taskgraph already running with pid 30132

@rackhdmirror
Copy link

Build finished.

@jimturnquist
Copy link
Contributor

Can we get this one merged? Is there anything left that is needed?

@yyscamper
Copy link
Contributor

👍

@yyscamper yyscamper merged commit 6982ccf into RackHD:master Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants