<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 02/26/2014 07:25 AM, Bret Wortman wrote:
    <blockquote cite="mid:530DDD52.8000102@damascusgrp.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <tt># script /tmp/out-script<br>
        Script started, file is /tmp/out-script<br>
        # ipa help<br>
        Script done, file is /tmp/out-script<br>
        # cat /tmp/out-script<br>
        <br>
        Script started on Wed 26 Feb 2014 07:18:07 AM EST<br>
        # ipa help<br>
        <br>
        Script done on Wed 26 Feb 2014 07:18:14 AM EST<br>
        # <br>
        <br>
      </tt>So then I tried it using script's "-c" option to see if that
      would make a difference, kind of like strace did:<br>
      <tt><br>
        #script -c 'ipa help' /tmp/out-script2<br>
        Script started, file is /tmp/out-script2<br>
        Usage: ipa [global-options] COMMAND {command-options]<br>
        <br>
        Manage an IPA domain<br>
        <br>
        Options:<br>
        :<br>
        :</tt><br>
      <tt><tt>See "ipa <COMMAND> --help" for more information on a
          specific command.<br>
        </tt>Script done, file is /tmp/out-script2<br>
        # cat /tmp/out-script2<br>
        Script started on Wed 26 Feb 2014 07:20:27 AM EST<br>
        Usage: ipa [global-options] COMMAND [command-options]<br>
        <br>
        Manage an IPA domain<br>
        <br>
        Options:<br>
        :<br>
        :<br>
      </tt></blockquote>
    <br>
    These colons...<br>
    Where do they come from. Can it be that something here is
    interpreted in strange way?<br>
    Can be some kind of weird new line conversion in the output that
    cause the shell to go south?<br>
    Any strange settings in ENV defining terminal settings?<br>
    <br>
    Can you do any python based output?<br>
    <br>
    <blockquote cite="mid:530DDD52.8000102@damascusgrp.com" type="cite"><tt>
        See "ipa <COMMAND> --help" for more information on a
        specific command.<br>
        <br>
        Script done on Wed 26 Feb 2014 07:20:28 AM EST<br>
        #</tt><br>
      <br>
      It <i>looks</i> like something is behaving differently when input
      comes from a tty vice when it doesn't. For grins, I did the same
      thing using "ipa host-find zw129.damascusgrp.com" and got
      basically the same result -- an empty log first, then successful
      completion (including expected results) using the -c option.<br>
      <br>
      <br>
      Bret<br>
      <br>
      <div class="moz-cite-prefix">On 02/25/2014 08:32 PM, Bret Wortman
        wrote:<br>
      </div>
      <blockquote
        cite="mid:B7F2D410-4CF3-431E-9C75-ADDD5873664A@damascusgrp.com"
        type="cite">
        <pre wrap="">I'll try that. And you're right--we've tried a number of sub commands. 


Bret Wortman
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://bretwortman.com/">http://bretwortman.com/</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/BretWortman">http://twitter.com/BretWortman</a>

</pre>
        <blockquote type="cite">
          <pre wrap="">On Feb 25, 2014, at 8:05 PM, Rob Crittenden <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:rcritten@redhat.com"><rcritten@redhat.com></a> wrote:

Dmitri Pal wrote:
</pre>
          <blockquote type="cite">
            <blockquote type="cite">
              <pre wrap="">On 02/25/2014 07:31 PM, Bret Wortman wrote:
Nope, running with strace lets us use the IPA command again with impunity. Without it, process termination.
</pre>
            </blockquote>
            <pre wrap="">A theory. Your data has some output that is treated as escape sequence
that crushes the shell so your connection is closed.
Do you test it with the same command all the time?

Have you tried other commands?
Can you do a user/group/host add?

Can you try other commands?
</pre>
          </blockquote>
          <pre wrap="">I think he said it fails with a simple ipa help, which eliminates a whole lot of the work we do because it does no networking in that case.

Maybe running inside a typescript will show something like weird characters.

rob

</pre>
          <blockquote type="cite">
            <pre wrap="">
</pre>
            <blockquote type="cite">
              <pre wrap="">
Bret Wortman
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://bretwortman.com/">http://bretwortman.com/</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/BretWortman">http://twitter.com/BretWortman</a>

</pre>
              <blockquote type="cite">
                <pre wrap="">On Feb 25, 2014, at 6:06 PM, Rob Crittenden<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:rcritten@redhat.com"><rcritten@redhat.com></a>  wrote:

Bret Wortman wrote:
</pre>
                <blockquote type="cite">
                  <pre wrap="">I don't know if this will be informative or not, but:

# strace -f -o /tmp/out ipa host-find zw129.damascusgrp.com
--------------
1 host matched
--------------
Host name: zw129.damascusgrp.com
  :
  :
#

I then found this pattern occurring a number of times within the (17564
line) output file:

4229  mmap(NULL, 1052672, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...>
4237  <... close resumed> )             = 0
4229  <... mmap resumed> )              = 0x7f936aad2000
4229  read(13, <unfinished ...>
4237  dup2(7, 0)                        = 0
4237  dup2(10, 1)                       = 1
4237  dup2(12, 2)                       = 2
4237  close(7)                          = 0
4237  close(10)                         = 0
4237  close(12)                         = 0
4237  close(3)                          = 0
4237  close(4)                          = 0
4237  close(5)                          = 0
4237  close(6)                          = 0
4237  close(7)                          = -1 EBADF (Bad file descriptor)
4237  close(8)                          = -1 EBADF (Bad file descriptor)
4237  close(9)                          = -1 EBADF (Bad file descriptor)
4237  close(10)                         = -1 EBADF (Bad file descriptor)
:
: Continues for a thousand entries or so, then
:
4237  close(1022)                       = -1 EBADF (Bad file descriptor)
4237  close(1023)                       = -1 EBADF (Bad file descriptor)
4237  execve("/bin/keyctl", ["keyctl", "padd", "user",
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:ipa_session_cookie:admin@DAMASCUSGRP.COM">"ipa_session_cookie:admin@DAMASCUSGRP.COM"</a>, "@s"], [/* 27 vars */]
<unfinished ...>
</pre>
                </blockquote>
                <pre wrap="">Just noise while we fork off and run another process, in this case keyctl to store the session cookie in the kernel keyring.

So running with strace doesn't result in the session logging out?

rob



_______________________________________________
Freeipa-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Freeipa-users@redhat.com">Freeipa-users@redhat.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-users">https://www.redhat.com/mailman/listinfo/freeipa-users</a>
</pre>
              </blockquote>
            </blockquote>
            <pre wrap="">
--
Thank you,
Dmitri Pal

Sr. Engineering Manager for IdM portfolio
Red Hat Inc.


-------------------------------
Looking to carve out IT costs?
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.redhat.com/carveoutcosts/">www.redhat.com/carveoutcosts/</a>




_______________________________________________
Freeipa-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Freeipa-users@redhat.com">Freeipa-users@redhat.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-users">https://www.redhat.com/mailman/listinfo/freeipa-users</a>
</pre>
          </blockquote>
          <pre wrap="">_______________________________________________
Freeipa-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Freeipa-users@redhat.com">Freeipa-users@redhat.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-users">https://www.redhat.com/mailman/listinfo/freeipa-users</a>
</pre>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
Freeipa-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Freeipa-users@redhat.com">Freeipa-users@redhat.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-users">https://www.redhat.com/mailman/listinfo/freeipa-users</a></pre>
        </blockquote>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Freeipa-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-users@redhat.com">Freeipa-users@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-users">https://www.redhat.com/mailman/listinfo/freeipa-users</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager for IdM portfolio
Red Hat Inc.


-------------------------------
Looking to carve out IT costs?
<a class="moz-txt-link-abbreviated" href="http://www.redhat.com/carveoutcosts/">www.redhat.com/carveoutcosts/</a>


</pre>
  </body>
</html>