glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

tests: replace localhost and 127.0.01 with valid ip

Open Shwetha-Acharya opened this issue 3 years ago • 66 comments

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 [email protected]

Shwetha-Acharya avatar Nov 12 '21 07:11 Shwetha-Acharya

/run regression

Shwetha-Acharya avatar Nov 12 '21 07:11 Shwetha-Acharya

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/

gluster-ant avatar Nov 12 '21 07:11 gluster-ant

/run regression

Shwetha-Acharya avatar Nov 15 '21 12:11 Shwetha-Acharya

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/

gluster-ant avatar Nov 15 '21 13:11 gluster-ant

/run regression

Shwetha-Acharya avatar Nov 15 '21 13:11 Shwetha-Acharya

/run regression

Shwetha-Acharya avatar Nov 15 '21 13:11 Shwetha-Acharya

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/

gluster-ant avatar Nov 15 '21 14:11 gluster-ant

/run regression

Shwetha-Acharya avatar Nov 16 '21 06:11 Shwetha-Acharya

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/

gluster-ant avatar Nov 16 '21 06:11 gluster-ant

/run regression

Shwetha-Acharya avatar Nov 16 '21 07:11 Shwetha-Acharya

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/

gluster-ant avatar Nov 16 '21 07:11 gluster-ant

/run regression

deepshikhaaa avatar Nov 17 '21 05:11 deepshikhaaa

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/

gluster-ant avatar Nov 17 '21 05:11 gluster-ant

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

Shwetha-Acharya avatar Nov 17 '21 14:11 Shwetha-Acharya

/run regression

Shwetha-Acharya avatar Nov 18 '21 09:11 Shwetha-Acharya

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/

gluster-ant avatar Nov 18 '21 09:11 gluster-ant

/run regression

Shwetha-Acharya avatar Nov 19 '21 08:11 Shwetha-Acharya

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/

gluster-ant avatar Nov 19 '21 09:11 gluster-ant

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

mscherer avatar Nov 19 '21 09:11 mscherer

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 <NEW-VOLNAME> [stripe <COUNT>] [replica <COUNT> [arbiter <COUNT>]] [disperse [<COUNT>]] [disperse-data <COUNT>] [redundancy <COUNT>] [transport <tcp|rdma|tcp,rdma>] <NEW-BRICK>... [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 <NEW-VOLNAME> [stripe <COUNT>] [replica <COUNT> [arbiter <COUNT>]] [disperse [<COUNT>]] [disperse-data <COUNT>] [redundancy <COUNT>] [transport <tcp|rdma|tcp,rdma>] <NEW-BRICK>... [force]

Shwetha-Acharya avatar Nov 19 '21 09:11 Shwetha-Acharya

/run regression

Shwetha-Acharya avatar Nov 19 '21 10:11 Shwetha-Acharya

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.

mscherer avatar Nov 19 '21 10:11 mscherer

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/

gluster-ant avatar Nov 19 '21 11:11 gluster-ant

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

Shwetha-Acharya avatar Nov 19 '21 14:11 Shwetha-Acharya

Ok but so:

  • why does it still work on EL8 and EL7 ?
  • why is the check here in the 1st place if it was broken, and why do we keep it ?

mscherer avatar Nov 19 '21 14:11 mscherer

/run regression

Shwetha-Acharya avatar Nov 29 '21 06:11 Shwetha-Acharya

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/

gluster-ant avatar Nov 29 '21 06:11 gluster-ant

  • why does it still work on EL8 and EL7 ? We need to investigate, why the check was not functioning in some OSs and OS versions. I will update if I get any more info regarding that. However #2962 existed on all the OSs.
  • why is the check here in the 1st place if it was broken, and why do we keep it ? This check is also present in https://github.com/gluster/glusterfs/blob/devel/cli/src/cli-cmd-parser.c#L172 apart from the changes introduced in https://github.com/gluster/glusterfs/commit/cc51d2ab9834f4fc01fcf219bb727d089d5fc271. This check is a generic gluster parsing constraint deployed from the very beginning. Though I am not sure of the exact historical reason, it could be to prevent some functionality of gluster from falling apart.

Shwetha-Acharya avatar Nov 29 '21 07:11 Shwetha-Acharya

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

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

mscherer avatar Nov 29 '21 08:11 mscherer

/run regression

Shwetha-Acharya avatar Nov 30 '21 06:11 Shwetha-Acharya