Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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
Exemplo n.º 3
0
Arquivo: libvirt.py Projeto: 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
Exemplo n.º 4
0
def removeConf():
    confutils.remove_conf(FILES, CONF_VERSION)
Exemplo n.º 5
0
def configure():
    confutils.remove_conf(FILES, CONF_VERSION)
    for conf_file, content in FILES.items():
        content['configure'](content, CONF_VERSION)
Exemplo n.º 6
0
Arquivo: abrt.py Projeto: EdDev/vdsm
def configure():
    confutils.remove_conf(FILES, CONF_VERSION)
    for conf_file, content in FILES.items():
        content['configure'](content, CONF_VERSION)
Exemplo n.º 7
0
Arquivo: libvirt.py Projeto: nirs/vdsm
def removeConf():
    confutils.remove_conf(FILES, CONF_VERSION)
Exemplo n.º 8
0
def removeConf():
    confutils.remove_conf(FILES, CONF_VERSION)
    _remove_unit_requirements(
        _LIBVIRT_SERVICE_UNIT,
        [_LIBVIRT_TLS_SOCKET_UNIT, _LIBVIRT_TCP_SOCKET_UNIT])