コード例 #1
0
ファイル: libvirt.py プロジェクト: minqf/vdsm
def configure():
    # Remove a previous configuration (if present)
    confutils.remove_conf(FILES, CONF_VERSION)

    vdsmConfiguration = {
        'socket_activation': _libvirt_uses_socket_activation(),
        'ssl_enabled': config.getboolean('vars', 'ssl'),
        'sanlock_enabled': constants.SANLOCK_ENABLED,
        'libvirt_selinux': constants.LIBVIRT_SELINUX
    }

    # write configuration
    for cfile, content in FILES.items():
        content['configure'](content, CONF_VERSION, vdsmConfiguration)

    # enable and acivate dev-hugepages1G mounth path
    if not _is_hugetlbfs_1g_mounted():
        try:
            service.service_start('dev-hugepages1G.mount')
        except service.ServiceOperationError:
            status = service.service_status('dev-hugepages1G.mount', False)
            if status == 0:
                raise

    if _libvirt_uses_socket_activation():
        cfg = _read_libvirt_connection_config()

        if cfg.listen_tcp != 0:
            systemctl.enable(_LIBVIRT_TCP_SOCKET_UNIT)

        if cfg.listen_tls != 0:
            systemctl.enable(_LIBVIRT_TLS_SOCKET_UNIT)
コード例 #2
0
ファイル: libvirt.py プロジェクト: rollandf/vdsm
def configure():
    # Remove a previous configuration (if present)
    confutils.remove_conf(FILES, CONF_VERSION)

    vdsmConfiguration = {
        'ssl_enabled': config.getboolean('vars', 'ssl'),
        'sanlock_enabled': constants.SANLOCK_ENABLED,
        'libvirt_selinux': constants.LIBVIRT_SELINUX
    }

    # write configuration
    for cfile, content in FILES.items():
        content['configure'](content, CONF_VERSION, vdsmConfiguration)

    # enable and acivate dev-hugepages1G mounth path
    if not _is_hugetlbfs_1g_mounted():
        try:
            service.service_start('dev-hugepages1G.mount')
        except service.ServiceOperationError:
            status = service.service_status('dev-hugepages1G.mount', False)
            if status == 0:
                raise
コード例 #3
0
ファイル: libvirt.py プロジェクト: nirs/vdsm
def configure():
    # Remove a previous configuration (if present)
    confutils.remove_conf(FILES, CONF_VERSION)

    vdsmConfiguration = {
        'ssl_enabled': config.getboolean('vars', 'ssl'),
        'sanlock_enabled': constants.SANLOCK_ENABLED,
        'libvirt_selinux': constants.LIBVIRT_SELINUX
    }

    # write configuration
    for cfile, content in FILES.items():
        content['configure'](content, CONF_VERSION, vdsmConfiguration)

    # enable and acivate dev-hugepages1G mounth path
    if not _is_hugetlbfs_1g_mounted():
        try:
            service.service_start('dev-hugepages1G.mount')
        except service.ServiceOperationError:
            status = service.service_status('dev-hugepages1G.mount', False)
            if status == 0:
                raise
コード例 #4
0
ファイル: libvirt.py プロジェクト: xin49/vdsm
def removeConf():
    confutils.remove_conf(FILES, CONF_VERSION)
コード例 #5
0
def configure():
    confutils.remove_conf(FILES, CONF_VERSION)
    for conf_file, content in FILES.items():
        content['configure'](content, CONF_VERSION)
コード例 #6
0
ファイル: abrt.py プロジェクト: EdDev/vdsm
def configure():
    confutils.remove_conf(FILES, CONF_VERSION)
    for conf_file, content in FILES.items():
        content['configure'](content, CONF_VERSION)
コード例 #7
0
ファイル: libvirt.py プロジェクト: nirs/vdsm
def removeConf():
    confutils.remove_conf(FILES, CONF_VERSION)
コード例 #8
0
def removeConf():
    confutils.remove_conf(FILES, CONF_VERSION)
    _remove_unit_requirements(
        _LIBVIRT_SERVICE_UNIT,
        [_LIBVIRT_TLS_SOCKET_UNIT, _LIBVIRT_TCP_SOCKET_UNIT])