You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Merge branch 'develop' into MCOL-4012
This commit is contained in:
@ -259,13 +259,13 @@ fi
|
||||
|
||||
if [ ! -z "$MCS_USE_S3_STORAGE" ] && [ $MCS_USE_S3_STORAGE -eq 1 ]; then
|
||||
if [ -z "$MCS_S3_BUCKET" ]; then
|
||||
echo "Environmental variable \$MCS_USE_S3_STORAGE is set but there is no \$MCS_S3_BUCKET."
|
||||
echo "Environment variable \$MCS_USE_S3_STORAGE is set but there is no \$MCS_S3_BUCKET."
|
||||
fi
|
||||
if [ -z "$MCS_S3_ACCESS_KEY_ID" ]; then
|
||||
echo "Environmental variable \$MCS_USE_S3_STORAGE is set but there is no \$MCS_S3_ACCESS_KEY_ID."
|
||||
echo "Environment variable \$MCS_USE_S3_STORAGE is set but there is no \$MCS_S3_ACCESS_KEY_ID."
|
||||
fi
|
||||
if [ -z "$MCS_S3_SECRET_ACCESS_KEY" ]; then
|
||||
echo "Environmental variable \$MCS_USE_S3_STORAGE is set but there is no \$MCS_S3_SECRET_ACCESS_KEY."
|
||||
echo "Environment variable \$MCS_USE_S3_STORAGE is set but there is no \$MCS_S3_SECRET_ACCESS_KEY."
|
||||
fi
|
||||
if [ -z "$MCS_S3_BUCKET" ] || [ -z "$MCS_S3_ACCESS_KEY_ID" ] || [ -z "$MCS_S3_SECRET_ACCESS_KEY" ]; then
|
||||
echo "Using local storage."
|
||||
@ -281,7 +281,24 @@ if [ ! -z "$MCS_USE_S3_STORAGE" ] && [ $MCS_USE_S3_STORAGE -eq 1 ]; then
|
||||
sed -i "s|# endpoint =.*|endpoint = $MCS_S3_ENDPOINT|" /etc/columnstore/storagemanager.cnf
|
||||
sed -i "s|# aws_access_key_id =.*|aws_access_key_id = $MCS_S3_ACCESS_KEY_ID|" /etc/columnstore/storagemanager.cnf
|
||||
sed -i "s|# aws_secret_access_key =.*|aws_secret_access_key = $MCS_S3_SECRET_ACCESS_KEY|" /etc/columnstore/storagemanager.cnf
|
||||
fi
|
||||
|
||||
testS3Connection
|
||||
if [ $? -ne 0 ]; then
|
||||
sed -i "s|endpoint =.*|# endpoint = |" /etc/columnstore/storagemanager.cnf
|
||||
sed -i "s|aws_access_key_id =.*|# aws_access_key_id = |" /etc/columnstore/storagemanager.cnf
|
||||
sed -i "s|aws_secret_access_key =.*|# aws_secret_access_key = |" /etc/columnstore/storagemanager.cnf
|
||||
echo "There was an error validating the settings used to access S3."
|
||||
echo "The specified user must have GET, PUT, HEAD, and DELETE permissions to the bucket."
|
||||
echo "Verify the following environment variables are correct:"
|
||||
echo "MCS_S3_BUCKET"
|
||||
echo "MCS_S3_ENDPOINT"
|
||||
echo "MCS_S3_ACCESS_KEY_ID"
|
||||
echo "MCS_S3_SECRET_ACCESS_KEY"
|
||||
echo "MCS_S3_REGION"
|
||||
echo "After environment variables are fixed, run command: columnstore-post-install"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#change ownership/permissions to be able to run columnstore as non-root
|
||||
|
@ -109,6 +109,11 @@ if [ -n "$systemctl" ] && [ $(running_systemd) -eq 0 ]; then
|
||||
rm -f /lib/systemd/system/mcs-storagemanager.service
|
||||
|
||||
systemctl daemon-reload
|
||||
# remove flag to prevent clusters using shared storage from initializing columnstore more than once
|
||||
IFLAG=/var/lib/columnstore/storagemanager/cs-initialized
|
||||
if [ -e $IFLAG ]; then
|
||||
rm $IFLAG
|
||||
fi
|
||||
else
|
||||
chkconfig=`which chkconfig 2>/dev/null`
|
||||
if [ -n "$chkconfig" ]; then
|
||||
|
@ -70,7 +70,9 @@ if __name__ == '__main__':
|
||||
config_root.find('./SystemConfig').append(ET.Element("DataFilePlugin"))
|
||||
|
||||
config_root.find('./SystemConfig/DataFilePlugin').text = "libcloudio.so"
|
||||
cs_config.write('/etc/columnstore/Columnstore.xml')
|
||||
|
||||
cs_config.write('/etc/columnstore/Columnstore.xml.loadbrm')
|
||||
os.replace('/etc/columnstore/Columnstore.xml.loadbrm', '/etc/columnstore/Columnstore.xml') # atomic replacement
|
||||
|
||||
# Single-node on S3
|
||||
if storage.lower() == 's3' and not bucket.lower() == 'some_bucket' and pmCount == 1:
|
||||
@ -124,7 +126,7 @@ node.".format(e))
|
||||
path.write_bytes(r.content)
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
print('Failed to load meta data from the primary \
|
||||
print('Failed to load BRM data from the primary \
|
||||
node {}.'.format(primary_address), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
Reference in New Issue
Block a user