<commit_before>#!/bin/sh

set -x
set -e

nova_manage="nova-manage --config-file /etc/nova/nova.conf"
available_commands_text=$(nova-manage --help | awk '/Command categories/ {getline; print $0}')

$nova_manage db online_data_migrations

if echo "${available_commands_text}" | grep -q -E '[{,]placement[},]'; then
  $nova_manage placement sync_aggregates
fi
<commit_msg>[nova] Disable online migrations with placement<commit_after>#!/bin/sh

set -x
set -e

nova_manage="nova-manage --config-file /etc/nova/nova.conf"
available_commands_text=$(nova-manage --help | awk '/Command categories/ {getline; print $0}')

{{- if or .Values.placement.enabled (.Values.imageVersion | hasPrefix "rocky" | not) }}

$nova_manage db online_data_migrations
{{- end }}

if echo "${available_commands_text}" | grep -q -E '[{,]placement[},]'; then
  $nova_manage placement sync_aggregates
fi

{'fraction_non_alphanumeric': 0.15711009174311927, 'fraction_numerical': 0.0022935779816513763, 'mean_word_length': 5.0625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4818082', 'n_tokens_mistral': 324, 'n_tokens_neox': 308, 'n_words': 75}