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

./karaf-client with commands does not (always) work #11

Open
vorburger opened this issue Oct 2, 2018 · 1 comment
Open

./karaf-client with commands does not (always) work #11

vorburger opened this issue Oct 2, 2018 · 1 comment

Comments

@vorburger
Copy link
Contributor

This is OK:

./karaf-client 1 showSvcStatus

but this is NOK:

./karaf-client 1 showSvcStatus --help       
executing "/odlha/karaf/target/assembly/bin/client showSvcStatus --help" on 1.........................................
client: JAVA_HOME not set; results may vary
Apache Karaf client ...

even though this works (except for ODLPARENT-170):

./karaf-client 1                     
executing "/odlha/karaf/target/assembly/bin/client" on 1.........................................
client: JAVA_HOME not set; results may vary
Logging in as karaf
                                                                                           
    ________                       ________                .__  .__       .__     __       
    \_____  \ ______   ____   ____ \______ \ _____  ___.__.|  | |__| ____ |  |___/  |_     
     /   |   \\____ \_/ __ \ /    \ |    |  \\__  \<   |  ||  | |  |/ ___\|  |  \   __\    
    /    |    \  |_> >  ___/|   |  \|    `   \/ __ \\___  ||  |_|  / /_/  >   Y  \  |      
    \_______  /   __/ \___  >___|  /_______  (____  / ____||____/__\___  /|___|  /__|      
            \/|__|        \/     \/        \/     \/\/            /_____/      \/          
                                                                                           

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

Error in initialization script: /odlha/karaf/target/assembly/etc/shell.init.script: String index out of range: 0
opendaylight-user@root>showSvcStatus --help
DESCRIPTION
        diagstatus:showSvcStatus

	show the status of registered services

SYNTAX
        diagstatus:showSvcStatus [options]

OPTIONS
        --help

The same can be seen here with this example from the README:

./karaf-client 1 feature:list ==> works and prints feature list

but again if we pass any arguments, then it's NOK:

./karaf-client 1 feature:list --help
executing "/odlha/karaf/target/assembly/bin/client feature:list --help" on 1.........................................
client: JAVA_HOME not set; results may vary
Apache Karaf client ...

It's curious though that this example does seem work, I don't get how this is fundamtentally different:

./karaf-client 1 log:set DEBUG org.opendaylight.genius

@jhershberg more filing this here FYI - not a bid deal to work around, once you know it, of course.

@jhershberg
Copy link
Owner

Yeah, I've seen this as well and we should fix it at some point. It's almost certainly something dumb

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

2 participants