<commit_before>#!/bin/bash

source ./env.sh

echo "Begin time of glance-install:"
date

#Glance installation
apt-get install -y glance-common glance glance-api glance-registry python-glanceclient

if [ "$GLANCE_STORAGE" = "ceph" ]; then
    echo "GLANCE_STORAGE = ceph"
    apt-get install -y python-ceph
else
    echo "GLANCE_STORAGE = local_disk"
fi

#Modify conf files
$OPENSTACK_RELEASE/glance-modify-conf-files.sh

#Remove the SQLite database file
rm -f /var/lib/glance/glance.sqlite

#Restart Service Glance
./restart-service-glance.sh

if [ $FIRST_GLANCE_NODE = 'Yes' ]; then
    echo "FIRST_GLANCE_NODE = Yes"

    #Synchronize the glance database
    glance-manage db_sync
<commit_msg>edit glance db_sync for icehouse<commit_after>#!/bin/bash

source ./env.sh

echo "Begin time of glance-install:"
date

#Glance installation
apt-get install -y glance-common glance glance-api glance-registry python-glanceclient

if [ "$GLANCE_STORAGE" = "ceph" ]; then
    echo "GLANCE_STORAGE = ceph"
    apt-get install -y python-ceph
else
    echo "GLANCE_STORAGE = local_disk"
fi

#Modify conf files
$OPENSTACK_RELEASE/glance-modify-conf-files.sh

#Remove the SQLite database file
rm -f /var/lib/glance/glance.sqlite

#Restart Service Glance
./restart-service-glance.sh

if [ $FIRST_GLANCE_NODE = 'Yes' ]; then
    echo "FIRST_GLANCE_NODE = Yes"

    #Synchronize the glance database
    glance-manage db_sync

    if [ "$OPENSTACK_RELEASE" = "./icehouse" ]; then
        echo "Fixing above error..."
        sleep 2
        mysql -uroot -p$MYSQL_ROOT_PASSWORD -e "alter table migrate_version convert to character set utf8 collate utf8_unicode_ci;flush privileges;" glance
        echo "Fixed OK."
        sleep 2
        glance-manage db_sync
    fi

{'fraction_non_alphanumeric': 0.09725400457665904, 'fraction_numerical': 0.002288329519450801, 'mean_word_length': 3.5428571428571427, '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': '4887135', 'n_tokens_mistral': 614, 'n_tokens_neox': 595, 'n_words': 166}