Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
null | ceph-main/src/ceph-volume/ceph_volume/devices/raw/activate.py | from __future__ import print_function
import argparse
import logging
import os
from textwrap import dedent
from ceph_volume import process, conf, decorators, terminal
from ceph_volume.util import system
from ceph_volume.util import prepare as prepare_utils
from .list import direct_report
logger = logging.getLogger(__... | 5,575 | 32.389222 | 88 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/raw/common.py | import argparse
from ceph_volume.util import arg_validators
def create_parser(prog, description):
"""
Both prepare and create share the same parser, those are defined here to
avoid duplication
"""
parser = argparse.ArgumentParser(
prog=prog,
formatter_class=argparse.RawDescriptionHe... | 1,678 | 27.457627 | 76 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/raw/list.py | from __future__ import print_function
import argparse
import json
import logging
from textwrap import dedent
from ceph_volume import decorators, process
from ceph_volume.util import disk
logger = logging.getLogger(__name__)
def direct_report(devices):
"""
Other non-cli consumers of listing information will ... | 6,879 | 40.95122 | 150 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/raw/main.py | import argparse
from textwrap import dedent
from ceph_volume import terminal
from . import list
from . import prepare
from . import activate
class Raw(object):
help = 'Manage single-device OSDs on raw block devices'
_help = dedent("""
Manage a single-device OSD on a raw block device. Rely on
the exi... | 1,069 | 25.097561 | 71 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/raw/prepare.py | from __future__ import print_function
import json
import logging
import os
from textwrap import dedent
from ceph_volume.util import prepare as prepare_utils
from ceph_volume.util import encryption as encryption_utils
from ceph_volume.util import disk
from ceph_volume.util import system
from ceph_volume import decorator... | 5,952 | 33.610465 | 119 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/simple/__init__.py | from .main import Simple # noqa
| 32 | 15.5 | 31 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/simple/activate.py | from __future__ import print_function
import argparse
import base64
import glob
import json
import logging
import os
from textwrap import dedent
from ceph_volume import process, decorators, terminal, conf
from ceph_volume.util import system, disk
from ceph_volume.util import encryption as encryption_utils
from ceph_vol... | 11,830 | 40.805654 | 102 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/simple/main.py | import argparse
from textwrap import dedent
from ceph_volume import terminal
from . import scan
from . import activate
from . import trigger
class Simple(object):
help = 'Manage already deployed OSDs with ceph-volume'
_help = dedent("""
Take over a deployed OSD, persisting its metadata in /etc/ceph/osd/... | 1,116 | 25.595238 | 97 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/simple/scan.py | from __future__ import print_function
import argparse
import base64
import json
import logging
import os
from textwrap import dedent
from ceph_volume import decorators, terminal, conf
from ceph_volume.api import lvm
from ceph_volume.systemd import systemctl
from ceph_volume.util import arg_validators, system, disk, enc... | 15,700 | 39.676166 | 117 | py |
null | ceph-main/src/ceph-volume/ceph_volume/devices/simple/trigger.py | from __future__ import print_function
import argparse
from textwrap import dedent
from ceph_volume.exceptions import SuffixParsingError
from ceph_volume import decorators
from .activate import Activate
def parse_osd_id(string):
osd_id = string.split('-', 1)[0]
if not osd_id:
raise SuffixParsingError('... | 2,202 | 30.028169 | 95 | py |
null | ceph-main/src/ceph-volume/ceph_volume/drive_group/__init__.py | from .main import Deploy # noqa
| 32 | 15.5 | 31 | py |
null | ceph-main/src/ceph-volume/ceph_volume/drive_group/main.py | # -*- coding: utf-8 -*-
import argparse
import json
import logging
import sys
from ceph.deployment.drive_group import DriveGroupSpec
from ceph.deployment.drive_selection.selector import DriveSelection
from ceph.deployment.translate import to_ceph_volume
from ceph.deployment.inventory import Device
from ceph_volume.in... | 3,197 | 31.30303 | 95 | py |
null | ceph-main/src/ceph-volume/ceph_volume/inventory/__init__.py | from .main import Inventory # noqa
| 35 | 17 | 34 | py |
null | ceph-main/src/ceph-volume/ceph_volume/inventory/main.py | # -*- coding: utf-8 -*-
import argparse
import json
from ceph_volume.util.device import Devices, Device
class Inventory(object):
help = "Get this nodes available disk inventory"
def __init__(self, argv):
self.argv = argv
def main(self):
parser = argparse.ArgumentParser(
pr... | 2,219 | 31.647059 | 114 | py |
null | ceph-main/src/ceph-volume/ceph_volume/systemd/__init__.py | from .main import main # noqa
| 30 | 14.5 | 29 | py |
null | ceph-main/src/ceph-volume/ceph_volume/systemd/main.py | """
This file is used only by systemd units that are passing their instance suffix
as arguments to this script so that it can parse the suffix into arguments that
``ceph-volume <sub command>`` can consume
"""
import os
import sys
import time
import logging
from ceph_volume import log, process
from ceph_volume.exception... | 3,566 | 31.724771 | 95 | py |
null | ceph-main/src/ceph-volume/ceph_volume/systemd/systemctl.py | """
Utilities to control systemd units
"""
import logging
from ceph_volume import process
logger = logging.getLogger(__name__)
def start(unit):
process.run(['systemctl', 'start', unit])
def stop(unit):
process.run(['systemctl', 'stop', unit])
def enable(unit, runtime=False):
if runtime:
proce... | 2,306 | 21.617647 | 85 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/__init__.py | 0 | 0 | 0 | py | |
null | ceph-main/src/ceph-volume/ceph_volume/tests/conftest.py | import os
import pytest
from mock.mock import patch, PropertyMock, create_autospec
from ceph_volume.api import lvm
from ceph_volume.util import disk
from ceph_volume.util import device
from ceph_volume.util.constants import ceph_disk_guids
from ceph_volume import conf, configuration
class Capture(object):
def __... | 10,342 | 30.726994 | 98 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/test_configuration.py | import os
try:
from cStringIO import StringIO
except ImportError: # pragma: no cover
from io import StringIO # pragma: no cover
from textwrap import dedent
import pytest
from ceph_volume import configuration, exceptions
tabbed_conf = """
[global]
default = 0
other_h = 1 # comment
... | 3,819 | 31.372881 | 70 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/test_decorators.py | import os
import pytest
from ceph_volume import exceptions, decorators, terminal
class TestNeedsRoot(object):
def test_is_root(self, monkeypatch):
def func():
return True
monkeypatch.setattr(decorators.os, 'getuid', lambda: 0)
assert decorators.needs_root(func)() is True
... | 2,487 | 30.493671 | 91 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/test_inventory.py | # -*- coding: utf-8 -*-
import pytest
from ceph_volume.util.device import Devices
from ceph_volume.util.lsmdisk import LSMDisk
from mock.mock import patch
import ceph_volume.util.lsmdisk as lsmdisk
@pytest.fixture
@patch("ceph_volume.util.disk.has_bluestore_label", lambda x: False)
def device_report_keys(device_info... | 8,545 | 31.371212 | 98 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/test_main.py | import os
import pytest
from ceph_volume import main
class TestVolume(object):
def test_main_spits_help_with_no_arguments(self, capsys):
with pytest.raises(SystemExit):
main.Volume(argv=[])
stdout, stderr = capsys.readouterr()
assert 'Log Path' in stdout
def test_warn_abo... | 2,823 | 39.342857 | 113 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/test_process.py | import pytest
import logging
from ceph_volume.tests.conftest import Factory
from ceph_volume import process
@pytest.fixture
def mock_call(monkeypatch):
"""
Monkeypatches process.call, so that a caller can add behavior to the response
"""
def apply(stdout=None, stderr=None, returncode=0):
stdou... | 3,292 | 34.408602 | 81 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/test_terminal.py | # -*- mode:python; tab-width:4; indent-tabs-mode:nil; coding:utf-8 -*-
import codecs
import io
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
import sys
from ceph_volume import terminal
from ceph_volume.log import setup_console
class SubCommand(object):
help... | 4,509 | 30.319444 | 81 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/api/test_lvm.py | import os
import pytest
from mock.mock import patch
from ceph_volume import process, exceptions
from ceph_volume.api import lvm as api
class TestParseTags(object):
def test_no_tags_means_empty_dict(self):
result = api.parse_tags('')
assert result == {}
def test_single_tag_gets_parsed(self):
... | 35,099 | 38.616253 | 122 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/__init__.py | 0 | 0 | 0 | py | |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/test_zap.py | import pytest
from ceph_volume.devices import lvm
from mock.mock import patch, MagicMock
class TestZap(object):
def test_main_spits_help_with_no_arguments(self, capsys):
lvm.zap.Zap([]).main()
stdout, stderr = capsys.readouterr()
assert 'Zaps the given logical volume(s), raw device(s) or ... | 1,350 | 33.641026 | 116 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/__init__.py | 0 | 0 | 0 | py | |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_activate.py | import pytest
from copy import deepcopy
from ceph_volume.devices.lvm import activate
from ceph_volume.api import lvm as api
from ceph_volume.tests.conftest import Capture
class Args(object):
def __init__(self, **kw):
# default flags
self.bluestore = False
self.no_systemd = False
s... | 13,393 | 49.734848 | 420 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_batch.py | import pytest
import json
import random
from argparse import ArgumentError
from mock import MagicMock, patch
from ceph_volume.api import lvm
from ceph_volume.devices.lvm import batch
from ceph_volume.util import arg_validators
class TestBatch(object):
def test_batch_instance(self, is_root):
b = batch.B... | 16,322 | 45.240793 | 122 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_common.py | from ceph_volume.devices.lvm import common
class TestCommon(object):
def test_get_default_args_smoke(self):
default_args = common.get_default_args()
assert default_args
| 192 | 20.444444 | 48 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_create.py | import pytest
from ceph_volume.devices import lvm
class TestCreate(object):
def test_main_spits_help_with_no_arguments(self, capsys):
lvm.create.Create([]).main()
stdout, stderr = capsys.readouterr()
assert 'Create an OSD by assigning an ID and FSID' in stdout
def test_main_shows_ful... | 595 | 30.368421 | 68 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_deactivate.py | import pytest
from mock.mock import patch
from ceph_volume.api import lvm
from ceph_volume.devices.lvm import deactivate
class TestDeactivate(object):
@patch("ceph_volume.devices.lvm.deactivate.get_lvs_by_tag")
def test_no_osd(self, p_get_lvs):
p_get_lvs.return_value = []
with pytest.raises(St... | 2,482 | 40.383333 | 90 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_listing.py | import pytest
from ceph_volume.devices import lvm
from ceph_volume.api import lvm as api
# TODO: add tests for following commands -
# ceph-volume list
# ceph-volume list <path-to-pv>
# ceph-volume list <path-to-vg>
# ceph-volume list <path-to-lv>
class TestReadableTag(object):
def test_dots_get_replaced(self):
... | 15,261 | 42.235127 | 89 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_migrate.py | import pytest
from mock.mock import patch
from ceph_volume import process
from ceph_volume.api import lvm as api
from ceph_volume.devices.lvm import migrate
from ceph_volume.util.device import Device
from ceph_volume.util import system
class TestGetClusterName(object):
mock_volumes = []
def mock_get_lvs(self,... | 94,399 | 40.043478 | 122 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_prepare.py | import pytest
from ceph_volume.devices import lvm
from ceph_volume.api import lvm as api
from mock.mock import patch, Mock
class TestLVM(object):
def test_main_spits_help_with_no_arguments(self, capsys):
lvm.main.LVM([]).main()
stdout, stderr = capsys.readouterr()
assert 'Use LVM and LVM-... | 6,360 | 44.435714 | 150 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_trigger.py | import pytest
from ceph_volume import exceptions
from ceph_volume.devices.lvm import trigger
class TestParseOSDid(object):
def test_no_id_found_if_no_digit(self):
with pytest.raises(exceptions.SuffixParsingError):
trigger.parse_osd_id('asdlj-ljahsdfaslkjhdfa')
def test_no_id_found(self):... | 1,543 | 32.565217 | 81 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/lvm/test_zap.py | import os
import pytest
from copy import deepcopy
from mock.mock import patch, call
from ceph_volume import process
from ceph_volume.api import lvm as api
from ceph_volume.devices.lvm import zap
class TestZap(object):
def test_invalid_osd_id_passed(self):
with pytest.raises(SystemExit):
zap.Za... | 10,275 | 41.46281 | 120 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/raw/__init__.py | 0 | 0 | 0 | py | |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/raw/test_list.py | import pytest
from mock.mock import patch
from ceph_volume.devices import raw
# Sample lsblk output is below that overviews the test scenario. (--json output for reader clarity)
# - sda and all its children are used for the OS
# - sdb is a bluestore OSD with phantom Atari partitions
# - sdc is an empty disk
# - sd... | 10,354 | 42.32636 | 153 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/raw/test_prepare.py | import pytest
from ceph_volume.devices import raw
from mock.mock import patch
class TestRaw(object):
def test_main_spits_help_with_no_arguments(self, capsys):
raw.main.Raw([]).main()
stdout, stderr = capsys.readouterr()
assert 'Manage a single-device OSD on a raw block device.' in stdout
... | 4,558 | 45.520408 | 95 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/simple/test_activate.py | import os
import pytest
from ceph_volume.devices.simple import activate
class TestActivate(object):
def test_no_data_uuid(self, factory, is_root, monkeypatch, capture, fake_filesystem):
fake_filesystem.create_file('/tmp/json-config', contents='{}')
args = factory(osd_id='0', osd_fsid='1234', json... | 7,905 | 46.915152 | 118 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/simple/test_scan.py | import os
import pytest
from ceph_volume.devices.simple import scan
class TestGetContents(object):
def setup_method(self):
self.magic_file_name = '/tmp/magic-file'
def test_multiple_lines_are_left_as_is(self, fake_filesystem):
magic_file = fake_filesystem.create_file(self.magic_file_name, co... | 2,691 | 36.388889 | 98 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/devices/simple/test_trigger.py | import pytest
from ceph_volume import exceptions
from ceph_volume.devices.simple import trigger
class TestParseOSDid(object):
def test_no_id_found_if_no_digit(self):
with pytest.raises(exceptions.SuffixParsingError):
trigger.parse_osd_id('asdlj-ljahsdfaslkjhdfa')
def test_no_id_found(sel... | 1,546 | 32.630435 | 81 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/README.md | # ceph-volume functional test suite
This test suite is based on vagrant and is normally run via Jenkins on github
PRs. With a functioning Vagrant installation these test can also be run locally
(tested with vagrant's libvirt provider).
## Vagrant with libvirt
By default the tests make assumption on the network segmen... | 1,061 | 41.48 | 87 | md |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/vagrant_variables.yml | ---
# DEFINE THE NUMBER OF VMS TO RUN
mon_vms: 1
osd_vms: 1
mds_vms: 0
rgw_vms: 0
nfs_vms: 0
rbd_mirror_vms: 0
client_vms: 0
iscsi_gw_vms: 0
mgr_vms: 0
# SUBNETS TO USE FOR THE VMS
public_subnet: 192.168.3
cluster_subnet: 192.168.4
# MEMORY
# set 1024 for CentOS
memory: 1024
# Ethernet interface name
# use eth1 for... | 2,344 | 39.431034 | 172 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-dmcrypt-explicit/setup.yml | ../../../playbooks/setup_mixed_type.yml | 39 | 39 | 39 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-dmcrypt-explicit/test.yml | ../../../playbooks/test_explicit.yml | 36 | 36 | 36 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-dmcrypt-explicit/test_zap.yml | ../../../playbooks/test_zap.yml | 31 | 31 | 31 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-dmcrypt-explicit/vagrant_variables.yml | ../../../../vagrant_variables.yml | 33 | 33 | 33 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-dmcrypt/setup.yml | ../../../playbooks/setup_mixed_type.yml | 39 | 39 | 39 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-dmcrypt/test.yml | ../../../playbooks/test.yml | 27 | 27 | 27 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-dmcrypt/test_zap.yml | ../../../playbooks/test_zap.yml | 31 | 31 | 31 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-dmcrypt/vagrant_variables.yml | ../../../../vagrant_variables.yml | 33 | 33 | 33 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-explicit/setup.yml | ../../../playbooks/setup_mixed_type.yml | 39 | 39 | 39 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-explicit/test.yml | ../../../playbooks/test_explicit.yml | 36 | 36 | 36 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-explicit/test_zap.yml | ../../../playbooks/test_zap.yml | 31 | 31 | 31 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type-explicit/vagrant_variables.yml | ../../../../vagrant_variables.yml | 33 | 33 | 33 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type/setup.yml | ../../../playbooks/setup_mixed_type.yml | 39 | 39 | 39 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type/test.yml | ../../../playbooks/test.yml | 27 | 27 | 27 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type/test_zap.yml | ../../../playbooks/test_zap.yml | 31 | 31 | 31 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/mixed-type/vagrant_variables.yml | ../../../../vagrant_variables.yml | 33 | 33 | 33 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/single-type-dmcrypt/setup.yml | ../../../playbooks/noop.yml | 27 | 27 | 27 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/single-type-dmcrypt/test.yml | ../../../playbooks/test.yml | 27 | 27 | 27 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/single-type-dmcrypt/test_zap.yml | ../../../playbooks/test_zap.yml | 31 | 31 | 31 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/single-type-dmcrypt/vagrant_variables.yml | ../../../../vagrant_variables.yml | 33 | 33 | 33 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/single-type/setup.yml | ../../../playbooks/noop.yml | 27 | 27 | 27 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/single-type/test.yml | ../../../playbooks/test.yml | 27 | 27 | 27 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/single-type/test_zap.yml | ../../../playbooks/test_zap.yml | 31 | 31 | 31 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/centos8/bluestore/single-type/vagrant_variables.yml | ../../../../vagrant_variables.yml | 33 | 33 | 33 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/noop.yml | ---
# Allows to always include a 'setup.yml' file in functional tests, and execute
# only on the ones that actually need it
- hosts: all
gather_facts: no
tasks:
- debug:
msg: "This is an empty setup playbook. The current scenario didn't need any work done"
| 277 | 20.384615 | 94 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/setup_mixed_type.yml | ---
- hosts: osds
become: yes
tasks:
- name: install lvm2
package:
name: lvm2
state: present
- name: tell lvm to ignore loop devices
lineinfile:
path: /etc/lvm/lvm.conf
line: "\tfilter = [ 'r|loop.*|' ]"
insertafter: 'devices {'
- name: lvm allow chan... | 5,678 | 25.291667 | 72 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test.yml |
- hosts: osds
become: yes
tasks:
- name: stop ceph-osd daemons
service:
name: "ceph-osd@{{ item }}"
state: stopped
with_items: "{{ osd_ids }}"
- hosts: mons
become: yes
tasks:
- name: mark osds down
command: "ceph --cluster {{ cluster }} osd down osd.{{ item }}"
... | 2,145 | 32.015385 | 208 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test_explicit.yml |
- hosts: osds
become: yes
tasks:
- name: stop ceph-osd daemons
service:
name: "ceph-osd@{{ item }}"
state: stopped
with_items: "{{ osd_ids }}"
- hosts: mons
become: yes
tasks:
- name: mark osds down
command: "ceph --cluster {{ cluster }} osd down osd.{{ item }}"
... | 2,350 | 35.169231 | 265 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/batch/playbooks/test_zap.yml |
- hosts: osds
become: yes
tasks:
- name: stop ceph-osd daemons
service:
name: "ceph-osd@{{ item }}"
state: stopped
with_items: "{{ osd_ids }}"
- hosts: mons
become: yes
tasks:
- name: mark osds down
command: "ceph --cluster {{ cluster }} osd down osd.{{ item }}"
... | 755 | 20.6 | 93 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/lvm/centos8/bluestore/create/setup.yml | ../../../playbooks/setup_partitions.yml | 39 | 39 | 39 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/lvm/centos8/bluestore/create/test.yml | ../../../playbooks/test_bluestore.yml | 37 | 37 | 37 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/lvm/centos8/bluestore/create/vagrant_variables.yml | ../../../../vagrant_variables.yml | 33 | 33 | 33 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/lvm/centos8/bluestore/dmcrypt/setup.yml | ../../../playbooks/setup_partitions.yml | 39 | 39 | 39 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/lvm/centos8/bluestore/dmcrypt/test.yml | - hosts: osds
become: yes
tasks:
- name: stop ceph-osd@2 daemon
service:
name: ceph-osd@2
state: stopped
- name: stop ceph-osd@0 daemon
service:
name: ceph-osd@0
state: stopped
- hosts: mons
become: yes
tasks:
- name: mark osds down
command: "ceph... | 3,158 | 24.475806 | 114 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/lvm/centos8/bluestore/dmcrypt/vagrant_variables.yml | ../../../../vagrant_variables.yml | 33 | 33 | 33 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/setup_partitions.yml | ---
- hosts: osds
gather_facts: false
become: yes
tasks:
- name: partition /dev/vdd for lvm data usage
parted:
device: /dev/vdd
number: 1
part_start: 0%
part_end: 50%
unit: '%'
label: gpt
state: present
- name: partition /dev/vdd lvm journal... | 487 | 16.428571 | 49 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_bluestore.yml |
- hosts: osds
become: yes
tasks:
- name: stop ceph-osd@2 daemon
service:
name: ceph-osd@2
state: stopped
- name: stop ceph-osd@0 daemon
service:
name: ceph-osd@0
state: stopped
- hosts: mons
become: yes
tasks:
- name: mark osds down
command: "ce... | 4,367 | 25.962963 | 114 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml | ---
# Defines deployment design and assigns role to server groups
- hosts:
- mons
- osds
- mgrs
gather_facts: false
any_errors_fatal: true
become: true
tags:
- always
vars:
delegate_facts_host: True
dashboard_enabled: False
environment:
DEBIAN_FRONTEND: noninteractive
pre_tasks... | 4,353 | 25.071856 | 80 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/scripts/generate_ssh_config.sh | #!/bin/bash
# Generate a custom ssh config from Vagrant so that it can then be used by
# ansible.cfg
path=$1
if [ $# -eq 0 ]
then
echo "A path to the scenario is required as an argument and it wasn't provided"
exit 1
fi
cd "$path"
vagrant ssh-config > vagrant_ssh_config
| 285 | 18.066667 | 83 | sh |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/scripts/output.py | import os
from ceph_volume import terminal
char = os.environ.get('INVALID')
terminal.stdout(char)
| 99 | 15.666667 | 32 | py |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/scripts/test_unicode.sh | #!/bin/bash
# Not entirely sure why these executables don't seem to be available in the
# $PATH when running from tox. Calling out to `which` seems to fix it, at the
# expense of making the script a bit obtuse
mktemp=$(which mktemp)
cat=$(which cat)
grep=$(which grep)
PYTHON_EXECUTABLE=`which python3`
STDERR_FILE=$($... | 909 | 24.277778 | 96 | sh |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/scripts/vagrant_reload.sh | #!/bin/bash
# vagrant-libvirt has a common behavior where it times out when "reloading" vms. Instead
# of calling `vagrant reload` attempt to halt everything, and then start everything, which gives
# this script the ability to try the `vagrant up` again in case of failure
#
vagrant halt
# This should not really be ne... | 593 | 26 | 96 | sh |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/scripts/vagrant_up.sh | #!/bin/bash
set -e
retries=0
until [ $retries -ge 5 ]
do
echo "Attempting to start VMs. Attempts: $retries"
timeout 10m vagrant up "$@" && break
retries=$[$retries+1]
sleep 5
done
sleep 10
| 200 | 12.4 | 52 | sh |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/activate/test.yml | ---
- hosts: osds
become: yes
tasks:
- name: list all OSD directories
find:
paths: /var/lib/ceph/osd
file_type: directory
register: osd_paths
- name: scan all OSD directories
command: "ceph-volume --cluster={{ cluster }} simple scan {{ item.path }}"
environment:
... | 762 | 22.84375 | 91 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/activate/vagrant_variables.yml | ---
# DEPLOY CONTAINERIZED DAEMONS
docker: false
# DEFINE THE NUMBER OF VMS TO RUN
mon_vms: 1
osd_vms: 2
mds_vms: 0
rgw_vms: 0
nfs_vms: 0
rbd_mirror_vms: 0
client_vms: 0
iscsi_gw_vms: 0
mgr_vms: 0
# INSTALL SOURCE OF CEPH
# valid values are 'stable' and 'dev'
ceph_install_source: stable
# SUBNETS TO USE FOR THE VM... | 2,605 | 34.216216 | 172 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/activate/host_vars/osd0.yml | ---
devices:
- '/dev/sdb'
dedicated_devices:
- '/dev/sdc'
osd_scenario: "non-collocated"
| 94 | 10.875 | 30 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/activate/host_vars/osd1.yml | ---
devices:
- '/dev/sdb'
- '/dev/sdc'
osd_scenario: "collocated"
| 71 | 9.285714 | 26 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-luks/test.yml | ---
- hosts: osds
become: yes
tasks:
- name: scan all running OSDs
command: "ceph-volume --cluster={{ cluster }} simple scan"
environment:
CEPH_VOLUME_DEBUG: 1
- name: activate all scanned OSDs
command: "ceph-volume --cluster={{ cluster }} simple activate --all"
environmen... | 352 | 21.0625 | 74 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-luks/vagrant_variables.yml | ---
# DEPLOY CONTAINERIZED DAEMONS
docker: false
# DEFINE THE NUMBER OF VMS TO RUN
mon_vms: 1
osd_vms: 2
mds_vms: 0
rgw_vms: 0
nfs_vms: 0
rbd_mirror_vms: 0
client_vms: 0
iscsi_gw_vms: 0
mgr_vms: 0
# INSTALL SOURCE OF CEPH
# valid values are 'stable' and 'dev'
ceph_install_source: stable
# SUBNETS TO USE FOR THE VM... | 2,605 | 34.216216 | 172 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-luks/host_vars/osd0.yml | ---
devices:
- '/dev/sdb'
dedicated_devices:
- '/dev/sdc'
osd_scenario: "non-collocated"
| 94 | 10.875 | 30 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-luks/host_vars/osd1.yml | ---
devices:
- '/dev/sdb'
- '/dev/sdc'
osd_scenario: "collocated"
| 71 | 9.285714 | 26 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-plain/test.yml | ---
- hosts: osds
become: yes
tasks:
- name: list all OSD directories
find:
paths: /var/lib/ceph/osd
file_type: directory
register: osd_paths
- name: scan all OSD directories
command: "ceph-volume --cluster={{ cluster }} simple scan {{ item.path }}"
environment:
... | 762 | 22.84375 | 91 | yml |
null | ceph-main/src/ceph-volume/ceph_volume/tests/functional/simple/centos7/bluestore/dmcrypt-plain/vagrant_variables.yml | ---
# DEPLOY CONTAINERIZED DAEMONS
docker: false
# DEFINE THE NUMBER OF VMS TO RUN
mon_vms: 1
osd_vms: 2
mds_vms: 0
rgw_vms: 0
nfs_vms: 0
rbd_mirror_vms: 0
client_vms: 0
iscsi_gw_vms: 0
mgr_vms: 0
# INSTALL SOURCE OF CEPH
# valid values are 'stable' and 'dev'
ceph_install_source: stable
# SUBNETS TO USE FOR THE VM... | 2,605 | 34.216216 | 172 | yml |