Exemplo n.º 1
0
def create(distro, logger, args, monitor_keyring):
    hostname = distro.sudo_conn.modules.socket.gethostname().split('.')[0]
    common.mon_create(distro, logger, args, monitor_keyring, hostname)

    if distro.init == 'upstart': # Ubuntu uses upstart
        check_call(
            distro.sudo_conn,
            logger,
            [
                'initctl',
                'emit',
                'ceph-mon',
                'cluster={cluster}'.format(cluster=args.cluster),
                'id={hostname}'.format(hostname=hostname),
            ],
            patch=False,
        )

    elif distro.init == 'sysvinit': # Debian uses sysvinit
        service = common.which_service(distro.sudo_conn, logger)

        check_call(
            distro.sudo_conn,
            logger,
            [
                service,
                'ceph',
                'start',
                'mon.{hostname}'.format(hostname=hostname)
            ],
            patch=False,
        )
    else:
        raise RuntimeError('create cannot use init %s' % distro.init)
Exemplo n.º 2
0
def create(distro, logger, args, monitor_keyring):
    hostname = distro.sudo_conn.modules.socket.gethostname().split('.')[0]
    common.mon_create(distro, logger, args, monitor_keyring, hostname)

    if distro.init == 'upstart':  # Ubuntu uses upstart
        check_call(
            distro.sudo_conn,
            logger,
            [
                'initctl',
                'emit',
                'ceph-mon',
                'cluster={cluster}'.format(cluster=args.cluster),
                'id={hostname}'.format(hostname=hostname),
            ],
            patch=False,
        )

    elif distro.init == 'sysvinit':  # Debian uses sysvinit
        service = common.which_service(distro.sudo_conn, logger)

        check_call(
            distro.sudo_conn,
            logger,
            [
                service, 'ceph', 'start',
                'mon.{hostname}'.format(hostname=hostname)
            ],
            patch=False,
        )
    else:
        raise RuntimeError('create cannot use init %s' % distro.init)
Exemplo n.º 3
0
def create(distro, logger, args, monitor_keyring):
    hostname = distro.sudo_conn.modules.socket.gethostname().split('.')[0]
    common.mon_create(distro, logger, args, monitor_keyring, hostname)
    service = common.which_service(distro.sudo_conn, logger)
    check_call(
        distro.sudo_conn,
        logger,
        [service, 'ceph', 'start', 'mon.{hostname}'.format(hostname=hostname)],
        patch=False,
    )
Exemplo n.º 4
0
def create(distro, logger, args, monitor_keyring):
    hostname = distro.sudo_conn.modules.socket.gethostname().split('.')[0]
    common.mon_create(distro, logger, args, monitor_keyring, hostname)
    service = common.which_service(distro.sudo_conn, logger)
    check_call(
        distro.sudo_conn,
        logger,
        [
            service,
            'ceph',
            'start',
            'mon.{hostname}'.format(hostname=hostname)
        ],
        patch=False,
    )
Exemplo n.º 5
0
def create(distro, logger, args, monitor_keyring):
    hostname = remote_shortname(distro.sudo_conn.modules.socket)
    common.mon_create(distro, logger, args, monitor_keyring, hostname)
    service = common.which_service(distro.sudo_conn, logger)

    distro.sudo_conn.close()

    # TODO transition this once pushy is out
    rconn = get_connection(hostname, logger)
    process.run(
        rconn,
        [
            service,
            'ceph',
            'start',
            'mon.{hostname}'.format(hostname=hostname)
        ],
        exit=True,
        timeout=7,
    )
Exemplo n.º 6
0
def create(distro, logger, args, monitor_keyring):
    hostname = remote_shortname(distro.sudo_conn.modules.socket)
    common.mon_create(distro, logger, args, monitor_keyring, hostname)
    service = common.which_service(distro.sudo_conn, logger)

    distro.sudo_conn.close()

    # TODO transition this once pushy is out
    rconn = get_connection(hostname, logger)

    process.run(
        rconn,
        [
            service, 'ceph', '-c',
            '/etc/ceph/{cluster}.conf'.format(cluster=args.cluster), 'start',
            'mon.{hostname}'.format(hostname=hostname)
        ],
        exit=True,
        timeout=7,
    )
Exemplo n.º 7
0
def create(distro, logger, args, monitor_keyring):
    hostname = remote_shortname(distro.sudo_conn.modules.socket)
    common.mon_create(distro, logger, args, monitor_keyring, hostname)
    service = common.which_service(distro.sudo_conn, logger)

    distro.sudo_conn.close()
    # TODO transition this once pushy is out
    rconn = get_connection(hostname, logger)

    if distro.init == 'upstart':  # Ubuntu uses upstart
        process.run(
            rconn,
            [
                'initctl',
                'emit',
                'ceph-mon',
                'cluster={cluster}'.format(cluster=args.cluster),
                'id={hostname}'.format(hostname=hostname),
            ],
            exit=True,
            timeout=7,
        )

    elif distro.init == 'sysvinit':  # Debian uses sysvinit

        process.run(
            rconn,
            [
                service,
                'ceph',
                '-c',
                '/etc/ceph/{cluster}.conf'.format(cluster=args.cluster),
                'start',
                'mon.{hostname}'.format(hostname=hostname)
            ],
            exit=True,
            timeout=7,
        )
    else:
        raise RuntimeError('create cannot use init %s' % distro.init)
Exemplo n.º 8
0
def create(distro, logger, args, monitor_keyring):
    hostname = remote_shortname(distro.sudo_conn.modules.socket)
    common.mon_create(distro, logger, args, monitor_keyring, hostname)
    service = common.which_service(distro.sudo_conn, logger)

    distro.sudo_conn.close()
    # TODO transition this once pushy is out
    rconn = get_connection(hostname, logger)

    if distro.init == 'upstart':  # Ubuntu uses upstart
        process.run(
            rconn,
            [
                'initctl',
                'emit',
                'ceph-mon',
                'cluster={cluster}'.format(cluster=args.cluster),
                'id={hostname}'.format(hostname=hostname),
            ],
            exit=True,
            timeout=7,
        )

    elif distro.init == 'sysvinit':  # Debian uses sysvinit

        process.run(
            rconn,
            [
                service, 'ceph', '-c',
                '/etc/ceph/{cluster}.conf'.format(cluster=args.cluster),
                'start', 'mon.{hostname}'.format(hostname=hostname)
            ],
            exit=True,
            timeout=7,
        )
    else:
        raise RuntimeError('create cannot use init %s' % distro.init)