gluster / glusterfs

Gluster Filesystem : Build your distributed storage in minutes
https://www.gluster.org
GNU General Public License v2.0
4.54k stars 1.07k forks source link

tests: replace localhost and 127.0.01 with valid ip #2945

Closed Shwetha-Acharya closed 1 year ago

Shwetha-Acharya commented 2 years ago

Problem: From Fedora 34 it is mandatory to use valid ip instead of localhost, 127.0.0.1 or loopback address (0.0.0.0 to 0.255.255.255).

Solution: use $hostname -I | awk '{print $1}' instead

Fixes: #2944 Change-Id: I282a0a519c650c6848ffa668ade86a4f35f9de42 Signed-off-by: Shwetha K Acharya sacharya@redhat.com

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

1 test(s) needed retry ./tests/00-geo-rep/00-georep-verify-setup.t https://build.gluster.org/job/gh_centos7-regression/1809/

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

1 test(s) needed retry ./tests/00-geo-rep/00-georep-verify-setup.t https://build.gluster.org/job/gh_centos7-regression/1818/

Shwetha-Acharya commented 2 years ago

/run regression

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

2 test(s) needed retry ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/00-georep-verify-setup.t https://build.gluster.org/job/gh_centos7-regression/1819/

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

3 test(s) needed retry ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/00-georep-verify-setup.t

1 flaky test(s) marked as success even though they failed ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/1820/

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

2 test(s) needed retry ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/00-georep-verify-setup.t

1 flaky test(s) marked as success even though they failed ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/1821/

deepshikhaaa commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

2 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/00-geo-rep/00-georep-verify-setup.t https://build.gluster.org/job/gh_centos7-regression/1824/

Shwetha-Acharya commented 2 years ago

dependent on: https://github.com/gluster/project-infrastructure/issues/146

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

1 test(s) needed retry ./tests/00-geo-rep/00-georep-verify-setup.t https://build.gluster.org/job/gh_centos7-regression/1833/

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/basic/ec/quota.t

0 test(s) generated core

2 test(s) needed retry ./tests/00-geo-rep/georep-basic-dr-rsync.t ./tests/basic/ec/quota.t https://build.gluster.org/job/gh_centos7-regression/1838/

mscherer commented 2 years ago

For my own knowledge, can the problem be explained, eg, what changed in Fedora 34 ?

Shwetha-Acharya commented 2 years ago

For my own knowledge, can the problem be explained, eg, what changed in Fedora 34 ?

In fedora 34 we cannot use loopback addresses to refer to a host. This is possibly a security / seggregation of loopback address usage, which I am not entirely sure why. @mscherer

On using 127.0.0.1:

[root@localhost glusterfs]# vi tests/00-geo-rep/00-georep-verify-setup.t [root@localhost glusterfs]# prove -v tests/00-geo-rep/00-georep-verify-setup.t tests/00-geo-rep/00-georep-verify-setup.t .. 1..32 ok 1 [ 163/ 1328] < 13> 'glusterd' ok 2 [ 21/ 16] < 14> 'pidof glusterd' Please provide a valid hostname/ip other than localhost, 127.0.0.1 or loopback address (0.0.0.0 to 0.255.255.255).

Usage: volume create [stripe ] [replica [arbiter ]] [disperse []] [disperse-data ] [redundancy ] [transport <tcp|rdma|tcp,rdma>] ... [force]

not ok 3 [ 10/ 63] < 32> 'gluster --mode=script --wignore volume create primary replica 2 127.0.0.1:/d/backends/primary1 127.0.0.1:/d/backends/primary2 127.0.0.1:/d/backends/primary3 127.0.0.1:/d/backends/primary4' -> '' volume start: primary: failed: Volume primary does not exist not ok 4 [ 7/ 74] < 33> 'gluster --mode=script --wignore volume start primary' -> '' Please provide a valid hostname/ip other than localhost, 127.0.0.1 or loopback address (0.0.0.0 to 0.255.255.255).

Usage: volume create [stripe ] [replica [arbiter ]] [disperse []] [disperse-data ] [redundancy ] [transport <tcp|rdma|tcp,rdma>] ... [force]

Shwetha-Acharya commented 2 years ago

/run regression

mscherer commented 2 years ago

The commit cc51d2ab9834 is what added the check, from 2019, so that's not a recent change.

I guess something changed in Fedora that make it work.

gluster-ant commented 2 years ago

1 test(s) failed ./tests/basic/glusterd/disperse-create.t

0 test(s) generated core

1 test(s) needed retry ./tests/basic/glusterd/disperse-create.t https://build.gluster.org/job/gh_centos7-regression/1839/

Shwetha-Acharya commented 2 years ago

depends on: https://github.com/gluster/glusterfs/issues/2962

mscherer commented 2 years ago

Ok but so:

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

2 test(s) needed retry ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/00-georep-verify-setup.t

1 flaky test(s) marked as success even though they failed ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/1872/

Shwetha-Acharya commented 2 years ago
mscherer commented 2 years ago

Context for that change: https://github.com/gluster/glusterfs/commit/930e1882f59b2f36980be9dddda1a3d3f5b8e459

and so https://bugzilla.redhat.com/show_bug.cgi?id=787627

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/georep-basic-dr-rsync-arbiter.t

0 test(s) generated core

2 test(s) needed retry ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/georep-basic-dr-rsync-arbiter.t https://build.gluster.org/job/gh_centos7-regression/1878/

Shwetha-Acharya commented 2 years ago

on running on the softserve machines - georep-basic-dr-rsync-arbiter.t is not timing out

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/basic/user-xlator.t

0 test(s) generated core

3 test(s) needed retry ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/01-georep-glusterd-tests.t ./tests/basic/user-xlator.t

1 flaky test(s) marked as success even though they failed ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/1879/

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/basic/user-xlator.t

0 test(s) generated core

2 test(s) needed retry ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/basic/user-xlator.t

1 flaky test(s) marked as success even though they failed ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/1880/

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

1 test(s) needed retry ./tests/00-geo-rep/00-georep-verify-setup.t https://build.gluster.org/job/gh_centos7-regression/1888/

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-non-root-setup.t

0 test(s) generated core

15 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_changelog_changelog-snapshot.t ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_distribute_bug-1122443.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/000-flaky/bugs_glusterd_quorum-value-check.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/features_lock-migration_lkmigration-set-option.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/00-georep-verify-non-root-setup.t

14 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_changelog_changelog-snapshot.t ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_distribute_bug-1122443.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/000-flaky/bugs_glusterd_quorum-value-check.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/features_lock-migration_lkmigration-set-option.t ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/1922/

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

3 test(s) needed retry ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/00-georep-verify-setup.t https://build.gluster.org/job/gh_centos7-regression/1982/

Shwetha-Acharya commented 2 years ago

@mscherer it is a right practice to use hostname other than loop back addresses as each address range is reseved for particular purpose. Could you please make sure passwordless ssh is properly setup and it works for $ip -o -4 addr | grep -v "\<lo>" | awk '{print $4}' | cut -d/ -f1 | head -n 1 on all the regression machines? As all the root geo-rep setup has already configured passwordless ssh for 127.0.0.1 for root setups, the ssh step is failing with the regression runs.

mscherer commented 2 years ago

So the command you pasted is missing \

#  ip -o -4 addr | grep -v "<lo>" | awk '{print $4}' | cut -d/ -f1 | head -n 1
127.0.0.1

But opening to the eth0 address would mean that the world could connect as root from a password less ssh key, I rather not do that in case the key get lost (or something again like bugzilla 1779276 happen) .

So again, what are the constraints, other than "we do not want 127.0.0.1". If I add another IP that is not 127.0.0.1(like 10.0.0.1), would it work fine, does it requires a specific type of interface ? Is this just about the hostname, or is it about the IP ?

Shwetha-Acharya commented 2 years ago

So the command you pasted is missing \

#  ip -o -4 addr | grep -v "<lo>" | awk '{print $4}' | cut -d/ -f1 | head -n 1
127.0.0.1

But opening to the eth0 address would mean that the world could connect as root from a password less ssh key, I rather not do that in case the key get lost (or something again like bugzilla 1779276 happen) .

So again, what are the constraints, other than "we do not want 127.0.0.1". If I add another IP that is not 127.0.0.1(like 10.0.0.1), would it work fine, does it requires a specific type of interface ? Is this just about the hostname, or is it about the IP ?

bugzilla 1779276 is not accessible to me. We cannot use localhost, 127.0.0.1 or loopback address (0.0.0.0 to 0.255.255.255). Any other addresses or hostname would work. As gluster is not fully compatible with ipv6, only ipv4 addresses are considered here on regression tests

mscherer commented 2 years ago

Indeed, seems the bug wasn't opened like I said I would, but it seems also because it wasn't fixed fully (the 1st patch is still not applied). And now, that's even worst since we now have proper DNS names.

I gave you access to the bug.

Shwetha-Acharya commented 2 years ago

@mscherer please do update if the firewall part is taken care as discussed offline, so that we can take this PR forward

Shwetha-Acharya commented 2 years ago

/run regression

gluster-ant commented 2 years ago

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-setup.t

0 test(s) generated core

2 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/00-geo-rep/00-georep-verify-setup.t https://build.gluster.org/job/gh_centos7-regression/2233/

Shwetha-Acharya commented 1 year ago

/run regression