upgrade version to 6.0.0

multi_ipaddr
YuQing 2019-10-16 12:59:51 +08:00
parent f756b5ee94
commit bd42da608f
7 changed files with 44 additions and 14 deletions

17
HISTORY
View File

@ -1,7 +1,18 @@
Version 5.13 2019-09-29 Version 6.00 2019-10-16
* use socketCreateExAuto and socketClientExAuto exported by libfastcommon, * tracker and storage server support dual IPs
you must upgrade libfastcommon to V1.41 or later 1. you can config dual trackr IPs in storage.conf and client.conf,
the configuration item name is "tracker_server"
2. you can config dual storage IPs in storage_ids.conf
more detail please see the config files.
NOTE: you MUST upgrade libfastcommon to V1.41 or later
the tracker and storage server must upgrade together
* storage server get IP from tracker server
* storage server report current tracker IP to the tracker server when join
* tracker server check tracker list when storage server join
* use socketCreateExAuto and socketClientExAuto exported by libfastcommon
Version 5.12 2018-06-07 Version 5.12 2018-06-07
* code refine for rare case * code refine for rare case

View File

@ -9,8 +9,14 @@ network_timeout=60
# the base path to store log files # the base path to store log files
base_path=/home/yuqing/fastdfs base_path=/home/yuqing/fastdfs
# tracker_server can ocur more than once, and tracker_server format is # tracker_server can ocur more than once for multi tracker servers.
# "host:port", host can be hostname or ip address # the value format of tracker_server is "HOST:PORT",
# the HOST can be hostname or ip address,
# and the HOST can be dual IPs or hostnames seperated by comma,
# the dual IPS must be an intranet IP and an extranet IP.
# such as: 192.168.2.100,122.244.141.46
tracker_server=192.168.0.196:22122
tracker_server=192.168.0.197:22122 tracker_server=192.168.0.197:22122
#standard log level as syslog, case insensitive, value list: #standard log level as syslog, case insensitive, value list:

View File

@ -114,9 +114,15 @@ store_path0=/home/yuqing/fastdfs
# store_path (disk), value can be 1 to 256, default value is 256 # store_path (disk), value can be 1 to 256, default value is 256
subdir_count_per_path=256 subdir_count_per_path=256
# tracker_server can ocur more than once, and tracker_server format is # tracker_server can ocur more than once for multi tracker servers.
# "host:port", host can be hostname or ip address # the value format of tracker_server is "HOST:PORT",
# the HOST can be hostname or ip address,
# and the HOST can be dual IPs or hostnames seperated by comma,
# the dual IPS must be an intranet IP and an extranet IP.
# such as: 192.168.2.100,122.244.141.46
tracker_server=192.168.209.121:22122 tracker_server=192.168.209.121:22122
tracker_server=192.168.209.122:22122
#standard log level as syslog, case insensitive, value list: #standard log level as syslog, case insensitive, value list:
### emerg for emergency ### emerg for emergency

View File

@ -1,3 +1,10 @@
# <id> <group_name> <ip_or_hostname> # <id> <group_name> <ip_or_hostname[:port]>
# storage ip or hostname can be dual IPs seperated by comma,
# one is an intranet IP and another is an extranet IP.
# for example: 192.168.2.100,122.244.141.46
#
# the port is optional. if you run more than one storaged instances
# in a server, you must specified the port to distinguish different instances.
# 100001 group1 192.168.0.196 # 100001 group1 192.168.0.196
# 100002 group1 192.168.0.116 # 100002 group1 192.168.0.116

View File

@ -3,7 +3,7 @@
%define FDFSClient libfdfsclient %define FDFSClient libfdfsclient
%define FDFSClientDevel libfdfsclient-devel %define FDFSClientDevel libfdfsclient-devel
%define FDFSTool fastdfs-tool %define FDFSTool fastdfs-tool
%define FDFSVersion 5.0.12 %define FDFSVersion 6.0.0
%define CommitVersion %(echo $COMMIT_VERSION) %define CommitVersion %(echo $COMMIT_VERSION)
Name: %{FastDFS} Name: %{FastDFS}
@ -18,14 +18,14 @@ Source: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
BuildRequires: libfastcommon-devel >= 1.0.36 BuildRequires: libfastcommon-devel >= 1.0.41
%description %description
This package provides tracker & storage of fastdfs This package provides tracker & storage of fastdfs
commit version: %{CommitVersion} commit version: %{CommitVersion}
%package -n %{FDFSServer} %package -n %{FDFSServer}
Requires: libfastcommon >= 1.0.36 Requires: libfastcommon >= 1.0.41
Summary: fastdfs tracker & storage Summary: fastdfs tracker & storage
%package -n %{FDFSTool} %package -n %{FDFSTool}

View File

@ -172,7 +172,6 @@ int storage_get_my_tracker_client_ip()
close(conn->sock); close(conn->sock);
return result; return result;
} }
//pGlobalServer->
getSockIpaddr(conn->sock, tracker_client_ip, IP_ADDRESS_SIZE); getSockIpaddr(conn->sock, tracker_client_ip, IP_ADDRESS_SIZE);
insert_into_local_host_ip(tracker_client_ip); insert_into_local_host_ip(tracker_client_ip);

View File

@ -741,7 +741,7 @@ int tracker_load_from_conf_file(const char *filename, \
"trunk_compress_binlog_min_interval=%d, " \ "trunk_compress_binlog_min_interval=%d, " \
"use_storage_id=%d, " \ "use_storage_id=%d, " \
"id_type_in_filename=%s, " \ "id_type_in_filename=%s, " \
"storage_id_count=%d, " \ "storage_id/ip_count=%d / %d, " \
"rotate_error_log=%d, " \ "rotate_error_log=%d, " \
"error_log_rotate_time=%02d:%02d, " \ "error_log_rotate_time=%02d:%02d, " \
"rotate_error_log_size=%"PRId64", " \ "rotate_error_log_size=%"PRId64", " \
@ -777,7 +777,8 @@ int tracker_load_from_conf_file(const char *filename, \
g_trunk_init_reload_from_binlog, \ g_trunk_init_reload_from_binlog, \
g_trunk_compress_binlog_min_interval, \ g_trunk_compress_binlog_min_interval, \
g_use_storage_id, g_id_type_in_filename == \ g_use_storage_id, g_id_type_in_filename == \
FDFS_ID_TYPE_SERVER_ID ? "id" : "ip", g_storage_ids_by_id.count, \ FDFS_ID_TYPE_SERVER_ID ? "id" : "ip", \
g_storage_ids_by_id.count, g_storage_ids_by_ip.count, \
g_rotate_error_log, g_error_log_rotate_time.hour, \ g_rotate_error_log, g_error_log_rotate_time.hour, \
g_error_log_rotate_time.minute, \ g_error_log_rotate_time.minute, \
g_log_context.rotate_size, g_log_file_keep_days, g_log_context.rotate_size, g_log_file_keep_days,