<commit_before>#!/bin/bash
set -e

function start_mgr {
  get_config
  check_config

  # Check to see if our MGR has been initialized
  if [ ! -e "$MGR_KEYRING" ]; then
    get_admin_key
    check_admin_key

    # Create ceph-mgr key
    ceph "${CLI_OPTS[@]}" auth get-or-create mgr."$MGR_NAME" mon 'allow profile mgr' osd 'allow *' mds 'allow *' -o "$MGR_KEYRING"
    chown --verbose ceph. "$MGR_KEYRING"
    chmod 600 "$MGR_KEYRING"

    if [[ "$MGR_DASHBOARD" == 1 ]]; then
      if ! grep -E "\[mgr\]" /etc/ceph/"${CLUSTER}".conf; then
        cat <<ENDHERE >>/etc/ceph/"${CLUSTER}".conf

[mgr]
mgr_modules = dashboard
ENDHERE
      fi
      ceph "${CLI_OPTS[@]}" config-key put mgr/dashboard/server_addr "$MGR_IP"
    fi
  fi

  log "SUCCESS"
  # start ceph-mgr
  exec /usr/bin/ceph-mgr "${DAEMON_OPTS[@]}" -i "$MGR_NAME"
}
<commit_msg>Fix configuration of ceph-mgr in case ceph.conf was created from kvstore (#723)<commit_after>#!/bin/bash
set -e

function start_mgr {
  get_config
  check_config

  # ensure we have the admin key
  get_admin_key
  check_admin_key

  # Check to see if our MGR has been initialized
  if [ ! -e "$MGR_KEYRING" ]; then
    # Create ceph-mgr key
    ceph "${CLI_OPTS[@]}" auth get-or-create mgr."$MGR_NAME" mon 'allow profile mgr' osd 'allow *' mds 'allow *' -o "$MGR_KEYRING"
    chown --verbose ceph. "$MGR_KEYRING"
    chmod 600 "$MGR_KEYRING"
  fi

  if [[ "$MGR_DASHBOARD" == 1 ]]; then
    if ! grep -E "\[mgr\]" /etc/ceph/"${CLUSTER}".conf; then
      cat <<ENDHERE >>/etc/ceph/"${CLUSTER}".conf

[mgr]
mgr_modules = dashboard
ENDHERE
    fi
    ceph "${CLI_OPTS[@]}" config-key put mgr/dashboard/server_addr "$MGR_IP"
  fi

  log "SUCCESS"
  # start ceph-mgr
  exec /usr/bin/ceph-mgr "${DAEMON_OPTS[@]}" -i "$MGR_NAME"
}

{'fraction_non_alphanumeric': 0.15524079320113315, 'fraction_numerical': 0.006232294617563739, 'mean_word_length': 3.155294117647059, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3135443', 'n_tokens_mistral': 737, 'n_tokens_neox': 730, 'n_words': 181}