Whirr
  1. Whirr
  2. WHIRR-584

Change confusing ssh login help message at the end of deployment

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.7.1
    • Fix Version/s: 0.8.0
    • Component/s: core
    • Environment:

      Amazon EC2

      Description

      Hello.

      I have following properties file:

      whirr.cluster-name=vpv-hadoop
      whirr.cluster-user=persona
      whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker+hadoop-datanode+hadoop-tasktracker
      whirr.hadoop.install-function=install_cdh_hadoop
      whirr.hadoop.configure-function=configure_cdh_hadoop
      whirr.provider=aws-ec2
      whirr.identity=XXXXXXXXXXXXXXXX
      whirr.credential=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
      whirr.hardware-id=m1.large
      # This is custom AMI based on Ubuntu 10.04 LTS (lucid) ami-8fac75e6
      whirr.image-id=us-east-1/ami-e005de89
      # jclouds.ec2.ami-query=owner-id=215688387811;state=available;image-type=machine
      whirr.location-id=us-east-1
      # This property is required since I use custom AMI
      whirr.login-user=ubuntu
      

      At the end of deployment I got following message:

      You can log into instances using the following ssh commands:
      'ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no ubuntu@50.17.168.40'

      However, this command is incorrect:

      $ ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no ubuntu@50.17.168.40
      Warning: Permanently added '50.17.168.40' (RSA) to the list of known hosts.
      Permission denied (publickey).

      The correct one is using value of whirr.cluster-user property:

      $ ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no persona@50.17.168.40 hostname
      Warning: Permanently added '50.17.168.40' (RSA) to the list of known hosts.
      ip-10-34-83-52
      $

      That is because jclouds creates new keypair based on cluster name and injects it for 'login-user' account. While key specified in whirr.private-key-file is used for 'cluster-user' account

      1. WHIRR-584.diff.txt
        0.7 kB
        Andrew Bayer

        Activity

        Pavel Vozdvizhenskiy created issue -
        Hide
        Andrei Savu added a comment -

        Good catch! Thanks for reporting.

        Show
        Andrei Savu added a comment - Good catch! Thanks for reporting.
        Hide
        Pavel Vozdvizhenskiy added a comment -

        fixed formatting

        Show
        Pavel Vozdvizhenskiy added a comment - fixed formatting
        Pavel Vozdvizhenskiy made changes -
        Field Original Value New Value
        Description Hello.

        I have following properties file:

        whirr.cluster-name=vpv-hadoop
        whirr.cluster-user=persona
        whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker+hadoop-datanode+hadoop-tasktracker
        whirr.hadoop.install-function=install_cdh_hadoop
        whirr.hadoop.configure-function=configure_cdh_hadoop
        whirr.provider=aws-ec2
        whirr.identity=XXXXXXXXXXXXXXXX
        whirr.credential=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
        whirr.hardware-id=m1.large
        # This is custom AMI based on Ubuntu 10.04 LTS (lucid) ami-8fac75e6
        whirr.image-id=us-east-1/ami-e005de89
        # jclouds.ec2.ami-query=owner-id=215688387811;state=available;image-type=machine
        whirr.location-id=us-east-1
        # This property is required since I use custom AMI
        whirr.login-user=ubuntu

        At the end of deployment I got following message:

        You can log into instances using the following ssh commands:
        'ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no ubuntu@50.17.168.40'

        However, this command is incorrect:

        $ ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no ubuntu@50.17.168.40
        Warning: Permanently added '50.17.168.40' (RSA) to the list of known hosts.
        Permission denied (publickey).

        The correct one is using value of whirr.cluster-user property:

        $ ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no persona@50.17.168.40 hostname
        Warning: Permanently added '50.17.168.40' (RSA) to the list of known hosts.
        ip-10-34-83-52
        $

        That is because jclouds creates new keypair based on cluster name and injects it for 'login-user' account. While key specified in whirr.private-key-file is used for 'cluster-user' account
        Hello.

        I have following properties file:

        {code}
        whirr.cluster-name=vpv-hadoop
        whirr.cluster-user=persona
        whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker+hadoop-datanode+hadoop-tasktracker
        whirr.hadoop.install-function=install_cdh_hadoop
        whirr.hadoop.configure-function=configure_cdh_hadoop
        whirr.provider=aws-ec2
        whirr.identity=XXXXXXXXXXXXXXXX
        whirr.credential=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
        whirr.hardware-id=m1.large
        # This is custom AMI based on Ubuntu 10.04 LTS (lucid) ami-8fac75e6
        whirr.image-id=us-east-1/ami-e005de89
        # jclouds.ec2.ami-query=owner-id=215688387811;state=available;image-type=machine
        whirr.location-id=us-east-1
        # This property is required since I use custom AMI
        whirr.login-user=ubuntu
        {code}

        At the end of deployment I got following message:

        You can log into instances using the following ssh commands:
        'ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no ubuntu@50.17.168.40'

        However, this command is incorrect:

        $ ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no ubuntu@50.17.168.40
        Warning: Permanently added '50.17.168.40' (RSA) to the list of known hosts.
        Permission denied (publickey).

        The correct one is using value of whirr.cluster-user property:

        $ ssh -i /home/vpv/.ssh/id_rsa -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no persona@50.17.168.40 hostname
        Warning: Permanently added '50.17.168.40' (RSA) to the list of known hosts.
        ip-10-34-83-52
        $

        That is because jclouds creates new keypair based on cluster name and injects it for 'login-user' account. While key specified in whirr.private-key-file is used for 'cluster-user' account
        Hide
        Andrew Bayer added a comment -

        I think this patch should do the trick - it flips the check to use cluster user if that's set and falls back to bootstrap user, rather than the current setup (which is the opposite).

        Show
        Andrew Bayer added a comment - I think this patch should do the trick - it flips the check to use cluster user if that's set and falls back to bootstrap user, rather than the current setup (which is the opposite).
        Andrew Bayer made changes -
        Attachment WHIRR-584.diff.txt [ 12535758 ]
        Andrew Bayer made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Tom White added a comment -

        I've just committed this. Thanks Andrew!

        Show
        Tom White added a comment - I've just committed this. Thanks Andrew!
        Tom White made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee Andrew Bayer [ abayer ]
        Fix Version/s 0.8.0-alpha.1 [ 12318880 ]
        Resolution Fixed [ 1 ]
        Tom White made changes -
        Fix Version/s 0.8.0 [ 12321649 ]
        Fix Version/s 0.8.0-alpha.1 [ 12318880 ]

          People

          • Assignee:
            Andrew Bayer
            Reporter:
            Pavel Vozdvizhenskiy
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development