]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw/notification: use real ip address instead of localhost 59304/head
authorYuval Lifshitz <ylifshit@ibm.com>
Thu, 15 Aug 2024 14:34:57 +0000 (14:34 +0000)
committerYuval Lifshitz <ylifshit@ibm.com>
Mon, 19 Aug 2024 11:42:30 +0000 (11:42 +0000)
based on that comment:
https://tracker.ceph.com/issues/67206#note-6
the address used by the endpoint is taken as the real IP address of the
host where the test script is running and not localhost.

we also changed the rabbitmq-server conf to allow "guest"
user to connect over non localhost address

Fixes: https://tracker.ceph.com/issues/67206
Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
(cherry picked from commit cdd75b499f7fe944906d863b9933e8d3aff95e5f)

Conflicts:
qa/tasks/rabbitmq.py
src/test/rgw/bucket_notification/test_bn.py

qa/tasks/rabbitmq.py
src/test/rgw/bucket_notification/test_bn.py

index c78ac1e568fa9dc3922ec6ce037d1cddfdc04c8d..ddd4a9d512670e7b4a117482ce4691dd09a42ae2 100644 (file)
@@ -73,6 +73,11 @@ def run_rabbitmq(ctx, config):
              'sudo', 'chkconfig', 'rabbitmq-server', 'on'
             ],
         )
+        
+        ctx.cluster.only(client).run(args=[
+             'echo', 'loopback_users.guest = false', run.Raw('|'), 'sudo', 'tee', '-a', '/etc/rabbitmq/rabbitmq.conf'
+            ],
+        )
 
         ctx.cluster.only(client).run(args=[
              'sudo', '/sbin/service', 'rabbitmq-server', 'start'
index ee89d326d433c47e777e020dfc41f5d625bb785d..4ec084985d964fcfc9689ec9abad18e1d5987a12 100644 (file)
@@ -486,10 +486,6 @@ def stop_kafka_receiver(receiver, task):
 
 
 def get_ip():
-    return 'localhost'
-
-
-def get_ip_http():
     s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
     try:
         # address should not be reachable
@@ -3600,7 +3596,7 @@ def persistent_notification(endpoint_type):
     host = get_ip()
     if endpoint_type == 'http':
         # create random port for the http server
-        host = get_ip_http()
+        host = get_ip()
         port = random.randint(10000, 20000)
         # start an http server in a separate thread
         receiver = StreamingHTTPServer(host, port, num_workers=10)