Compare commits

...
10 Commits
Author SHA1 Message Date
Vitaliy Filippov 99adbb9483 Release 1.9.1
Hotfixes for OpenNebula and upgrade hotfix for 1.7

- Fix deploy.vitastor, save.vitastor, restore.vitastor scripts not working for nodes other than master oned
- Fix deploy.vitastor not working for VMs without Vitastor disks
- Disable clearing old PG configuration when upgrading from 1.7 or older versions (it was breaking old clients)
2024-09-14 19:17:30 +03:00
Vitaliy Filippov b489a611a9 Add 1.8 upgrade note 2024-09-14 19:17:30 +03:00
Vitaliy Filippov c6c0b8957a Stop updating old PG configuration when the user manually deletes it 2024-09-14 19:15:40 +03:00
Vitaliy Filippov 5d40d2a459 Fix oned.conf patch 2024-09-14 19:08:44 +03:00
Vitaliy Filippov f449c28c3b Always write decoded base64 deployment file (otherwise it breaks VMs without Vitastor disks) 2024-09-14 15:25:02 +03:00
Vitaliy Filippov a6274f58cc Same fix for save/restore: they also need to ssh to target node 2024-09-14 02:46:48 +03:00
Vitaliy Filippov ac29ffea6a Add ssh to target node to deploy.vitastor - without it it always tried to deploy VMs on oned host 2024-09-14 02:15:24 +03:00
Vitaliy Filippov bc06acc153 Disable clearing old PG configuration - we can not be sure that old clients do not need it 2024-09-13 19:00:12 +03:00
Vitaliy Filippov fe8e611e23 Release 1.9.0
- OpenNebula support! [Installation instructions](https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/docs/installation/opennebula.en.md)
- Added [vitastor-cli rm --exact|--matching](https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/docs/usage/cli.en.md#rm) command
- Added [vitastor-cli dd](https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/docs/usage/cli.en.md#dd) command - copy files between Vitastor images, files and pipes
- Add a startup timeout to vitastor-cli to not wait for etcd infinitely
- Fix non-working OSD_OP_READ_CHAIN_BITMAP O_o
- Autodetect block_size/bitmap_granularity/immediate_commit when creating pools
- Do not allow to create multiple pools with the same name from vitastor-cli
- Fix skip_cache_check option not applied due to type issue (see github issue #70)
2024-09-06 01:46:16 +03:00
Vitaliy Filippov 7636f9c726 Turn off brp-python-bytecompile in RPM specs 2024-09-06 01:44:44 +03:00
21 changed files with 78 additions and 56 deletions
+1 -1
View File
@@ -2,6 +2,6 @@ cmake_minimum_required(VERSION 2.8.12)
project(vitastor)
set(VITASTOR_VERSION "1.8.0")
set(VITASTOR_VERSION "1.9.1")
add_subdirectory(src)
+1 -1
View File
@@ -1,4 +1,4 @@
VITASTOR_VERSION ?= v1.8.0
VITASTOR_VERSION ?= v1.9.1
all: build push
+1 -1
View File
@@ -49,7 +49,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: vitalif/vitastor-csi:v1.8.0
image: vitalif/vitastor-csi:v1.9.1
args:
- "--node=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
+1 -1
View File
@@ -121,7 +121,7 @@ spec:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
image: vitalif/vitastor-csi:v1.8.0
image: vitalif/vitastor-csi:v1.9.1
args:
- "--node=$(NODE_ID)"
- "--endpoint=$(CSI_ENDPOINT)"
+1 -1
View File
@@ -5,7 +5,7 @@ package vitastor
const (
vitastorCSIDriverName = "csi.vitastor.io"
vitastorCSIDriverVersion = "1.8.0"
vitastorCSIDriverVersion = "1.9.1"
)
// Config struct fills the parameters of request or user input
+1 -1
View File
@@ -1,4 +1,4 @@
vitastor (1.8.0-1) unstable; urgency=medium
vitastor (1.9.1-1) unstable; urgency=medium
* Bugfixes
+12
View File
@@ -169,6 +169,18 @@ Upgrading is performed without stopping clients (VMs/containers), you just need
upgrade and restart servers one by one. However, ideally you should restart VMs too
to make them use the new version of the client library.
### 1.7.x to 1.8.0
After upgrading version <= 1.7.x to version >= 1.8.0, BUT <= 1.9.0: restart all clients
(VMs and so on), otherwise they will hang when monitor clears old PG configuration key,
which happens 24 hours after upgrade.
This is fixed in 1.9.1. So, after upgrading version <= 1.7.x directly to version >= 1.9.1,
you DO NOT have to restart all old clients immediately - they will work like before until
you decide to upgrade them too. The downside is that you'll have to remove the old PG
configuration key (`/vitastor/config/pgs`) from etcd by hand when you make sure that all
your clients are restarted.
### 1.1.x to 1.2.0
Upgrading version <= 1.1.x to version >= 1.2.0, if you use EC n+k with k>=2, is recommended
+12
View File
@@ -166,6 +166,18 @@ done
достаточно обновлять серверы по одному. Однако, конечно, чтобы запущенные виртуальные машины
начали использовать новую версию клиентской библиотеки, их тоже нужно перезапустить.
### 1.7.x -> 1.8.0
После обновления с версий <= 1.7.x до версий >= 1.8.0, НО <= 1.9.0: перезапустите всех
клиентов (процессы виртуальных машин можно перезапустить путём миграции на другой сервер),
иначе они зависнут, когда монитор удалит старый ключ конфигурации PG, что происходит через
24 часа после обновления.
Однако, это исправлено в 1.9.1. Так что, если вы обновляетесь с <= 1.7.x сразу до >= 1.9.1,
вам НЕ нужно сразу перезапускать всех клиентов - они будут работать, как раньше. Минус,
правда, в том, что старый ключ конфигурации PG (`/vitastor/config/pgs`) будет нужно удалить
вам из etcd вручную - после того, как вы убедитесь, что все клиенты перезапущены.
### 1.1.x -> 1.2.0
Обновляться с версий <= 1.1.x до версий >= 1.2.0, если вы используете EC n+k и k>=2,
+4 -24
View File
@@ -218,6 +218,10 @@ class Mon
}
else if (key != '/stats' && key.substr(0, 13) != '/inode/stats/')
{
if (key == '/config/pgs' && !kv.value)
{
this.old_pg_config = false;
}
changed = true;
}
if (this.config.verbose)
@@ -422,30 +426,6 @@ class Mon
throw new Error('Failed to duplicate old PG config to new PG config');
}
this.old_pg_config = true;
this.old_pg_config_timer = setInterval(() => this.check_clear_old_config().catch(console.error),
this.config.old_pg_config_clear_interval||3600000);
}
}
async check_clear_old_config()
{
if (this.old_pg_config && this.old_pg_stats_seen)
{
this.old_pg_stats_seen = false;
return;
}
if (this.old_pg_config)
{
await this.etcd.etcd_call('/kv/txn', { success: [
{ requestDeleteRange: { key: b64(this.config.etcd_prefix+'/config/pgs') } },
{ requestDeleteRange: { key: b64(this.config.etcd_prefix+'/pg/stats/'), range_end: b64(this.config.etcd_prefix+'/pg/stats0') } },
] }, this.config.etcd_mon_timeout, this.config.etcd_mon_retries);
this.old_pg_config = false;
}
if (this.old_pg_config_timer)
{
clearInterval(this.old_pg_config_timer);
this.old_pg_config_timer = null;
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vitastor-mon",
"version": "1.8.0",
"version": "1.9.1",
"description": "Vitastor SDS monitor service",
"main": "mon-main.js",
"scripts": {
@@ -54,20 +54,20 @@ index be02d646a8..27f876ec36 100644
TM_MAD_CONF = [
NAME = "iscsi_libvirt", LN_TARGET = "NONE", CLONE_TARGET = "SELF", SHARED = "YES",
DS_MIGRATE = "NO", DRIVER = "raw"
@@ -1219,9 +1230,16 @@ DS_MAD_CONF = [
@@ -1263,9 +1274,16 @@ DS_MAD_CONF = [
NAME = "ceph",
REQUIRED_ATTRS = "DISK_TYPE,BRIDGE_LIST",
PERSISTENT_ONLY = "NO",
MARKETPLACE_ACTIONS = "export"
]
+]
+
+DS_MAD_CONF = [
+ NAME = "vitastor",
+ REQUIRED_ATTRS = "DISK_TYPE,BRIDGE_LIST",
+ PERSISTENT_ONLY = "NO",
+ MARKETPLACE_ACTIONS = "export"
+]
+
]
DS_MAD_CONF = [
NAME = "dev", REQUIRED_ATTRS = "DISK_TYPE", PERSISTENT_ONLY = "YES"
]
+4 -1
View File
@@ -4,12 +4,15 @@
# Copyright (c) Vitaliy Filippov, 2024+
# License: Apache-2.0 http://www.apache.org/licenses/LICENSE-2.0
set -e
DRIVER_PATH=$(dirname $0)
DEP_FILE=$1
DEP_FILE_LOCATION=$(dirname $DEP_FILE)
HOST=$2
cat > $DEP_FILE
python3 $DRIVER_PATH/deploy_vitastor.py $DEP_FILE $DEP_FILE_LOCATION/vm.xml
cat $DEP_FILE | $DRIVER_PATH/deploy $@
cat "$DEP_FILE" | ssh "$HOST" "'${SCRIPTS_REMOTE_DIR:-/var/tmp/one}/vmm/kvm/deploy' '$DEP_FILE'"
@@ -54,5 +54,4 @@ for disk in dep.findall('./devices/disk[@type="file"]'):
except Exception as e:
print("Error: {}".format(e), file=stderr)
if changed:
ET.ElementTree(dep).write(dep_file)
ET.ElementTree(dep).write(dep_file)
+5 -4
View File
@@ -10,7 +10,7 @@ source $DRIVER_PATH/../../etc/vmm/kvm/kvmrc
source $DRIVER_PATH/../../scripts_common.sh
FILE=$1
HOST=$2
DST_HOST=$2
DEPLOY_ID=$3
VM_ID=$4
DS_ID=$5
@@ -33,7 +33,8 @@ fi
SRC_IMAGE="${IMAGE_PREFIX}-sys-${VM_ID}-checkpoint"
exec_and_log "$CLI dd iimg=$SRC_IMAGE of=$FILE" "Error exporting checkpoint into from $SRC_IMAGE to $FILE"
exec_and_log "$CLI rm $SRC_IMAGE" "Error removing checkpoint $SRC_IMAGE"
ssh_exec_and_log "$DST_HOST" "$CLI dd iimg=$SRC_IMAGE of=$FILE" "Error exporting checkpoint into from $SRC_IMAGE to $FILE"
ssh_exec_and_log "$DST_HOST" "$CLI rm $SRC_IMAGE" "Error removing checkpoint $SRC_IMAGE"
"$DRIVER_PATH"/restore $@
set -e
ssh "$DST_HOST" "'${SCRIPTS_REMOTE_DIR:-/var/tmp/one}/vmm/kvm/restore' $@"
+7 -4
View File
@@ -11,11 +11,14 @@ source $DRIVER_PATH/../../scripts_common.sh
DEPLOY_ID=$1
FILE=$2
SRC_HOST=$3
VM_ID=$4
DS_ID=$5
rm -f "$FILE"
"$DRIVER_PATH"/save $@
set -e
ssh "$SRC_HOST" 'rm -f "$FILE"'
ssh "$SRC_HOST" "'${SCRIPTS_REMOTE_DIR:-/var/tmp/one}/vmm/kvm/save' $@"
set +e
XPATH="${DRIVER_PATH}/../../datastore/xpath.rb --stdin"
@@ -42,7 +45,7 @@ fi
DST_IMAGE="${IMAGE_PREFIX}-sys-${VM_ID}-checkpoint"
exec_and_log "$CLI dd if=$FILE oimg=$DST_IMAGE conv=trunc" "Error importing checkpoint into $DST_IMAGE"
exec_and_log "$RM -f $FILE" "Error removing checkpoint ($FILE)"
ssh_exec_and_log "$SRC_HOST" "$CLI dd if=$FILE oimg=$DST_IMAGE conv=trunc" "Error importing checkpoint into $DST_IMAGE"
ssh_exec_and_log "$SRC_HOST" "$RM -f $FILE" "Error removing checkpoint ($FILE)"
exit 0
+1 -1
View File
@@ -50,7 +50,7 @@ from cinder.volume import configuration
from cinder.volume import driver
from cinder.volume import volume_utils
VITASTOR_VERSION = '1.8.0'
VITASTOR_VERSION = '1.9.1'
LOG = logging.getLogger(__name__)
+6 -2
View File
@@ -1,11 +1,11 @@
Name: vitastor
Version: 1.8.0
Version: 1.9.1
Release: 1%{?dist}
Summary: Vitastor, a fast software-defined clustered block storage
License: Vitastor Network Public License 1.1
URL: https://vitastor.io/
Source0: vitastor-1.8.0.el7.tar.gz
Source0: vitastor-1.9.1.el7.tar.gz
BuildRequires: liburing-devel >= 0.6
BuildRequires: gperftools-devel
@@ -202,4 +202,8 @@ chown vitastor:vitastor /var/lib/vitastor
/var/lib/one/remotes/datastore/vitastor/install.sh
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%changelog
+6 -2
View File
@@ -1,11 +1,11 @@
Name: vitastor
Version: 1.8.0
Version: 1.9.1
Release: 1%{?dist}
Summary: Vitastor, a fast software-defined clustered block storage
License: Vitastor Network Public License 1.1
URL: https://vitastor.io/
Source0: vitastor-1.8.0.el8.tar.gz
Source0: vitastor-1.9.1.el8.tar.gz
BuildRequires: liburing-devel >= 0.6
BuildRequires: gperftools-devel
@@ -199,4 +199,8 @@ chown vitastor:vitastor /var/lib/vitastor
/var/lib/one/remotes/datastore/vitastor/install.sh
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%changelog
+6 -2
View File
@@ -1,11 +1,11 @@
Name: vitastor
Version: 1.8.0
Version: 1.9.1
Release: 1%{?dist}
Summary: Vitastor, a fast software-defined clustered block storage
License: Vitastor Network Public License 1.1
URL: https://vitastor.io/
Source0: vitastor-1.8.0.el9.tar.gz
Source0: vitastor-1.9.1.el9.tar.gz
BuildRequires: liburing-devel >= 0.6
BuildRequires: gperftools-devel
@@ -192,4 +192,8 @@ chown vitastor:vitastor /var/lib/vitastor
/var/lib/one/remotes/datastore/vitastor/install.sh
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%changelog
+1 -1
View File
@@ -19,7 +19,7 @@ if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/local/?$")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
add_definitions(-DVITASTOR_VERSION="1.8.0")
add_definitions(-DVITASTOR_VERSION="1.9.1")
add_definitions(-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wno-sign-compare -Wno-comment -Wno-parentheses -Wno-pointer-arith -fdiagnostics-color=always -fno-omit-frame-pointer -I ${CMAKE_SOURCE_DIR}/src)
add_link_options(-fno-omit-frame-pointer)
if (${WITH_ASAN})
+1 -1
View File
@@ -6,7 +6,7 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
Name: Vitastor
Description: Vitastor client library
Version: 1.8.0
Version: 1.9.1
Libs: -L${libdir} -lvitastor_client
Cflags: -I${includedir}