<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:27:49 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[ODLPARENT-170] Karaf CLI &quot;java.util.regex.PatternSyntaxException: Illegal repetition near index&quot; when running in container and using dumb terminal</title>
                <link>https://jira.opendaylight.org/browse/ODLPARENT-170</link>
                <project id="10149" key="ODLPARENT">odlparent</project>
                    <description>&lt;p&gt;While investigating &lt;a href=&quot;https://jira.opendaylight.org/browse/INFRAUTILS-54&quot; title=&quot;Genius CSIT 3 Node fails following infrautils changes in diagstatus&quot; class=&quot;issue-link&quot; data-issue-key=&quot;INFRAUTILS-54&quot;&gt;&lt;del&gt;GENIUS-211&lt;/del&gt;&lt;/a&gt; and using &lt;a href=&quot;https://github.com/jhershberg/netvirt-ha-docker&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/jhershberg/netvirt-ha-docker&lt;/a&gt; to run ODL clustered in a container, I&apos;ve come accross this curious problem:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[laptop-host] $ ./karaf-client 1
[container] opendaylight-user@root&amp;gt; shell:stack-traces-print
[container] opendaylight-user@root&amp;gt;showSvcStatus --help     
DESCRIPTION
        diagstatus:showSvcStatus

	show the status of registered services

SYNTAX
        diagstatus:showSvcStatus [options]

OPTIONS
        --help
java.util.regex.PatternSyntaxException: Illegal repetition near index 4
(\S\S{-16,}|.{1,-16})(\s+|$)
    ^
	at java.util.regex.Pattern.error(Pattern.java:1957)
	at java.util.regex.Pattern.closure(Pattern.java:3159)
	at java.util.regex.Pattern.sequence(Pattern.java:2136)
	at java.util.regex.Pattern.expr(Pattern.java:1998)
	at java.util.regex.Pattern.group0(Pattern.java:2907)
	at java.util.regex.Pattern.sequence(Pattern.java:2053)
	at java.util.regex.Pattern.expr(Pattern.java:1998)
	at java.util.regex.Pattern.compile(Pattern.java:1698)
	at java.util.regex.Pattern.&amp;lt;init&amp;gt;(Pattern.java:1351)
	at java.util.regex.Pattern.compile(Pattern.java:1028)
	at org.apache.karaf.shell.impl.action.command.DefaultActionPreparator.printFormatted(DefaultActionPreparator.java:440)
	at org.apache.karaf.shell.impl.action.command.DefaultActionPreparator.printUsage(DefaultActionPreparator.java:384)
	at org.apache.karaf.shell.impl.action.command.DefaultActionPreparator.prepare(DefaultActionPreparator.java:98)
	at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)
	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571)
	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497)
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386)
	at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417)
	at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
	at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What is fun is that if I do the exact same thing on a Karaf running locally outside of the container, with the exact same code (I&apos;m using the binary which jhershberg/netvirt-ha-docker copied into the container), this this does not happen... so must have something to do with running in container and using dumb terminal (where &quot;cursor arrow up&quot; prints &quot;^[[A&quot; instead of working history).&lt;/p&gt;

&lt;p&gt;May be it&apos;s somehow related to the &lt;tt&gt;@Option(name = &quot;&amp;#45;n&quot;, aliases = {&quot;&amp;#45;&amp;#45;node&quot;}) String nip;&lt;/tt&gt; in &lt;tt&gt;DiagStatusCommand&lt;/tt&gt;, because the exception above seem to happen just as it&apos;s about to print that option, here is the output from when it works (note how the &lt;tt&gt;-n, --node&lt;/tt&gt; is missing above!):&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;opendaylight-user@root&amp;gt;showSvcStatus --help
DESCRIPTION
        diagstatus:showSvcStatus

	show the status of registered services

SYNTAX
        diagstatus:showSvcStatus [options]

OPTIONS
        --help
                Display this help message
        -n, --node&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So definitely very minor, and only filing this here for reference; not important enough to jump on fixing it; &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=skitt&quot; class=&quot;user-hover&quot; rel=&quot;skitt&quot;&gt;skitt&lt;/a&gt; FYI.&lt;/p&gt;</description>
                <environment></environment>
        <key id="30805">ODLPARENT-170</key>
            <summary>Karaf CLI &quot;java.util.regex.PatternSyntaxException: Illegal repetition near index&quot; when running in container and using dumb terminal</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Cannot Reproduce</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 2 Oct 2018 13:15:59 +0000</created>
                <updated>Mon, 6 Sep 2021 09:44:36 +0000</updated>
                            <resolved>Mon, 6 Sep 2021 09:44:36 +0000</resolved>
                                                                    <component>Karaf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="65151" author="vorburger" created="Tue, 2 Oct 2018 13:30:00 +0000"  >&lt;p&gt;Not sure if this &quot;String index out of range&quot; could be related to above or is a totally separate problem:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$&#160;./karaf-client 1 
executing &quot;/odlha/karaf/target/assembly/bin/client&quot; on 1.........................................
client: JAVA_HOME not set; results may vary
Logging in as karaf
 
 ________ ________ .__ .__ .__ __ 
 \_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_ 
 / | \\____ \_/ __ \ / \ | | \\__ \&amp;lt; | || | | |/ ___\| | \ __\ 
 / | \ |_&amp;gt; &amp;gt; ___/| | \| ` \/ __ \\___ || |_| / /_/ &amp;gt; Y \ | 
 \_______ / __/ \___ &amp;gt;___| /_______ (____ / ____||____/__\___ /|___| /__| 
 \/|__| \/ \/ \/ \/\/ /_____/ \/

Hit &apos;&amp;lt;tab&amp;gt;&apos; for a list of available commands
and &apos;[cmd] --help&apos; for help on a specific command.
Hit &apos;&amp;lt;ctrl-d&amp;gt;&apos; or type &apos;system:shutdown&apos; or &apos;logout&apos; to shutdown OpenDaylight.

Error in initialization script: /odlha/karaf/target/assembly/etc/shell.init.script: String index out of range: 0
opendaylight-user@root&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="69613" author="rovarga" created="Mon, 6 Sep 2021 09:44:36 +0000"  >&lt;p&gt;This looks like a Karaf problem, really. If it resurfaces, please file an issue with upstream.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03j4f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>