Projects
Eulaceura:Factory
opengauss-server
_service:obs_scm:upgrade.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:upgrade.patch of Package opengauss-server
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/liteom/upgrade_common.sh openGauss-server-5.0.1-edit/liteom/upgrade_common.sh *** openGauss-server-5.0.1/liteom/upgrade_common.sh 2024-05-09 14:48:32.000000000 +0800 --- openGauss-server-5.0.1-edit/liteom/upgrade_common.sh 2024-06-07 17:31:52.228407016 +0800 *************** *** 273,284 **** } function check_version() { - if [[ ! -f "${GAUSSHOME}/version.cfg" ]]; then - die "Cannot find current version.cfg!" ${err_upgrade_pre} - else - old_version=$(tail -n 1 "$GAUSSHOME"/version.cfg) - old_cfg=$(sed -n 2p "$GAUSSHOME"/version.cfg | sed 's/\.//g') - fi if [[ -f "$GAUSS_UPGRADE_BIN_PATH"/version.cfg ]]; then new_version_cfg_path="${GAUSS_UPGRADE_BIN_PATH}/version.cfg" elif [[ -f "$GAUSS_UPGRADE_BASE_PATH"/version.cfg ]]; then --- 273,278 ---- *************** *** 290,333 **** new_version=$(tail -n 1 "$new_version_cfg_path") new_cfg=$(sed -n 2p "$new_version_cfg_path" | sed 's/\.//g') - if [[ X"$old_version" == X || X"$old_cfg" == X || X"$new_version" == X || X"$new_cfg" == X ]]; then - die "Maybe version.cfg is not normal" ${err_upgrade_pre} - fi - if ! echo "$old_cfg"|grep -Ewq "[0-9]{3,6}";then - die "Maybe version.cfg is not normal" ${err_upgrade_pre} - fi if ! echo "$new_cfg"|grep -Ewq "[0-9]{3,6}";then die "Maybe version.cfg is not normal" ${err_upgrade_pre} fi ! if [[ "$old_version" == "$new_version" ]]; then ! die "New version is same as old, the commitId is $old_version!" ${err_version_same} ! fi ! if [[ ${new_cfg} -lt ${old_cfg} ]]; then ! die "Current version is newer!" ${err_upgrade_pre} ! fi ! big_cfg="False" ! if [[ ${new_cfg} -gt ${old_cfg} ]]; then ! log "Big upgrade is needed!" ! big_cfg="True" ! fi local flag_file="$GAUSS_TMP_PATH"/version_flag - if echo "old_version=$old_version" > "$flag_file" && chmod 600 "$flag_file"; then - debug "Begin to generate $flag_file" - else - die "Write $flag_file failed" ${err_upgrade_pre} - fi if ! echo "new_version=$new_version" >> "$flag_file"; then die "Write $flag_file failed" ${err_upgrade_pre} fi if ! echo "big_cfg=$big_cfg" >> "$flag_file"; then die "Write $flag_file failed" ${err_upgrade_pre} fi - if ! echo "old_cfg=$old_cfg" >> "$flag_file"; then - die "Write $flag_file failed" ${err_upgrade_pre} - fi - log "Old version commitId is $old_version, version info is $old_cfg" log "New version commitId is $new_version, version info is $new_cfg" ##need version.cfg to check big upgrade,note user exec sql on primary dn --- 284,302 ---- new_version=$(tail -n 1 "$new_version_cfg_path") new_cfg=$(sed -n 2p "$new_version_cfg_path" | sed 's/\.//g') if ! echo "$new_cfg"|grep -Ewq "[0-9]{3,6}";then die "Maybe version.cfg is not normal" ${err_upgrade_pre} fi ! big_cfg="True" local flag_file="$GAUSS_TMP_PATH"/version_flag if ! echo "new_version=$new_version" >> "$flag_file"; then die "Write $flag_file failed" ${err_upgrade_pre} fi if ! echo "big_cfg=$big_cfg" >> "$flag_file"; then die "Write $flag_file failed" ${err_upgrade_pre} fi log "New version commitId is $new_version, version info is $new_cfg" ##need version.cfg to check big upgrade,note user exec sql on primary dn *************** *** 1239,1242 **** fi rm -f "$GAUSS_TMP_PATH"/version_flag rm -f "$GAUSS_TMP_PATH"/record_step.txt ! } \ No newline at end of file --- 1208,1211 ---- fi rm -f "$GAUSS_TMP_PATH"/version_flag rm -f "$GAUSS_TMP_PATH"/record_step.txt ! } diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/liteom/upgrade_config.sh openGauss-server-5.0.1-edit/liteom/upgrade_config.sh *** openGauss-server-5.0.1/liteom/upgrade_config.sh 2024-05-09 14:48:32.000000000 +0800 --- openGauss-server-5.0.1-edit/liteom/upgrade_config.sh 2024-06-06 16:56:26.681705002 +0800 *************** *** 4,31 **** # version: 1.0 # 数据库监听端口 ! GAUSS_LISTEN_PORT="" # 数据库管理员用户名 ! GAUSS_ADMIN_USER="" #数据库升级回退日志路径 ! GAUSS_LOG_PATH="" #数据库升级根位置 ! GAUSS_UPGRADE_BASE_PATH="" #数据库SQL包位置 ! GAUSS_SQL_TAR_PATH="" #数据库低版本备份位置 ! GAUSS_BACKUP_BASE_PATH="" #数据库临时目录 ! GAUSS_TMP_PATH="" #是否使用存在的bin解压包 GAUSS_UPGRADE_BIN_PATH="" #需要同步的cluster config 列表 ! GAUSS_UPGRADE_SYNC_CONFIG_LIST="" \ No newline at end of file --- 4,31 ---- # version: 1.0 # 数据库监听端口 ! GAUSS_LISTEN_PORT="7654" # 数据库管理员用户名 ! GAUSS_ADMIN_USER="opengauss" #数据库升级回退日志路径 ! GAUSS_LOG_PATH="/usr/local/opengauss_upgrade" #数据库升级根位置 ! GAUSS_UPGRADE_BASE_PATH="/usr/local/opengauss_upgrade/pkg_5.0.1" #数据库SQL包位置 ! GAUSS_SQL_TAR_PATH="/usr/local/opengauss_upgrade/pkg_5.0.1" #数据库低版本备份位置 ! GAUSS_BACKUP_BASE_PATH="/usr/local/opengauss_upgrade/bak" #数据库临时目录 ! GAUSS_TMP_PATH="/usr/local/opengauss_upgrade/tmp" #是否使用存在的bin解压包 GAUSS_UPGRADE_BIN_PATH="" #需要同步的cluster config 列表 ! GAUSS_UPGRADE_SYNC_CONFIG_LIST=""
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2