<commit_before>- name: render shared-volume bricks locations
  set_fact:
    gluster_bricks: >
      {{gluster_bricks | default('')}}
      {{item}}:/var/bricks/svb1
      {{item}}:/var/bricks/svb2
      {{item}}:/var/bricks/svb3
  with_items: "{{enpoint_list}}"
  tags:
    - gluster_side

- name: create shared-volume (gluster side)
  command: >
    kubectl exec {{get_name.stdout}}
    gluster volume create shared-volume
    replica 3 {{gluster_bricks | replace('\n', '')}}
    force
  tags:
    - gluster_side

- name: start shared-volume (gluster side)
  command: >
    kubectl exec {{get_name.stdout}}
    gluster volume start shared-volume
  tags:
    - gluster_side

- name: get shared-volume cumulative size
  shell: >
    kubectl exec {{get_name.stdout}}
    gluster volume status shared-volume detail |
    grep 'Disk Space Free' |
    grep -o '[0-9]*\.[0-9]*' |
    awk '{s+=$1} END {print s}'
  register: get_tot_size

- set_fact:
    gluster_vol_size: "{{((get_tot_size.stdout | int) / 9) | int}}G"

- name: render shared-volume configuration
  become: yes
  template:
    src: shared-volume.yml
    dest: "/etc/kubenow/yaml/shared-volume.yaml"

- name: create shared-volume (Kubernetes side)<commit_msg>retry shared volume creation<commit_after>- name: render shared-volume bricks locations
  set_fact:
    gluster_bricks: >
      {{gluster_bricks | default('')}}
      {{item}}:/var/bricks/svb1
      {{item}}:/var/bricks/svb2
      {{item}}:/var/bricks/svb3
  with_items: "{{enpoint_list}}"
  tags:
    - gluster_side

- name: create shared-volume (gluster side)
  command: >
    kubectl exec {{get_name.stdout}}
    gluster volume create shared-volume
    replica 3 {{gluster_bricks | replace('\n', '')}}
    force
  # Try for 10 minutes
  retries: 120
  delay: 5
  tags:
    - gluster_side

- name: start shared-volume (gluster side)
  command: >
    kubectl exec {{get_name.stdout}}
    gluster volume start shared-volume
  tags:
    - gluster_side

- name: get shared-volume cumulative size
  shell: >
    kubectl exec {{get_name.stdout}}
    gluster volume status shared-volume detail |
    grep 'Disk Space Free' |
    grep -o '[0-9]*\.[0-9]*' |
    awk '{s+=$1} END {print s}'
  register: get_tot_size

- set_fact:
    gluster_vol_size: "{{((get_tot_size.stdout | int) / 9) | int}}G"

- name: render shared-volume configuration
  become: yes
  template:
    src: shared-volume.yml
    dest: "/etc/kubenow/yaml/shared-volume.yaml"

- name: create shared-volume (Kubernetes side)
{'fraction_non_alphanumeric': 0.1386890487609912, 'fraction_numerical': 0.010391686650679457, 'mean_word_length': 3.1235584843492585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6603962', 'n_tokens_mistral': 906, 'n_tokens_neox': 885, 'n_words': 214}