Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-2543

Some minor problems on provisioner/docker/docker-hadoop.sh

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.2.0
    • provisioner
    • None

    Description

      1. If there's no docker instance, docker-hadoop.sh --list shows docker-compose's help message.

      sekikn@ubuntu:~/bigtop/provisioner/docker$ docker ps
      CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
      sekikn@ubuntu:~/bigtop/provisioner/docker$ ./docker-hadoop.sh -l
      Define and run multi-container applications with Docker.
      
      Usage:
        docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
        docker-compose -h|--help
      
      Options:
        -f, --file FILE           Specify an alternate compose file (default: docker-compose.yml)
        -p, --project-name NAME   Specify an alternate project name (default: directory name)
        --x-networking            (EXPERIMENTAL) Use new Docker networking functionality.
                                  Requires Docker 1.9 or later.
        --x-network-driver DRIVER (EXPERIMENTAL) Specify a network driver (default: "bridge").
                                  Requires Docker 1.9 or later.
        --verbose                 Show more output
        -v, --version             Print version and exit
      
      (snip)
      

      2. docker-hadoop.sh --create seems to execute unnecessary docker cp command and displays a file-not-found warning.

      sekikn@ubuntu:~/bigtop/provisioner/docker$ ./docker-hadoop.sh -c 1
      
      (snip)
      
      lstat /home/sekikn/bigtop/provisioner/docker/centos: no such file or directory
      

      I think line 104 was accidentally copied from line 97.

       95 copy-to-instances() {
       96     for node in ${NODES[*]}; do
       97         docker cp  $1 $node:$2 &
       98     done
       99     wait
      100 }
      101 
      102 bootstrap() {
      103     for node in ${NODES[*]}; do
      104         docker cp  $1 $node:$2 &
      105         docker exec $node bash -c "/bigtop-home/bigtop-deploy/vm/utils/setup-env-$1.sh $2" &
      106     done
      107     wait
      108 }
      

      3. Its help message shows an option usage as --create=NUM_INSTANCES, but the equal should be removed (same as BIGTOP-2512).

      sekikn@ubuntu:~/bigtop/provisioner/docker$ ./docker-hadoop.sh --create=3
      Unknown argument: '--create=3'
      usage: docker-hadoop.sh [-C file ] args
             -C file                                   Use alternate file for config.yaml
        commands:
             -c NUM_INSTANCES, --create=NUM_INSTANCES  Create a Docker based Bigtop Hadoop cluster
      

      Attachments

        1. BIGTOP-2543.1.patch
          3 kB
          Kengo Seki

        Activity

          People

            sekikn Kengo Seki
            sekikn Kengo Seki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: