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

Need better command line parsing for the cmd driver of congo #6

Open
neo954 opened this issue Nov 8, 2017 · 0 comments
Open

Need better command line parsing for the cmd driver of congo #6

neo954 opened this issue Nov 8, 2017 · 0 comments

Comments

@neo954
Copy link

neo954 commented Nov 8, 2017

This bug is against goconserver Version: 0.1, BuildTime: 2017-11-07T23:00:03-0500 Commit: 906cd810f009dd1b0b22a75ea0c4efc1cbb2e840 running on a ppc64le Red Hat 7.4 Linux environment.

The recreation steps

# congo create c910f03c17 driver=cmd ondemand=false --params cmd="ipmitool -I lanplus -H 50.3.17.1 -U '' -P PASSW0RD sol activate"
Created
# congo console c910f03c17
goconserver(2017-11-08 03:41:59): Hello 127.0.0.1:57410, welcome to the session of c910f03c18
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
goconserver(2017-11-08 03:42:09): Hello 127.0.0.1:57412, welcome to the session of c910f03c18
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
goconserver(2017-11-08 03:42:19): Hello 127.0.0.1:57414, welcome to the session of c910f03c17
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
goconserver(2017-11-08 03:42:29): Hello 127.0.0.1:57416, welcome to the session of c910f03c17
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
goconserver(2017-11-08 03:42:39): Hello 127.0.0.1:57418, welcome to the session of c910f03c17
Error: Unable to establish IPMI v2 / RMCP+ session
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
goconserver(2017-11-08 03:42:49): Hello 127.0.0.1:57420, welcome to the session of c910f03c17
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
goconserver(2017-11-08 03:42:59): Hello 127.0.0.1:57422, welcome to the session of c910f03c17
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
goconserver(2017-11-08 03:43:09): Hello 127.0.0.1:57424, welcome to the session of c910f03c17
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
goconserver(2017-11-08 03:43:19): Hello 127.0.0.1:57426, welcome to the session of c910f03c17
Could not receive message, error: EOF
Could not receive message, error: EOF
Session is teminated unexpectedly, retrying....
The connection is disconnected

What actually happened

The intention is to run the command, ipmitool -I lanplus -H 50.3.17.1 -U '' -P PASSW0RD sol activate, under the cmd driver of congo. Please notice, in the ipmitool command, there is an empty string as one of its command line argument. For pass such an empty string in bash, it can be done with single quotes. But for congo, there is no way to do this.

Currently, there is no way to pass a space character inside the command line argument. Space character is always used as the separation character.

What is expected

  • Escape character support for command line parse, or single quotes, double quotes support.
  • Maybe, use bash -c 'exec run a command' to run the command, in this way, bash will do the command line parsing works.
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

No branches or pull requests

1 participant