You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "John Sirois (JIRA)" <ji...@apache.org> on 2016/07/03 19:45:10 UTC

[jira] [Comment Edited] (AURORA-1728) e2e tests require entering vagrant user's password 3x in fresh environments

    [ https://issues.apache.org/jira/browse/AURORA-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15360648#comment-15360648 ] 

John Sirois edited comment on AURORA-1728 at 7/3/16 7:44 PM:
-------------------------------------------------------------

It looks like the cause is a base image {{~/.ssh/authorized_keys}} file that does not end in a newline, and this results in the {{cat ${_ssh_key}.pub >> ~/.ssh/authorized_keys}} line in the {{test_run}} function of {{./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh}} emitting the generated key as a comment to the existing key:
{noformat}
vagrant@aurora:~$ cat ~/.ssh/authorized_keys 
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyLjPtNOd8XgQbBAD1a1Ir2s6MMSyYccuJ1Q8307awL5QJ0x/7x8FgjLscX7UaojYoc4JzjAbcOfi03sruY+nNm8c8dVjUQrwUK/SdYC9YYYgXdceoajxaaP3NQFt1hHvMAXR5uw4r3uHOQ98OMkvK9r4VtiHFzHYlleZKi1dUG7KlnNVJFjXOixFDQyOKV1/msOYdlAs/tn6k/ZC3cF8GoPFaZHJkqEnPKNsN9943Pbbz9NhrCtUFCYnZe13FaNjFnClQ0p13+loErFV8rLFC8sjr5X7WeArwD806f8dUCZex5/x0sXhUQJXEGbvg6cHoPvrB3Y7fQndzVyj1cUE5 vagrantssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDrrQxw5o3Nvx3HElPZVdh+yddpYFDcbjGZtKvR6JBY6ofq8qlWIGwHKuKL1Lr89dQ5taMlF88J5KzOfxkXTBenargnVIz9ucia6ALq2p9joDDzpCEOPsR91cf/Mj2nTGA3QGZ7C4yBihL3kvctRLENnuLJCIqBT3DdtO15HADehen0RK0Z0RKSmBRxRxHC8Q3zVD98Or3rz2h2IjFZ3gblTi1sr1VXqlGxsBmjBtiV+6NYgHSf8s89yN77gRmIcYsGSrHL3RUQ8/+c1cG19J/FT15MdTIy818BGpom4/qWbulqRLwYB1svrgWJ0GGsLZRu5aErTLcS5ZWPP4gwFV1/ vagrant@aurora.local
{noformat}


was (Author: jsirois):
It looks like the cause is a base image ~/.ssh/authorized_keys file that does not end in a newline, and this results in the {{cat ${_ssh_key}.pub >> ~/.ssh/authorized_keys}} line in the {{test_run}} function of {{./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh}} emitting the generated key as a comment to the existing key:
{noformat}
vagrant@aurora:~$ cat ~/.ssh/authorized_keys 
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyLjPtNOd8XgQbBAD1a1Ir2s6MMSyYccuJ1Q8307awL5QJ0x/7x8FgjLscX7UaojYoc4JzjAbcOfi03sruY+nNm8c8dVjUQrwUK/SdYC9YYYgXdceoajxaaP3NQFt1hHvMAXR5uw4r3uHOQ98OMkvK9r4VtiHFzHYlleZKi1dUG7KlnNVJFjXOixFDQyOKV1/msOYdlAs/tn6k/ZC3cF8GoPFaZHJkqEnPKNsN9943Pbbz9NhrCtUFCYnZe13FaNjFnClQ0p13+loErFV8rLFC8sjr5X7WeArwD806f8dUCZex5/x0sXhUQJXEGbvg6cHoPvrB3Y7fQndzVyj1cUE5 vagrantssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDrrQxw5o3Nvx3HElPZVdh+yddpYFDcbjGZtKvR6JBY6ofq8qlWIGwHKuKL1Lr89dQ5taMlF88J5KzOfxkXTBenargnVIz9ucia6ALq2p9joDDzpCEOPsR91cf/Mj2nTGA3QGZ7C4yBihL3kvctRLENnuLJCIqBT3DdtO15HADehen0RK0Z0RKSmBRxRxHC8Q3zVD98Or3rz2h2IjFZ3gblTi1sr1VXqlGxsBmjBtiV+6NYgHSf8s89yN77gRmIcYsGSrHL3RUQ8/+c1cG19J/FT15MdTIy818BGpom4/qWbulqRLwYB1svrgWJ0GGsLZRu5aErTLcS5ZWPP4gwFV1/ vagrant@aurora.local
{noformat}

> e2e tests require entering vagrant user's password 3x in fresh environments
> ---------------------------------------------------------------------------
>
>                 Key: AURORA-1728
>                 URL: https://issues.apache.org/jira/browse/AURORA-1728
>             Project: Aurora
>          Issue Type: Bug
>          Components: Build
>            Reporter: John Sirois
>            Assignee: John Sirois
>            Priority: Minor
>
> This is most easily encountered verifying a release candidate, which uses an ephemeral vagrant environment.  It looks like so:
> {noformat}
> ...
> + aurora update resume devcluster/vagrant/test/http_example
> Update has been resumed.
> + assert_update_state devcluster/vagrant/test/http_example ROLLING_FORWARD
> + local _jobkey=devcluster/vagrant/test/http_example _expected_state=ROLLING_FORWARD
> ++ aurora update list devcluster/vagrant/test/http_example --status active
> ++ tail -n +2
> ++ awk '{print $3}'
> + local _state=ROLLING_FORWARD
> + [[ ROLLING_FORWARD != ROLLING_FORWARD ]]
> + aurora update wait devcluster/vagrant/test/http_example 038b60d2-6eed-48fe-9229-31ffe33c022d
> Current state ROLLING_FORWARD
> Current state ROLLED_FORWARD
> ++ awk '{print $NF}'
> ++ aurora update info devcluster/vagrant/test/http_example 038b60d2-6eed-48fe-9229-31ffe33c022d
> ++ grep 'Current status'
> + local status=ROLLED_FORWARD
> + [[ ROLLED_FORWARD != \R\O\L\L\E\D\_\F\O\R\W\A\R\D ]]
> + test_announce vagrant test http_example
> + local _role=vagrant _env=test _job=http_example
> + local retcode=0
> + env SERVERSET=/aurora/vagrant/test/http_example PEX_INTERPRETER=1 aurora /vagrant/src/test/sh/org/apache/aurora/e2e/validate_serverset.py
> Announced members: [u'member_0000000010', u'member_0000000011', u'member_0000000009']
> Announced members: [u'member_0000000011', u'member_0000000009']
> Announced members: [u'member_0000000011', u'member_0000000009', u'member_0000000012']
> + retcode=1
> + [[ 1 = 1 ]]
> + echo 'Validated announced job.'
> Validated announced job.
> + return 0
> + test_run devcluster/vagrant/test/http_example
> + local _jobkey=devcluster/vagrant/test/http_example
> + local _ssh_key=/home/vagrant/.ssh/id_rsa
> + rm -f '/home/vagrant/.ssh/id_rsa*'
> + ssh-keygen -t rsa -N '' -f /home/vagrant/.ssh/id_rsa
> Generating public/private rsa key pair.
> Your identification has been saved in /home/vagrant/.ssh/id_rsa.
> Your public key has been saved in /home/vagrant/.ssh/id_rsa.pub.
> The key fingerprint is:
> d7:54:ba:a5:44:8d:77:17:b4:0f:71:5b:d0:b0:1e:83 vagrant@aurora.local
> The key's randomart image is:
> +--[ RSA 2048]----+
> |            .o**+|
> |           ..+o+B|
> |            E.*+.|
> |           + = +.|
> |        S . + . .|
> |         .       |
> |                 |
> |                 |
> |                 |
> +-----------------+
> + cat /home/vagrant/.ssh/id_rsa.pub
> ++ aurora task run devcluster/vagrant/test/http_example ls
> ++ uniq -c
> ++ awk '{print $2}'
> ++ sort
> vagrant@192.168.33.7's password: 
> vagrant@192.168.33.7's password: 
> vagrant@192.168.33.7's password: 
> + sandbox_contents='      3 http_example.py'
> + echo '      3 http_example.py'
>       3 http_example.py
> + [[       3 http_example.py = \ \ \ \ \ \ \3\ \h\t\t\p\_\e\x\a\m\p\l\e\.\p\y ]]
> + test_kill devcluster/vagrant/test/http_example
> + local _jobkey=devcluster/vagrant/test/http_example
> + aurora job kill devcluster/vagrant/test/http_example/1
>  INFO] Killing tasks for job: devcluster/vagrant/test/http_example
>  INFO] Instances to be killed: [1]
> Successfully killed instances [1]
> Job kill succeeded
> + aurora job killall devcluster/vagrant/test/http_example
> ...
> {noformat}
> Here, the password {{vagrant}} was entered 3x manually to get the test to proceed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)