-
Notifications
You must be signed in to change notification settings - Fork 77
Added a job to enable arbitrary ssh commands #150
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
|
|
||
| if (!_.contains(self.acceptedCodes, sshData.exitCode)) { | ||
| reject(sshData); | ||
| } |
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.
Not an exclusive if block, if/else instead?
|
lib/jobs/ssh-job.js
Outdated
| }); | ||
| ssh.connect({ | ||
| host: sshSettings.host, | ||
| port: 22, |
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.
Can this be another input like "sshSettings.port" with a default to 22?
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.
Seconded.
|
👎 because I see a lot duplicated code between this job and linux-command, linux-catalog job, this need a code refactor |
|
Meanwhile, @VulpesArtificem could you please add some description and user cases for the PR in future, so reviewer can understand your design before digging into the code. I guess the ssh job is used for the inband mangement, right? |
a7471a2 to
410c88c
Compare
|
|
||
| it('should take an arbitrary number of parsed tasks and return '+ | ||
| 'an array of promises to catalog them', function() { | ||
| var tasks = Array(5).fill({source: 'test', data:'stdout', store: true}); |
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 'new' prefix when invoking a constructor.
180c4ac to
2aa8c15
Compare
| var tasks = [ | ||
| {source: 'test', data:'stdout', store: true} | ||
| {source: 'test', data:'stdout', store: true} | ||
| {source: 'test', data:'stdout', store: true} |
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.
Expected ')' and instead saw '{'.
Missing semicolon.
Label 'source' on test statement.
Unrecoverable syntax error. (62% scanned).
2aa8c15 to
d2c9f4a
Compare
|
test this please |
|
|
👍 |
|
test this please |
1 similar comment
|
test this please |
| ssh.on('ready', function() { | ||
| ssh.exec(cmdObj.cmd, function(err, stream) { | ||
| if (err) { reject(err); } | ||
| stream.on('close', function(code) { |
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.
Are we going to get fatal errors if we don't handle 'error' on this stream object?
|
@VulpesArtificem can you add a quick test for the dpkg -l parser? |
|
Otherwise, 👍 |
9f4966d to
e1d40cd
Compare
|
d209825 to
4e3a677
Compare
|
👍 |
|
Disable ACPI in kernel
@RackHD/corecommitters @heckj
Added a job for executing arbitrary commands over ssh and cataloging the results. Additionally, refactored linux catalog/command jobs into a command-util which also supports the ssh-job
requires RackHD/on-core#116