示例#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])