Bug 1779742 - tests/00-geo-rep/00-georep-verify-non-root-setup.t fail on freshly installed builder
Summary: tests/00-geo-rep/00-georep-verify-non-root-setup.t fail on freshly installed ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: tests
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Sunny Kumar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1784790 1784796
TreeView+ depends on / blocked
 
Reported: 2019-12-04 15:50 UTC by M. Scherer
Modified: 2019-12-18 10:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1784790 1784796 (view as bug list)
Environment:
Last Closed: 2019-12-18 08:11:04 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
proposed patch (732 bytes, patch)
2019-12-16 12:33 UTC, M. Scherer
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Gluster.org Gerrit 23887 None Merged test: fix non-root test case for geo-rep 2019-12-18 08:11:03 UTC

Internal Links: 1777193

Description M. Scherer 2019-12-04 15:50:39 UTC
Description of problem:

Testing the test suite on newer Centos 8 builder, i see that the aformentioned test fail on them. Since that's freshly installed system, this step is blocking:

ok  21 [     36/    821] < 156> 'gluster-mountbroker status'

ps show :
 6781 pts/0    S+     0:00                          \_ timeout --foreground -k 5 500 prove -vmfe /bin/bash ./tests/00-geo-rep/00-georep-verify-non-root-setup.t
 6782 pts/0    S+     0:00                              \_ /usr/bin/perl -w /bin/prove -vmfe /bin/bash ./tests/00-geo-rep/00-georep-verify-non-root-setup.t
 6783 pts/0    S+     0:00                                  \_ /bin/bash ./tests/00-geo-rep/00-georep-verify-non-root-setup.t
 7890 ?        Ss     0:00                                      \_ /bin/sh /bin/ssh-copy-id -i /root/.ssh/id_rsa.pub nroot@127.0.0.1
 7916 ?        S      0:00                                          \_ /bin/sh /bin/ssh-copy-id -i /root/.ssh/id_rsa.pub nroot@127.0.0.1
 7917 ?        S      0:36                                              \_ ssh -v -o PreferredAuthentications=, -o ControlPath=none nroot@127.0.0.1
 7918 ?        R      0:05                                              \_ sed -ne s/.*remote software version //p


that's because the ssh key need to be accepted automatically.

Comment 1 sankarshan 2019-12-04 16:09:50 UTC
You might want to change the severity of this RHBZ if this is blocking the CentOS 8 builder upgrade tests.

Comment 2 Deepshikha khandelwal 2019-12-10 06:15:56 UTC
Kotresh, can you please take a look at the failing test?

Comment 3 Sunny Kumar 2019-12-10 09:52:49 UTC
Hi Deepshikha,

Looking at it.

/sunny

Comment 4 Sunny Kumar 2019-12-16 09:43:33 UTC
Hi,

Can you provide machine for further analysis, it will help to resolve this faster.

/sunny

Comment 5 M. Scherer 2019-12-16 12:33:33 UTC
Created attachment 1645578 [details]
proposed patch

Comment 6 M. Scherer 2019-12-16 12:36:50 UTC
There isn't a need for much analysis, the problem is that on a new system, the remote key need to be accepted by ssh-copy-id, that's why it is blocked on the command: "ssh -v -o PreferredAuthentications=, -o ControlPath=none nroot@127.0.0.1".

I do not know how that was supposed to work in the first place, but I suspect this did worked by accident, because we do not reinstall the builder on each run. The attached patch should work, and to test it, no need for anything special, just use a fresh VM (either vagrant, virt-builder, anything) and test. just make sure the know_hosts file of root is empty, since that's the state of a freshly install VM.

Comment 7 Sunny Kumar 2019-12-16 12:58:47 UTC
(In reply to M. Scherer from comment #6)
> There isn't a need for much analysis, the problem is that on a new system,
> the remote key need to be accepted by ssh-copy-id, that's why it is blocked
> on the command: "ssh -v -o PreferredAuthentications=, -o ControlPath=none
> nroot@127.0.0.1".
> 
Thanks for analysis and patch.

> I do not know how that was supposed to work in the first place, but I
> suspect this did worked by accident, because we do not reinstall the builder
> on each run.
Yes, I suppose it worked because builders were not freshly installed.

>The attached patch should work, and to test it, no need for
> anything special, just use a fresh VM (either vagrant, virt-builder,
> anything) and test. just make sure the know_hosts file of root is empty,
> since that's the state of a freshly install VM.

Comment 8 Worker Ant 2019-12-16 13:00:44 UTC
REVIEW: https://review.gluster.org/23887 (test: fix non-root test case for geo-rep) posted (#1) for review on master by Sunny Kumar

Comment 9 Sunny Kumar 2019-12-16 14:03:00 UTC
The option for maintaining order for authentication method: 

"PreferredAuthentications: publickey" -- fails on regression as well on local system.

I have changed its order to password.

Comment 10 Sunny Kumar 2019-12-16 14:59:45 UTC
Update:

Can be reproduced in system by removing/making_empty "~/.ssh/known_hosts" file for root.

Works with patch:
https://review.gluster.org/#/c/glusterfs/+/23887/2/


/sunny

Comment 11 Worker Ant 2019-12-18 08:11:04 UTC
REVIEW: https://review.gluster.org/23887 (test: fix non-root test case for geo-rep) merged (#3) on master by Amar Tumballi


Note You need to log in before you can comment on or make changes to this bug.