accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milleruntime <...@git.apache.org>
Subject [GitHub] accumulo issue #126: Accumulo 4374: Modified Shell to fix ChangeSecret tool
Date Wed, 20 Jul 2016 17:36:31 GMT
Github user milleruntime commented on the issue:

    https://github.com/apache/accumulo/pull/126
  
    I made multiple attempts at this with no luck.  The problem I am having is
    simulating console input to the readPassword called by JCommander in the
    ChangeSecret tool.  I can run the class using the exec in
    MiniAccumuloClusterImpl but it will hang waiting for input from the
    console. I have tried to grab outputstream from the process and write the
    passwords to it. Since readPassword is looking for System.in, I also tried
    setting the passwords in an InputStream through System.setIn().
    
    The closest I have come to a successful test is by creating a separate
    thread that constantly writes the password to the OutputStream of the
    ChangeSecret process. This won't allow me to change the password though
    since it will be the same thing for both prompts.  I have no way of knowing
    if its asking for the old or new password. I tried looking at the
    InputStream for which password prompt to determine the correct password but
    readLine will also block waiting for the password input.
    
    The ShellServerIT gets around this problem by not calling readLine and just
    executing all the commands on the Shell separately.
    
    Another problem I have is that the ChangeSecret tool requires that
    Zookeeper be running and not Accumulo, which there is currently no way of
    doing with the MAC.
    
    
    
    On Mon, Jul 18, 2016 at 10:36 AM, Josh Elser <notifications@github.com>
    wrote:
    
    > Changes look fine. Were you able to write a test that showed ChangeSecret
    > was broken? I'm not sure if you can use MiniAccumuloCluster to do this:
    >
    >    1. Start MAC
    >    2. Stop MAC
    >    3. Use MAC to exec the ChangeSecret tool
    >    4. Start MAC
    >    5. Ensure that you can interact with it and that the new
    >    instance.secret is set
    >
    > I'm not sure if you'd run into any hurdles around this.
    >
    > —
    > You are receiving this because you authored the thread.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/accumulo/pull/126#issuecomment-233347399>, or mute
    > the thread
    > <https://github.com/notifications/unsubscribe-auth/ALUpG0t9ejUuD2zrELBE8IHCOILp1MpEks5qW4-FgaJpZM4JOwM->
    > .
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message