Skip to content

Conversation

@iceiilin
Copy link
Member

Fix ODR-605 about "Web UI / POST BIOSImage / API not selecting latest image with same basename uploaded for install".
Metadata array got from on-http file service is in the time order based on waterline mechanism. Change waterline find method to return the list in sorted manner.

@pengz1
Copy link
Member

pengz1 commented Apr 13, 2016

+1

@iceiilin iceiilin force-pushed the bugfix/odr-605-latest-file branch from 3e350b4 to c05431c Compare April 13, 2016 09:04
@yyscamper
Copy link
Contributor

👍

@yyscamper
Copy link
Contributor

test this please

@JenkinsRHD
Copy link
Contributor

*** BUILD #879 ***
Test Name: test_node_workflows_del_active
Error Details: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Length': '78', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"4e-Xxmiju9lCKAw5ARFfsA7XQ"', 'Date': 'Wed, 13 Apr 2016 09:43:54 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"TaskCancellationError: Failed to cancel 570e14d7be559ee2b2770aed"}

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-http/RackHD/test/tests/api/v2_0/nodes_tests.py", line 340, in test_node_workflows_del_active
    raise e
ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Length': '78', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"4e-Xxmiju9lCKAw5ARFfsA7XQ"', 'Date': 'Wed, 13 Apr 2016 09:43:54 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"TaskCancellationError: Failed to cancel 570e14d7be559ee2b2770aed"}



@iceiilin
Copy link
Member Author

test this please

@JenkinsRHD
Copy link
Contributor

*** BUILD #880 ***
Test Name: test_node_workflows_post
Error Details: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Length': '128', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"80-7OjUGBy4o6RiaRnKGDICnw"', 'Date': 'Wed, 13 Apr 2016 10:24:43 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"BadRequestError: required option user for task Task.Obm.Ipmi.CreateSettings in graph Graph.Obm.Ipmi.CreateSettings"}

-------------------- >> begin captured logging << --------------------
tests.api.v2_0.workflows_tests: INFO: starting amqp listener for node 570e1d368a4ca30a08d58c3e
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!
--------------------- >> 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 "/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-http/RackHD/test/tests/api/v2_0/workflows_tests.py", line 189, in test_node_workflows_post
    Api().nodes_post_workflow_by_id(id, name='Graph.noop-example', body={})
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/apis/api_api.py", line 2594, in nodes_post_workflow_by_id
    callback=params.get('callback'))
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_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_api2_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_api2_0/api_client.py", line 358, in request
    body=body)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 208, in POST
    body=body)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 177, in request
    raise ApiException(http_resp=r)
'(400)\nReason: Bad Request\nHTTP response headers: HTTPHeaderDict({\'Content-Length\': \'128\', \'X-Powered-By\': \'Express\', \'Connection\': \'keep-alive\', \'ETag\': \'W/"80-7OjUGBy4o6RiaRnKGDICnw"\', \'Date\': \'Wed, 13 Apr 2016 10:24:43 GMT\', \'Access-Control-Allow-Origin\': \'*\', \'Content-Type\': \'application/json; charset=utf-8\'})\nHTTP response body: {"message":"BadRequestError: required option user for task Task.Obm.Ipmi.CreateSettings in graph Graph.Obm.Ipmi.CreateSettings"}\n\n-------------------- >> begin captured logging << --------------------\ntests.api.v2_0.workflows_tests: INFO: starting amqp listener for node 570e1d368a4ca30a08d58c3e\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!\n--------------------- >> end captured logging << ---------------------'

@iceiilin
Copy link
Member Author

This Jenkins error is generated in API 2.0 workflow tests. I will leave it to @dalebremner for triage.
For this PR, I checked the code repo, and it didn't touch API 2.0 code. It is ready to be merged.

@benbp
Copy link
Contributor

benbp commented Apr 13, 2016

@VulpesArtificem please review.

@iceiilin
Copy link
Member Author

test this please

@JenkinsRHD
Copy link
Contributor

*** BUILD #900 ***
Test Name: test_node_workflows_post
Error Details: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Length': '128', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"80-7OjUGBy4o6RiaRnKGDICnw"', 'Date': 'Thu, 14 Apr 2016 03:10:23 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"BadRequestError: required option user for task Task.Obm.Ipmi.CreateSettings in graph Graph.Obm.Ipmi.CreateSettings"}

-------------------- >> begin captured logging << --------------------
tests.api.v2_0.workflows_tests: INFO: starting amqp listener for node 570f08df1aecbbd007c032f4
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!
--------------------- >> 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 "/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-http/RackHD/test/tests/api/v2_0/workflows_tests.py", line 189, in test_node_workflows_post
    Api().nodes_post_workflow_by_id(id, name='Graph.noop-example', body={})
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/apis/api_api.py", line 2594, in nodes_post_workflow_by_id
    callback=params.get('callback'))
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_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_api2_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_api2_0/api_client.py", line 358, in request
    body=body)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 208, in POST
    body=body)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 177, in request
    raise ApiException(http_resp=r)
'(400)\nReason: Bad Request\nHTTP response headers: HTTPHeaderDict({\'Content-Length\': \'128\', \'X-Powered-By\': \'Express\', \'Connection\': \'keep-alive\', \'ETag\': \'W/"80-7OjUGBy4o6RiaRnKGDICnw"\', \'Date\': \'Thu, 14 Apr 2016 03:10:23 GMT\', \'Access-Control-Allow-Origin\': \'*\', \'Content-Type\': \'application/json; charset=utf-8\'})\nHTTP response body: {"message":"BadRequestError: required option user for task Task.Obm.Ipmi.CreateSettings in graph Graph.Obm.Ipmi.CreateSettings"}\n\n-------------------- >> begin captured logging << --------------------\ntests.api.v2_0.workflows_tests: INFO: starting amqp listener for node 570f08df1aecbbd007c032f4\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!\n--------------------- >> end captured logging << ---------------------'

@geoff-reid
Copy link
Contributor

test this please

@JenkinsRHD
Copy link
Contributor

*** BUILD #901 ***
Test Name: test_node_workflows_post
Error Details: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Length': '128', 'X-Powered-By': 'Express', 'Connection': 'keep-alive', 'ETag': 'W/"80-7OjUGBy4o6RiaRnKGDICnw"', 'Date': 'Thu, 14 Apr 2016 15:09:56 GMT', 'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json; charset=utf-8'})
HTTP response body: {"message":"BadRequestError: required option user for task Task.Obm.Ipmi.CreateSettings in graph Graph.Obm.Ipmi.CreateSettings"}

-------------------- >> begin captured logging << --------------------
tests.api.v2_0.workflows_tests: INFO: starting amqp listener for node 570fb1846d6fd2d407195041
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!
--------------------- >> 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 "/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-http/RackHD/test/tests/api/v2_0/workflows_tests.py", line 189, in test_node_workflows_post
    Api().nodes_post_workflow_by_id(id, name='Graph.noop-example', body={})
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/apis/api_api.py", line 2594, in nodes_post_workflow_by_id
    callback=params.get('callback'))
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_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_api2_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_api2_0/api_client.py", line 358, in request
    body=body)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 208, in POST
    body=body)
  File "/tmp/.venv/local/lib/python2.7/site-packages/on_http_api2_0/rest.py", line 177, in request
    raise ApiException(http_resp=r)
'(400)\nReason: Bad Request\nHTTP response headers: HTTPHeaderDict({\'Content-Length\': \'128\', \'X-Powered-By\': \'Express\', \'Connection\': \'keep-alive\', \'ETag\': \'W/"80-7OjUGBy4o6RiaRnKGDICnw"\', \'Date\': \'Thu, 14 Apr 2016 15:09:56 GMT\', \'Access-Control-Allow-Origin\': \'*\', \'Content-Type\': \'application/json; charset=utf-8\'})\nHTTP response body: {"message":"BadRequestError: required option user for task Task.Obm.Ipmi.CreateSettings in graph Graph.Obm.Ipmi.CreateSettings"}\n\n-------------------- >> begin captured logging << --------------------\ntests.api.v2_0.workflows_tests: INFO: starting amqp listener for node 570fb1846d6fd2d407195041\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!\n--------------------- >> end captured logging << ---------------------'

@iceiilin iceiilin force-pushed the bugfix/odr-605-latest-file branch from 3aeb17d to 3583c88 Compare April 15, 2016 03:54
@iceiilin iceiilin force-pushed the bugfix/odr-605-latest-file branch from 3583c88 to 60c5490 Compare April 15, 2016 05:53
@iceiilin
Copy link
Member Author

To fix the P1 ODR, change the solution to keep the file in the default order and only return the last item in the file array, so that it can pass Jenkins test. I have created a issue in https://github.com/RackHD/on-http/issues/229 to track the previous failure.

@yyscamper yyscamper merged commit 2050382 into RackHD:master Apr 15, 2016
WangWinson added a commit to WangWinson/on-http that referenced this pull request Apr 19, 2016
WangWinson added a commit to WangWinson/on-http that referenced this pull request Apr 27, 2016
benbp pushed a commit to benbp/on-http that referenced this pull request May 17, 2016
@iceiilin iceiilin deleted the bugfix/odr-605-latest-file branch September 4, 2017 07:46
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.

6 participants