Example #1
0
 def test_min_pool_size_is_correct(self, data):
     contents = dedent("""
     [global]
     cluster = foo
     osd_pool_default_min_size = 2
     """)
     osd_data = data()
     osd_data['paths']['/etc/ceph']['files']['/etc/ceph/ceph.conf'] = {
         'contents': contents
     }
     result = osds.check_min_pool_size(None, osd_data)
     assert result is None
Example #2
0
 def test_min_pool_size_fails(self, data):
     contents = dedent("""
     [global]
     cluster = foo
     osd_pool_default_min_size = 1
     """)
     osd_data = data()
     osd_data['paths']['/etc/ceph']['files']['/etc/ceph/ceph.conf'] = {
         'contents': contents
     }
     code, error = osds.check_min_pool_size(None, osd_data)
     assert error == 'osd default pool size is set to 1, can potentially lose data'