OpenStack版本升级之Swift
2012-11-13 11:11
330 查看
Swift升级的一般流程
Swift升级的一般流程见参考文档,摘抄如下:As always, a production Swift cluster can be upgraded live, with no downtime for clients. The normal upgrade path is: Stop the background processes Upgrade the packages Reload the processes (eg swift-init object reload) Start the background processes A normal upgrade process will upgrade one storage server in one zone (a "canary node") to check if any unforseen issue arise. After than node is upgraded, upgrade the other storage nodes in that zone. Next, upgrade each of the remaining zones in turn. Finally, upgrade each of your proxy servers (one at time).
F版对依赖库的变化
F版对依赖库的变化主要是添加了一个新的依赖python-swiftclient,另外放宽Webob的版本要求为>=1.0.8,<1.3,详情如下:[ugyn@localhost swift]$ git diff origin/stable/essex:tools/pip-requires origin/stable/folsom:tools/pip-requires > diff [ugyn@localhost swift]$ cat diff diff --git a/origin/stable/essex:tools/pip-requires b/origin/stable/folsom:tools/pip-requires index f9ea5f2..28bc426 100644 --- a/origin/stable/essex:tools/pip-requires +++ b/origin/stable/folsom:tools/pip-requires @@ -1,4 +1,4 @@ -WebOb==1.0.8 +WebOb>=1.0.8,<1.3 configobj==4.7.1 eventlet==0.9.15 greenlet==0.3.1 @@ -6,3 +6,6 @@ netifaces==0.6 pastedeploy==1.3.3 simplejson==2.0.9 xattr==0.4 + +# Install python-swiftclient from git +https://github.com/openstack/python-swiftclient/zipball/master#egg=python-swiftclient
升级存储节点
停止现有服务,并备份配置文件[root@store1 update_swift]# ../swift-helper stop Signal object-server pid: 4016 signal: 15 object-server (4016) appears to have stopped Signal object-replicator pid: 4032 signal: 15 object-replicator (4032) appears to have stopped Signal object-updater pid: 4059 signal: 15 object-updater (4059) appears to have stopped Signal object-auditor pid: 4068 signal: 15 object-auditor (4068) appears to have stopped Signal container-server pid: 4090 signal: 15 container-server (4090) appears to have stopped Signal container-replicator pid: 4109 signal: 15 container-replicator (4109) appears to have stopped Signal container-updater pid: 4115 signal: 15 container-updater (4115) appears to have stopped Signal container-auditor pid: 4123 signal: 15 container-auditor (4123) appears to have stopped Signal account-server pid: 4129 signal: 15 account-server (4129) appears to have stopped Signal account-replicator pid: 4137 signal: 15 account-replicator (4137) appears to have stopped Signal account-auditor pid: 4143 signal: 15 account-auditor (4143) appears to have stopped [root@store1 update_swift]# cp -R /etc/swift ./
下载并安装相关软件
[root@store1 update_swift]# pip install -d ./ --no-install python-swiftclient Downloading/unpacking python-swiftclient Downloading python-swiftclient-1.2.0.tar.gz (46Kb): 46Kb downloaded Saved ./python-swiftclient-1.2.0.tar.gz Running setup.py egg_info for package python-swiftclient Downloading/unpacking simplejson (from python-swiftclient) Downloading simplejson-2.6.2.tar.gz (53Kb): 53Kb downloaded Saved ./simplejson-2.6.2.tar.gz Running setup.py egg_info for package simplejson Successfully downloaded python-swiftclient simplejson Cleaning up... [root@store1 update_swift]# pip install --upgrade simplejson-2.6.2.tar.gz python-swiftclient-1.2.0.tar.gz [root@store1 update_swift]# wget https://github.com/openstack/swift/archive/stable/folsom.zip [root@store1 update_swift]# unzip folsom [root@store1 update_swift]# cd swift-stable-folsom/ [root@store1 swift-stable-folsom]# python setup.py install
修改配置文件,我的最终的配置文件如下,这里要注意的是前两个配置文件中的db_preallocation项,对于采用SSD盘的应当采用默认的关闭,对于一般的硬盘应当打开,相关说明见这里
[root@store1 etc]# cat account-server.conf [DEFAULT] workers = 2 db_preallocation = on [pipeline:main] pipeline = recon account-server [app:account-server] use = egg:swift#account [filter:recon] use = egg:swift#recon [account-replicator] [account-auditor] [account-reaper] [root@store1 etc]# cat container-server.conf [DEFAULT] workers = 4 db_preallocation = on [pipeline:main] pipeline = recon container-server [app:container-server] use = egg:swift#container [filter:recon] use = egg:swift#recon [container-replicator] [container-updater] [container-auditor] [container-sync] [root@store1 etc]# cat object-server.conf [DEFAULT] workers = 8 [pipeline:main] pipeline = recon object-server [app:object-server] use = egg:swift#object [filter:recon] use = egg:swift#recon [object-replicator] [object-updater] [object-auditor]
创建缓存目录
[root@store1 etc]# mkdir /var/cache/swift [root@store1 etc]# chown swift:swift /var/cache/swift
启动相关服务
[root@store1 etc]# swift-init object container account reload No container-server running Starting container-server...(/etc/swift/container-server.conf) No account-server running Starting account-server...(/etc/swift/account-server.conf) No object-server running Starting object-server...(/etc/swift/object-server.conf) [root@store1 ~]# ./swift-helper restart Signal object-server pid: 7320 signal: 15 object-server (7320) appears to have stopped Starting object-server...(/etc/swift/object-server.conf) No object-replicator running Starting object-replicator...(/etc/swift/object-server.conf) No object-updater running Starting object-updater...(/etc/swift/object-server.conf) No object-auditor running Starting object-auditor...(/etc/swift/object-server.conf) Signal container-server pid: 7305 signal: 15 container-server (7305) appears to have stopped Starting container-server...(/etc/swift/container-server.conf) No container-replicator running Starting container-replicator...(/etc/swift/container-server.conf) No container-updater running Starting container-updater...(/etc/swift/container-server.conf) No container-auditor running Starting container-auditor...(/etc/swift/container-server.conf) Signal account-server pid: 7312 signal: 15 account-server (7312) appears to have stopped Starting account-server...(/etc/swift/account-server.conf) No account-replicator running Starting account-replicator...(/etc/swift/account-server.conf) No account-auditor running Starting account-auditor...(/etc/swift/account-server.conf)
升级完成一个存储节点后再按照升级流程依次完成其它存储节点的升级。
升级代理节点
升级代理节点基本同上面存储节点的升级,停止代理服务,安装相关软件,修改代理服务配置文件,启动代理服务。升级的时候需要注意几点,一是swift3已经从swift项目里移出了,有需要的话得另外安装(详情)。二是F版可以使用新的或旧的rings而E版只可以使用旧的rings,如果要考虑降级的话先不要更新rings(详情)。三是缓存的平滑过度问题(详情)。最后贴一下我修改后的配置:[root@stackcc ~]# cat /etc/swift/proxy-server.conf [DEFAULT] bind_port = 8888 [pipeline:main] pipeline = catch_errors healthcheck cache ratelimit formpost tempurl authtoken keystoneauth staticweb proxy-logging name_check proxy-server [app:proxy-server] use = egg:swift#proxy account_autocreate = true [filter:authtoken] paste.filter_factory = keystone.middleware.auth_token:filter_factory auth_host = localhost auth_port = 35357 auth_protocol = http auth_uri = http://localhost:5000/ admin_tenant_name = service admin_user = swift admin_password = service123 delay_auth_decision = 1 signing_dir = /etc/swift [filter:keystoneauth] use = egg:swift#keystoneauth operator_roles = admin, swiftoperator [filter:healthcheck] use = egg:swift#healthcheck [filter:cache] use = egg:swift#memcache [filter:ratelimit] use = egg:swift#ratelimit [filter:catch_errors] use = egg:swift#catch_errors [filter:staticweb] use = egg:swift#staticweb [filter:tempurl] use = egg:swift#tempurl [filter:formpost] use = egg:swift#formpost [filter:name_check] use = egg:swift#name_check [filter:proxy-logging] use = egg:swift#proxy_logging
北方工业大学 |
云计算研究中心 | 姜永
相关文章推荐
- OpenStack版本升级之Swift
- OpenStack版本升级之Horizon
- OpenStack版本升级之Nova
- OpenStack版本升级之Cinder安装
- 从 Liberty 到 Ocata 的 OpenStack 版本升级之旅
- OpenStack版本升级之Horizon
- OpenStack版本升级之Nova
- openstack版本升级
- OpenStack版本升级之Glance
- OpenStack版本升级之Glance
- OpenStack版本升级之Keystone
- OPENSTACK SWIFT API(中文版本)
- OpenStack版本升级之Keystone
- Solaris 10升级版本对Xen提供全面的支持功能
- 理解 OpenStack Swift (2):架构、原理及功能 [Architecture, Implementation and Features]
- centos 安装mysql (升级版本)
- iOS itunes中,构建版本提交失败原因,以及控制台打印错误dyld: Library not loaded: @rpath/libswiftCore.dylib
- 升级 phpStudy 中 MySQL 版本至 5.7.17
- OpenStack Heat总结之:icehouse版本中Heat的简单介绍(转)
- iOS --------- 强制提示用户版本升级