]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge PR #19987 into master
authorSage Weil <sage@redhat.com>
Fri, 16 Nov 2018 06:22:17 +0000 (00:22 -0600)
committerSage Weil <sage@redhat.com>
Fri, 16 Nov 2018 06:22:17 +0000 (00:22 -0600)
* refs/pull/19987/head:
qa/tasks/ceph: ignore failure when chown ceph:ceph

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
1  2 
qa/tasks/ceph.py

index a55a69d85715999dad3afdc33a4bd7a874ebb807,c6336d5d18d3ba1b30bb4ffcc7497f81cb3775de..cff56c0b02687d36b126c6f4d69f917fc4c1d258
@@@ -776,47 -778,32 +776,52 @@@ def cluster(ctx, config)
  
          for role in teuthology.cluster_roles_of_type(roles_for_host, 'osd', cluster_name):
              _, _, id_ = teuthology.split_role(role)
 -            remote.run(
 -                args=[
 -                    'sudo',
 -                    'MALLOC_CHECK_=3',
 -                    'adjust-ulimits',
 -                    'ceph-coverage',
 -                    coverage_dir,
 -                    'ceph-osd',
 -                    '--cluster',
 -                    cluster_name,
 -                    '--mkfs',
 -                    '--mkkey',
 -                    '-i', id_,
 +            try:
 +                remote.run(
 +                    args=[
 +                        'sudo',
 +                        'MALLOC_CHECK_=3',
 +                        'adjust-ulimits',
 +                        'ceph-coverage',
 +                        coverage_dir,
 +                        'ceph-osd',
 +                        '--no-mon-config',
 +                        '--cluster',
 +                        cluster_name,
 +                        '--mkfs',
 +                        '--mkkey',
 +                        '-i', id_,
                      '--monmap', monmap_path,
 -                ],
 -            )
 +                    ],
 +                )
 +            except run.CommandFailedError:
 +                # try without --no-mon-config.. this may be an upgrade test
 +                remote.run(
 +                    args=[
 +                        'sudo',
 +                        'MALLOC_CHECK_=3',
 +                        'adjust-ulimits',
 +                        'ceph-coverage',
 +                        coverage_dir,
 +                        'ceph-osd',
 +                        '--cluster',
 +                        cluster_name,
 +                        '--mkfs',
 +                        '--mkkey',
 +                        '-i', id_,
 +                    '--monmap', monmap_path,
 +                    ],
 +                )
              mnt_point = DATA_PATH.format(
                  type_='osd', cluster=cluster_name, id_=id_)
-             remote.run(args=[
-                 'sudo', 'chown', '-R', 'ceph:ceph', mnt_point
-             ])
+             try:
+                 remote.run(args=[
+                     'sudo', 'chown', '-R', 'ceph:ceph', mnt_point
+                 ])
+             except run.CommandFailedError as e:
+                 # hammer does not have ceph user, so ignore this error
+                 log.info('ignoring error when chown ceph:ceph,'
+                          'probably installing hammer: %s', e)
  
      log.info('Reading keys from all nodes...')
      keys_fp = StringIO()