Commit Graph

13 Commits

Author SHA1 Message Date
wanyaoqi
d9c042252a fix(region,host): host health reconnect etcd add timeout (#14610)
- host: host health reconnect etcd add timeout
- region: request health status use 'GET' method
- region: only migrate running guests on host down
- etcd: keepalive use background context

Signed-off-by: wanyaoqi <wanyaoqi@yunion.cn>
2022-07-12 10:38:17 +08:00
wanyaoqi
dc92f09d95 fix(region,host): auto migrate on host down (#14497)
* fix(region,host): auto migrate on host down

This patch fix source servers not shutdown on network unreachable.
Restart etcd session add timeout, and shutdown servers add force
option incase host stuck on scriptStop.

Signed-off-by: wanyaoqi <wanyaoqi@yunion.cn>

* host_health: add check network available

On host etcd keep alive failed, add check networks is available.
If networks available, may be is the etcd not work, in this case
we will net shutdowns servers and wait for etcd ready.

Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
2022-06-23 16:26:18 +08:00
Zexi Li
1c2a76cc76 feat(vendor): update etcd package for master 2022-03-08 10:52:23 +08:00
Yousong Zhou
651c4b687d etcd: fix "fatal error: concurrent map writes"
Trace

	goroutine 1270434 [running]:
	runtime.throw(0x4b0cc5e, 0x15)
		/home/yousong/.usr/go/goroot-1.15.6/src/runtime/panic.go:1116 +0x72 fp=0xc0011151f8 sp=0xc0011151c8 pc=0x439292
	runtime.mapdelete_faststr(0x40876e0, 0xc0006a54a0, 0xc001e84200, 0x3e)
		/home/yousong/.usr/go/goroot-1.15.6/src/runtime/map_faststr.go:377 +0x34c fp=0xc001115260 sp=0xc0011151f8 pc=0x41664c
	yunion.io/x/onecloud/pkg/cloudcommon/etcd.(*SEtcdClient).Unwatch(0xc0003130e0, 0xc001e84200, 0x3e)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/cloudcommon/etcd/etcd.go:353 +0x134 fp=0xc0011152d0 sp=0xc001115260 pc=0x10031f4
	yunion.io/x/onecloud/pkg/compute/models.(*SHostHealthChecker).WatchHost(0xc000c222a0, 0x5229ca0, 0xc000122000, 0xc001fbc4e0, 0x24)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/host_health.go:149 +0xd5 fp=0xc001115338 sp=0xc0011152d0 pc=0x1816395
	yunion.io/x/onecloud/pkg/compute/models.(*SHost).PerformOnline(0xc001fd8400, 0x5229d20, 0xc001c4d440, 0x52a0c60, 0xc000957c40, 0x5298900, 0xc001629aa0, 0x5298900, 0xc001629ae0, 0xc000957c40, ...)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/hosts.go:3829 +0x227 fp=0xc0011153a0 sp=0xc001115338 pc=0x185a387
	yunion.io/x/onecloud/pkg/compute/models.(*SHost).PerformPing(0xc001fd8400, 0x5229d20, 0xc001c4d440, 0x52a0c60, 0xc000957c40, 0x5298900, 0xc001629aa0, 0x5298900, 0xc001629ae0, 0x0, ...)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/hosts.go:3891 +0xbd fp=0xc001115430 sp=0xc0011153a0 pc=0x185acbd
2021-03-08 09:54:24 +08:00
wanyaoqi
92e0ed3434 fix(host): check lease living on restart etcd session 2020-12-09 16:53:55 +08:00
Zexi Li
86253534d7 only notify watched resource (#7592) 2020-08-19 12:52:26 +08:00
Yousong Zhou
2eeb45deda cloudcommon: etcd: quash low-value debug log lines 2020-06-28 14:49:38 +08:00
Zexi Li
95a58cc606 implement generic service informer 2020-05-29 19:59:34 +08:00
wanyaoqi
af6c6fee88 host health check 2020-04-26 21:44:02 +08:00
Qiu Jian
004d9b6f95 update copyright headers of all source 2019-03-29 14:47:48 +08:00
Yousong Zhou
8fe4f2ec98 treewide: group imports with goimports
./goimports -w -local yunion.io/x/onecloud/ -corp yunion.io/x/ $GOPATH/src/yunion.io/x/onecloud/{cmd,pkg}
2019-03-13 10:46:12 +00:00
Qiu Jian
2e587bd6ab glance重构 update 1
Conflicts:
	Gopkg.lock
	pkg/appsrv/appsrv.go
	pkg/cloudcommon/options.go
	pkg/compute/models/hosts.go
	pkg/compute/models/quotas.go
	pkg/compute/service/service.go
	pkg/mcclient/mcclient.go
2018-12-26 22:52:13 +08:00
Qiu Jian
c70201b177 temp commit
Conflicts:
	Gopkg.lock
	Gopkg.toml
	vendor/yunion.io/x/pkg/util/sysutils/storagetypes.go
	vendor/yunion.io/x/structarg/structarg.go
2018-12-26 22:44:03 +08:00