-
Notifications
You must be signed in to change notification settings - Fork 77
Create a task and a job to discover the UCS cisco rackmount nodes #386
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
Conversation
|
test this please |
a61a688 to
cdcc533
Compare
spec/lib/jobs/ucs-discovery-spec.js
Outdated
| ], | ||
| Servers: [ | ||
| { | ||
| relative_path: "/sys/rack-unit-7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier 'relative_path' is not in camel case.
| .then(function(response){ | ||
| if (response.httpStatusCode > 206) { | ||
| logger.error('HTTP Error', response); | ||
| throw new UcsError(response.body); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'UcsError' is not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you forget to inject UcsError?
lib/utils/job-utils/ucs-tool.js
Outdated
|
|
||
| var logger = Logger.initialize(ucsToolFactory); | ||
|
|
||
| function ucsError(message) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ucsError' is defined but never used.
lib/utils/job-utils/ucs-tool.js
Outdated
|
|
||
| function ucsError(message) { | ||
| Errors.BaseError.call(this, message); | ||
| Error.captureStackTrace(this, ucsError); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a strict mode function is executed using function invocation, its 'this' value will be undefined.
| var logger = Logger.initialize(ucsToolFactory); | ||
|
|
||
| function ucsError(message) { | ||
| Errors.BaseError.call(this, message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a strict mode function is executed using function invocation, its 'this' value will be undefined.
| * @description discovers all the rackmount servers in the Cisco UCS | ||
| */ | ||
| UcsDiscoveryJob.prototype.createRackmounts = function (root) { | ||
| var self = this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'self' is defined but never used.
lib/jobs/ucs-discovery.js
Outdated
| return waterline.nodes.create(node) | ||
| .catch (function(error){ | ||
| return logger.warning('Failed to create new UCS node, with error details: ' + error.details) | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
|
|
||
| return waterline.nodes.create(node) | ||
| .catch (function(error){ | ||
| return logger.warning('Failed to create new UCS node, with error details: ' + error.details) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
| config: "", | ||
| service: 'ucs-obm-service' | ||
| }; | ||
| node.obm.push(obm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
| logger.warning('No rackmount servers found Found'); | ||
| return Promise.resolve(); | ||
| } | ||
| var url= this.settings.protocol +"://"+ this.settings.host+ ":" + this.settings.port+ "/rackmount"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
lib/jobs/ucs-discovery.js
Outdated
| var password = this.settings.password; | ||
| var host = this.settings.ucs; | ||
| var url= "/login?host=" + host+ "&user="+ username + "&password=" + password; | ||
| var d ={} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
|
|
||
| return self.logIn() | ||
| .then(function () { | ||
| return self.getRoot() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
cdcc533 to
9d03d38
Compare
9d03d38 to
81bf38d
Compare
7099f8d to
64888c2
Compare
lib/jobs/ucs-discovery.js
Outdated
| logger.warning('No rackmount servers found Found'); | ||
| return Promise.resolve(); | ||
| } | ||
| var baseurl= this.settings.protocol+"://"+this.settings.host+ ":"+this.settings.port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
| logger.warning('No rackmount servers found Found'); | ||
| return Promise.resolve(); | ||
| } | ||
| var baseurl= this.settings.protocol+"://"+this.settings.host+ ":"+this.settings.port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
| var username = this.settings.username; | ||
| var password = this.settings.password; | ||
| var ucs = this.settings.ucs; | ||
| var baseurl= this.settings.protocol+"://"+this.settings.host+ ":"+this.settings.port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
| var username = this.settings.username; | ||
| var password = this.settings.password; | ||
| var ucs = this.settings.ucs; | ||
| var baseurl= this.settings.protocol+"://"+this.settings.host+ ":"+this.settings.port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
BUILD on-tasks #1902 : ABORTED
|
64888c2 to
a2e7051
Compare
| }); | ||
| }; | ||
|
|
||
| return UcsDiscoveryJob; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrecoverable syntax error. (98% scanned).
| }); | ||
| }; | ||
|
|
||
| return UcsDiscoveryJob; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrecoverable syntax error. (98% scanned).
| }); | ||
|
|
||
| }); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary semicolon.
| }); | ||
|
|
||
| }); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary semicolon.
lib/jobs/ucs-discovery.js
Outdated
| assert.object(res); | ||
| return res.body; | ||
| }) | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
Expected an identifier and instead saw ')'.
lib/jobs/ucs-discovery.js
Outdated
| .then(function(res) { | ||
| assert.object(res); | ||
| return res.body; | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
| .then(function(res) { | ||
| assert.object(res); | ||
| return res.body; | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
a2e7051 to
afe7b48
Compare
|
BUILD on-tasks #1903 : ABORTED
|
|
BUILD on-tasks #1904 : UNSTABLE
BUILD unit-tests #11138 Error Logs ▼Test Name: Ucs Discovery Job usc discovery should successfully run the job Error Details: expected stub to have been called at least once, but it was never called Stack Trace: AssertionError: expected stub to have been called at least once, but it was never calledBUILD CIT #568 Error Logs ▼Test Name: test_node_create Error Details: ('Connection aborted.', BadStatusLine("''",)) -------------------- >> begin captured logging << -------------------- tests.api.v1_1.nodes_tests: INFO: Creating node (name=test_switch_node) --------------------- >> 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-tasks/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-tasks/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-tasks/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-tasks/RackHD/test/tests/api/v1_1/nodes_tests.py", line 193, in test_node_create Nodes().nodes_post(n) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/apis/nodes_api.py", line 197, in nodes_post callback=params.get('callback')) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/api_client.py", line 322, in call_api response_type, auth_settings, callback) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/api_client.py", line 149, in __call_api post_params=post_params, body=body) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/api_client.py", line 358, in request body=body) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/rest.py", line 208, in POST body=body) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/rest.py", line 143, in request headers=headers) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/request.py", line 70, in request **urlopen_kw) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/request.py", line 148, in request_encode_body return self.urlopen(method, url, **extra_kw) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 244, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 649, in urlopen _stacktrace=sys.exc_info()[2]) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/util/retry.py", line 347, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 379, in _make_request httplib_response = conn.getresponse(buffering=True) File "/usr/lib/python2.7/httplib.py", line 1051, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 415, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 379, in _read_status raise BadStatusLine(line) '(\'Connection aborted.\', BadStatusLine("\'\'",))\n-------------------- >> begin captured logging << --------------------\ntests.api.v1_1.nodes_tests: INFO: Creating node (name=test_switch_node)\n--------------------- >> end captured logging << ---------------------'BUILD SmokeTest-FIT #164 Error Logs ▼Test Name: test_node_create Error Details: ('Connection aborted.', BadStatusLine("''",)) -------------------- >> begin captured logging << -------------------- tests.api.v1_1.nodes_tests: INFO: Creating node (name=test_switch_node) --------------------- >> 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-tasks/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-tasks/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-tasks/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-tasks/RackHD/test/tests/api/v1_1/nodes_tests.py", line 193, in test_node_create Nodes().nodes_post(n) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/apis/nodes_api.py", line 197, in nodes_post callback=params.get('callback')) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/api_client.py", line 322, in call_api response_type, auth_settings, callback) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/api_client.py", line 149, in __call_api post_params=post_params, body=body) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/api_client.py", line 358, in request body=body) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/rest.py", line 208, in POST body=body) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/on_http_api1_1/rest.py", line 143, in request headers=headers) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/request.py", line 70, in request **urlopen_kw) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/request.py", line 148, in request_encode_body return self.urlopen(method, url, **extra_kw) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 244, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 649, in urlopen _stacktrace=sys.exc_info()[2]) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/util/retry.py", line 347, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/home/jenkins/workspace/on-tasks/RackHD/test/.venv/on-build-config/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 379, in _make_request httplib_response = conn.getresponse(buffering=True) File "/usr/lib/python2.7/httplib.py", line 1051, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 415, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 379, in _read_status raise BadStatusLine(line) '(\'Connection aborted.\', BadStatusLine("\'\'",))\n-------------------- >> begin captured logging << --------------------\ntests.api.v1_1.nodes_tests: INFO: Creating node (name=test_switch_node)\n--------------------- >> end captured logging << ---------------------' |
afe7b48 to
05e019d
Compare
spec/lib/jobs/ucs-discovery-spec.js
Outdated
| ucsJob.logIn() | ||
| .then(function(data) { | ||
| expect(data).to.deep.equal("cookie"); | ||
| });; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary semicolon.
spec/lib/jobs/ucs-discovery-spec.js
Outdated
| // Copyright 2017, EMC, Inc. | ||
|
|
||
| 'use strict'; | ||
| ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary semicolon.
05e019d to
a9449cd
Compare
|
BUILD on-tasks #1907 : FAILURE
|
|
@RackHD/corecommitters @RackHD/veyron |
|
BUILD on-tasks #1908 : UNSTABLE
BUILD CIT #572 Error Logs ▼Test Name: test_nodes_discovery Error Details: timeout waiting for task discovery -------------------- >> begin captured logging << -------------------- tests.api.v1_1.nodes_tests: INFO: Wait start time: 2017-01-19 16:53:25.900611 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.v1_1.nodes_tests: INFO: { "duration": "0:01:31.016927", "graph_name": "Graph.SKU.Discovery", "route_id": "06fbd6e7-c718-48f0-b6db-ec328c8baf4f", "status": "succeeded", "target": "5881356840e3f1e70833fb9e" } 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-tasks/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-tasks/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-tasks/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-tasks/RackHD/test/tests/api/v1_1/nodes_tests.py", line 123, in test_nodes_discovery message='timeout waiting for task {0}'.format(self.__task.id)) File "/home/jenkins/workspace/on-tasks/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.v1_1.nodes_tests: INFO: Wait start time: 2017-01-19 16:53:25.900611\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.v1_1.nodes_tests: INFO: {\n "duration": "0:01:31.016927",\n "graph_name": "Graph.SKU.Discovery",\n "route_id": "06fbd6e7-c718-48f0-b6db-ec328c8baf4f",\n "status": "succeeded",\n "target": "5881356840e3f1e70833fb9e"\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 << ---------------------'Test Name: teardown Test Name: teardown Test Name: test_node_catalogs Test Name: test_tag_create Stack Trace: Traceback (most recent call last): Test Name: get_sku_nodes Stack Trace: Traceback (most recent call last): Test Name: post_skupacks -------------------- >> begin captured logging << -------------------- BUILD SmokeTest-FIT #168 Error Logs ▼Test Name: test_nodes_discovery Error Details: timeout waiting for task discovery -------------------- >> begin captured logging << -------------------- tests.api.v1_1.nodes_tests: INFO: Wait start time: 2017-01-19 16:53:25.900611 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.v1_1.nodes_tests: INFO: { "duration": "0:01:31.016927", "graph_name": "Graph.SKU.Discovery", "route_id": "06fbd6e7-c718-48f0-b6db-ec328c8baf4f", "status": "succeeded", "target": "5881356840e3f1e70833fb9e" } 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-tasks/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-tasks/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-tasks/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-tasks/RackHD/test/tests/api/v1_1/nodes_tests.py", line 123, in test_nodes_discovery message='timeout waiting for task {0}'.format(self.__task.id)) File "/home/jenkins/workspace/on-tasks/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.v1_1.nodes_tests: INFO: Wait start time: 2017-01-19 16:53:25.900611\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.v1_1.nodes_tests: INFO: {\n "duration": "0:01:31.016927",\n "graph_name": "Graph.SKU.Discovery",\n "route_id": "06fbd6e7-c718-48f0-b6db-ec328c8baf4f",\n "status": "succeeded",\n "target": "5881356840e3f1e70833fb9e"\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 << ---------------------'Test Name: teardown Test Name: teardown Test Name: test_node_catalogs Test Name: test_tag_create Stack Trace: Traceback (most recent call last): Test Name: get_sku_nodes Stack Trace: Traceback (most recent call last): Test Name: post_skupacks -------------------- >> begin captured logging << -------------------- |
|
test this please |
brianparry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tannoa2 Looks good, I just have a few minor questions and comments.
lib/jobs/ucs-discovery.js
Outdated
| var password = this.settings.password; | ||
| var host = this.settings.ucs; | ||
| var url= "/login?host=" + host+ "&user="+ username + "&password=" + password; | ||
| var d ={}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tannoa2 This might be a little prettier if you assigned these properties within the object literal. e.g.
var d = {
username: this.settings.username,
password: this.settings.password
};
| * @description Log into the UCS microservice | ||
| */ | ||
| UcsDiscoveryJob.prototype.logIn = function () { | ||
| var username = this.settings.username; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tannoa2 Not sure if these are checked elsewhere (schema maybe?) but it would probably make sense to add asserts to make sure these settings have the expected type (e.g. assert.string(username)). This applies to a few of the functions in this file.
lib/jobs/ucs-discovery.js
Outdated
| var password = this.settings.password; | ||
| var ucs = this.settings.ucs; | ||
|
|
||
| if (!_.has(root, 'Servers')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tannoa2 I recommend wrapping this code in a Promise.try to avoid throwing a synchronous error. This ensures that this function will always return a Promise.
lib/jobs/ucs-discovery.js
Outdated
| config: "", | ||
| service: 'ucs-obm-service' | ||
| }; | ||
| node.obm.push(obm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tannoa2 No need to do a push here. You can declare obm before node and set use obm: [ obm ] to set the obm property.
| .then(function(response){ | ||
| if (response.httpStatusCode > 206) { | ||
| logger.error('HTTP Error', response); | ||
| throw new UcsError(response.body); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you forget to inject UcsError?
lib/utils/job-utils/ucs-tool.js
Outdated
| return http.runRequest(); | ||
| }) | ||
| .then(function(response){ | ||
| if (response.httpStatusCode > 206) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tannoa2 > 299?
| logger.error('HTTP Error', response); | ||
| throw new UcsError(response.body); | ||
| } | ||
| if (response.body.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tannoa2 Do you need to check for Content-Type: 'application/json'?
a9449cd to
1ea21e0
Compare
lib/jobs/ucs-discovery.js
Outdated
| } | ||
| }) | ||
| .then(function(){ | ||
| return self.ucs.clientRequest(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
| } | ||
| }) | ||
| .then(function(){ | ||
| return self.ucs.clientRequest(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
lib/jobs/ucs-discovery.js
Outdated
| var username = this.settings.username; | ||
| var password = this.settings.password; | ||
| var host = this.settings.ucs; | ||
| var url= "/login?host=" + host+ "&user="+ username + "&password=" + password;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary semicolon.
lib/jobs/ucs-discovery.js
Outdated
| var username = this.settings.username; | ||
| var password = this.settings.password; | ||
| var host = this.settings.ucs; | ||
| var url= "/login?host=" + host+ "&user="+ username + "&password=" + password;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary semicolon.
|
BUILD on-tasks #1939 : UNSTABLE
BUILD unit-tests #11293 Error Logs ▼Test Name: Ucs Discovery Job "before each" hook for "should successfully run the job" Error Details: undefined (string) is required Stack Trace: AssertionError: undefined (string) is required at AssertService.(anonymous function) [as string] (node_modules/on-core/lib/common/assert.js:30:28) at new UcsDiscoveryJob (lib/jobs/ucs-discovery.js:9:1229) at Context.<anonymous> (spec/lib/jobs/ucs-discovery-spec.js:50:18) |
1ea21e0 to
c7c7d76
Compare
d235b5d to
cfe0e64
Compare
|
BUILD on-tasks #1947 : FAILURE
|
Create a task and a job to discover the UCS cisco rackmount nodes
No description provided.