]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/notifications/test: install java for kafka build 54025/head
authorYuval Lifshitz <ylifshit@redhat.com>
Sun, 15 Oct 2023 15:54:07 +0000 (15:54 +0000)
committerYuval Lifshitz <ylifshit@redhat.com>
Sun, 22 Oct 2023 09:58:37 +0000 (09:58 +0000)
also use kafka binaries insted of building from source

Fixes: https://tracker.ceph.com/issues/63205
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
qa/suites/rgw/notifications/tasks/0-install.yaml
qa/tasks/kafka.py
src/test/rgw/bucket_notification/test_bn.py

index 9e7852d4d25fa2b8879afc327a3ee8f7dfc16293..5c83d5c0d23f8d12e2829114f788973f6dff953a 100644 (file)
@@ -6,6 +6,13 @@ tasks:
     client.0:
 
 overrides:
+  install:
+    ceph:
+      extra_system_packages:
+        rpm:
+        - java
+        deb:
+        - default-jre
   ceph:
     conf:
       global:
index 48bf3611f5a18f77bddfa98691279bc281d9f0f7..5e6c208ca30e7e868745b5f58fcf8886252f7d36 100644 (file)
@@ -17,9 +17,11 @@ def get_kafka_version(config):
             kafka_version = client_config.get('kafka_version')
     return kafka_version
 
+kafka_prefix = 'kafka_2.13-'
+
 def get_kafka_dir(ctx, config):
     kafka_version = get_kafka_version(config)
-    current_version = 'kafka-' + kafka_version + '-src'
+    current_version = kafka_prefix + kafka_version
     return '{tdir}/{ver}'.format(tdir=teuthology.get_testdir(ctx),ver=current_version)
 
 
@@ -36,14 +38,15 @@ def install_kafka(ctx, config):
         test_dir=teuthology.get_testdir(ctx)
         current_version = get_kafka_version(config)
 
-        link1 = 'https://archive.apache.org/dist/kafka/' + current_version + '/kafka-' + current_version + '-src.tgz'
+        kafka_file =  kafka_prefix + current_version + '.tgz'
+
+        link1 = 'https://archive.apache.org/dist/kafka/' + current_version + '/' + kafka_file
         ctx.cluster.only(client).run(
             args=['cd', '{tdir}'.format(tdir=test_dir), run.Raw('&&'), 'wget', link1],
         )
 
-        file1 = 'kafka-' + current_version + '-src.tgz'
         ctx.cluster.only(client).run(
-            args=['cd', '{tdir}'.format(tdir=test_dir), run.Raw('&&'), 'tar', '-xvzf', file1],
+            args=['cd', '{tdir}'.format(tdir=test_dir), run.Raw('&&'), 'tar', '-xvzf', kafka_file],
         )
 
     try:
@@ -61,9 +64,8 @@ def install_kafka(ctx, config):
                 args=['rm', '-rf', test_dir],
             )
 
-            rmfile1 = 'kafka-' + current_version + '-src.tgz'
             ctx.cluster.only(client).run(
-                args=['rm', '-rf', '{tdir}/{doc}'.format(tdir=teuthology.get_testdir(ctx),doc=rmfile1)],
+                args=['rm', '-rf', '{tdir}/{doc}'.format(tdir=teuthology.get_testdir(ctx),doc=kafka_file)],
             )
 
 
@@ -79,13 +81,6 @@ def run_kafka(ctx,config):
     for (client,_) in config.items():
         (remote,) = ctx.cluster.only(client).remotes.keys()
 
-        ctx.cluster.only(client).run(
-            args=['cd', '{tdir}'.format(tdir=get_kafka_dir(ctx, config)), run.Raw('&&'),
-             './gradlew', 'jar', 
-             '-PscalaVersion=2.13.2'
-            ],
-        )
-
         ctx.cluster.only(client).run(
             args=['cd', '{tdir}/bin'.format(tdir=get_kafka_dir(ctx, config)), run.Raw('&&'),
              './zookeeper-server-start.sh',
index 041ca3ebe1146a4229955f0af0b8aaf149b13c05..fc5887869fcbd8b5f8e95dd81cbee0d9d03ba63c 100644 (file)
@@ -1615,8 +1615,7 @@ def test_ps_s3_notification_push_kafka_on_master():
         time.sleep(5)
         receiver.verify_s3_events(keys, exact_match=True, deletions=True, etags=etags)
     except Exception as e:
-        print(e)
-        assert False
+        assert False, str(e)
     finally:
         # cleanup
         if s3_notification_conf is not None: