Skip to content

Conversation

@pengz1
Copy link
Member

@pengz1 pengz1 commented Apr 20, 2017

Changes include:

  1. Existing secure_erase.py use a progress notification payload like:
    {"taskID": xxx, "progress": {"value":0, "maximum"}}
    Our latest progress notification payload require payload to be like:
    {"taskID": xxx, "value":0, "maximum"}
    Update secure_erase.py to adopt latest payload format.
  2. Set default secure erase in Progress class, otherwise progress notification may not posted to RackHD
  3. Other changes include:
    Change Progress class to new type;
    Correct Message to message;
    Set default pass_count to 1.

@pengz1
Copy link
Member Author

pengz1 commented Apr 20, 2017

@JenkinsRHD
Copy link
Contributor

BUILD on-http #110 : FAILURE

BUILD on-http #110 Error Logs ▼Test Name: test_nodes_discovery Error Details: timeout waiting for task discovery -------------------- >> begin captured logging << -------------------- tests.api.v2_0.nodes_tests: INFO: Wait start time: 2017-04-20 06:31:36.880172 amqp: DEBUG: Start from server, version: 0.9, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2013 GoPivotal, Inc.', u'capabilities': {u'exchange_exchange_bindings': True, u'connection.blocked': True, u'authentication_failure_close': True, u'basic.nack': True, u'consumer_priorities': True, u'consumer_cancel_notify': True, u'publisher_confirms': True}, u'platform': u'Erlang/OTP', u'version': u'3.2.4'}, mechanisms: [u'AMQPLAIN', u'PLAIN'], locales: [u'en_US'] amqp: DEBUG: Open OK! kombu: INFO: Starting AMQP worker -> graph.finished.*> amqp: DEBUG: Start from server, version: 0.9, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2013 GoPivotal, Inc.', u'capabilities': {u'exchange_exchange_bindings': True, u'connection.blocked': True, u'authentication_failure_close': True, u'basic.nack': True, u'consumer_priorities': True, u'consumer_cancel_notify': True, u'publisher_confirms': True}, u'platform': u'Erlang/OTP', u'version': u'3.2.4'}, mechanisms: [u'AMQPLAIN', u'PLAIN'], locales: [u'en_US'] amqp: DEBUG: Open OK! kombu.mixins: INFO: Connected to amqp://guest:**@127.0.0.1:9091// amqp: DEBUG: using channel_id: 1 amqp: DEBUG: Channel open tests.api.v2_0.nodes_tests: INFO: { "duration": "0:01:35.776993", "graph_name": "Graph.SKU.Discovery", "route_id": "4556b473-fb23-4d9b-b9c8-f24e4858911d", "status": "succeeded" } modules.worker: ERROR: subtask timeout after 1200 seconds, (id=discovery), stopping.. kombu: INFO: Stopping AMQP worker -> graph.finished.*> modules.worker: INFO: stopping subtask for discovery amqp: DEBUG: Closed channel #1 --------------------- >> end captured logging << --------------------- Stack Trace: 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 "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func compatability.capture_type_error(s_func) File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error func() File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func func(test_case.state.get_state()) File "/home/jenkins/workspace/on-http/RackHD/test/tests/api/v2_0/nodes_tests.py", line 126, in test_nodes_discovery message='timeout waiting for task {0}'.format(self.__task.id)) File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/asserts.py", line 67, in assert_false raise ASSERTION_ERROR(message) 'timeout waiting for task discovery\n-------------------- >> begin captured logging << --------------------\ntests.api.v2_0.nodes_tests: INFO: Wait start time: 2017-04-20 06:31:36.880172\namqp: DEBUG: Start from server, version: 0.9, properties: {u\'information\': u\'Licensed under the MPL. See http://www.rabbitmq.com/\', u\'product\': u\'RabbitMQ\', u\'copyright\': u\'Copyright (C) 2007-2013 GoPivotal, Inc.\', u\'capabilities\': {u\'exchange_exchange_bindings\': True, u\'connection.blocked\': True, u\'authentication_failure_close\': True, u\'basic.nack\': True, u\'consumer_priorities\': True, u\'consumer_cancel_notify\': True, u\'publisher_confirms\': True}, u\'platform\': u\'Erlang/OTP\', u\'version\': u\'3.2.4\'}, mechanisms: [u\'AMQPLAIN\', u\'PLAIN\'], locales: [u\'en_US\']\namqp: DEBUG: Open OK!\nkombu: INFO: Starting AMQP worker -> graph.finished.*>\namqp: DEBUG: Start from server, version: 0.9, properties: {u\'information\': u\'Licensed under the MPL. See http://www.rabbitmq.com/\', u\'product\': u\'RabbitMQ\', u\'copyright\': u\'Copyright (C) 2007-2013 GoPivotal, Inc.\', u\'capabilities\': {u\'exchange_exchange_bindings\': True, u\'connection.blocked\': True, u\'authentication_failure_close\': True, u\'basic.nack\': True, u\'consumer_priorities\': True, u\'consumer_cancel_notify\': True, u\'publisher_confirms\': True}, u\'platform\': u\'Erlang/OTP\', u\'version\': u\'3.2.4\'}, mechanisms: [u\'AMQPLAIN\', u\'PLAIN\'], locales: [u\'en_US\']\namqp: DEBUG: Open OK!\nkombu.mixins: INFO: Connected to amqp://guest:**@127.0.0.1:9091//\namqp: DEBUG: using channel_id: 1\namqp: DEBUG: Channel open\ntests.api.v2_0.nodes_tests: INFO: {\n "duration": "0:01:35.776993",\n "graph_name": "Graph.SKU.Discovery",\n "route_id": "4556b473-fb23-4d9b-b9c8-f24e4858911d",\n "status": "succeeded"\n}\nmodules.worker: ERROR: subtask timeout after 1200 seconds, (id=discovery), stopping..\nkombu: INFO: Stopping AMQP worker -> graph.finished.*>\nmodules.worker: INFO: stopping subtask for discovery\namqp: DEBUG: Closed channel #1\n--------------------- >> end captured logging << ---------------------'

payload["progress"]["percentage"] = str("%.2f" % total_percent) + "%"
payload["progress"]["value"] = int(total_percent)
payload["percentage"] = str("%.2f" % total_percent) + "%"
payload["value"] = int(total_percent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In latest progress design, the property percentage will be ignored, any progress need be split into value and maximum. In your case, you could set a constant maximum as 100.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maximum is 100, percentage was already there, I just sent in case progress can save calculation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, make sense

@pengz1
Copy link
Member Author

pengz1 commented Apr 21, 2017

test this please

@JenkinsRHD
Copy link
Contributor

BUILD on-http #112 : FAILURE

BUILD on-http #112 Error Logs ▼Test Name: test_get_chassis Error Details: (404) Reason: Not Found HTTP response headers: HTTPHeaderDict({'Content-Length': '741', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"2e5-OO3M52R7fe0YaANvCMSCx5D3CGg"', 'Date': 'Fri, 21 Apr 2017 06:35:06 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'}) HTTP response body: {"error":{"code":"Base.1.0.GeneralError","message":"A general error has occurred. See ExtendedInfo for more information.","@Message.ExtendedInfo":[{"@odata.type":"#Message.1.0.0.Message","MessageId":"Base.1.0.Messages.InvalidObject","Description":"Indicates that the object in question is invalid according to the implementation. Examples include a firmware update malformed URI.","Message":"The object at %1 is invalid.","Resolution":"Either the object is malformed or the URI is not correct. Correct the condition and resubmit the request if it failed.","Severity":"Critical"},{"MessageId":"RackHD.1.0.DetailedErrorMessage","Message":"No Catalogs Found for Source (ohai).","Description":"Contains the detailed error message contents"}]}}

-------------------- >> begin captured logging << --------------------
tests.api.redfish_1_0.chassis_tests: INFO: 58f9a431a587ae8c0b189f7f
tests.api.redfish_1_0.chassis_tests: INFO: 58f9a42ca587ae8c0b189f78
--------------------- >> end captured logging << ---------------------
Stack Trace: 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 "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
compatability.capture_type_error(s_func)
File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
func()
File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
func(test_case.state.get_state())
File "/home/jenkins/workspace/on-http/RackHD/test/tests/api/redfish_1_0/chassis_tests.py", line 48, in test_get_chassis
redfish().get_chassis(dataId)
File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/apis/redfishv_api.py", line 890, in get_chassis
callback=params.get('callback'))
File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/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 "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/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 "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/api_client.py", line 342, in request
headers=headers)
File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/rest.py", line 184, in GET
query_params=query_params)
File "/home/jenkins/workspace/on-http/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_redfish_1_0/rest.py", line 177, in request
raise ApiException(http_resp=r)
'(404)\nReason: Not Found\nHTTP response headers: HTTPHeaderDict({'Content-Length': '741', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"2e5-OO3M52R7fe0YaANvCMSCx5D3CGg"', 'Date': 'Fri, 21 Apr 2017 06:35:06 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})\nHTTP response body: {"error":{"code":"Base.1.0.GeneralError","message":"A general error has occurred. See ExtendedInfo for more information.","@Message.ExtendedInfo":[{"@odata.type":"#Message.1.0.0.Message","MessageId":"Base.1.0.Messages.InvalidObject","Description":"Indicates that the object in question is invalid according to the implementation. Examples include a firmware update malformed URI.","Message":"The object at %1 is invalid.","Resolution":"Either the object is malformed or the URI is not correct. Correct the condition and resubmit the request if it failed.","Severity":"Critical"},{"MessageId":"RackHD.1.0.DetailedErrorMessage","Message":"No Catalogs Found for Source (ohai).","Description":"Contains the detailed error message contents"}]}}\n\n-------------------- >> begin captured logging << --------------------\ntests.api.redfish_1_0.chassis_tests: INFO: 58f9a431a587ae8c0b189f7f\ntests.api.redfish_1_0.chassis_tests: INFO: 58f9a42ca587ae8c0b189f78\n--------------------- >> end captured logging << ---------------------'

@pengz1 pengz1 force-pushed the Update-secure-erase-script-to-support-latest-notification branch from 930614e to 000630b Compare April 21, 2017 09:22
 * Update notification payload to accommodate latest notification API
   design
 * Add default parameters for progress class
 * Correct Message to message
@yyscamper yyscamper merged commit 8e3af39 into RackHD:master Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants