Uploaded image for project: 'Apache HAWQ'
  1. Apache HAWQ
  2. HAWQ-1582

hawq ssh cmd bug when pipe in cmd

    XMLWordPrintableJSON

Details

    Description

      bug description

      hawq ssh -h sdw2 -h localhost -e 'ls -1 | wc -l'
      

      When running this command, the expected action is that `ls -1 | wc -l` is executed in each host. The expected output is (the number may be different):

      [sdw2] ls -1 | wc -l
      [sdw2] 23
      [localhost] ls -1 | wc -l
      [localhost] 20
      

      While the output got is:

      45
      

      The result looks like `ls -l` was executed in each host and the output of `hawq ssh -h sdw2 -h localhost -e 'ls -1'` was redirect to pipe to `wc -l`.

      Another related issue

      hawq ssh -h sdw2 -h localhost -e 'kill -9 $(pgrep lava)'
      

      This command expects to kill process named lava in each host. While `$(pgrep lava)` is executed in localhost, and program gets the process id, for example 55555. And then `kill -9 55555` is executed in each host, which is definitely not match with our expect.

      Attachments

        Issue Links

          Activity

            People

              rlei Radar Da Lei
              YoungForest Yang Sen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: