Commit Graph
44 Commits
Author SHA1 Message Date
TangBin d2fa217cab mcclient module base 2019-09-07 22:56:47 +08:00
Yousong Zhou 173a316f3e lbagent: fix possible out of bound index access 2019-09-05 07:20:12 +00:00
Yousong Zhou c88a391caa lbagent: reuse mcclient client session 2019-09-05 07:20:12 +00:00
Rain 0a75f97d68 notify module in Go finished. 2019-08-16 18:54:49 +08:00
Yousong Zhou 22468ddebd lbagent: 改正agent参数变更校验 2019-08-07 09:16:02 +00:00
Yousong Zhou 694a91c24e lbagent: 改正unicast vrrp日志记录 2019-08-07 09:10:04 +00:00
Yousong Zhou 30f800bf36 lbclusters: 初次支持 2019-06-28 15:31:21 +00:00
Yousong Zhou 448365806c lbagent: 启动时全量取API数据
此变更之后,data/目录内容更多服务于调试作用
2019-06-26 11:58:00 +00:00
Yousong Zhou d3f4518967 lb: 添加PROXY协议支持
默认关闭(off),支持v1, v2, v2-ssl, v2-ssl-cn

可分别在listener, backend上控制

 - 若listener.send_proxy不为off,以listener.backend_proxy为准
 - 若listener.send_proxy为off,以backend.send_proxy为准
2019-05-30 13:06:07 +00:00
Zexi db0e303798 make 'go test ./...' pass 2019-04-15 19:54:46 +08:00
Qiu Jian 004d9b6f95 update copyright headers of all source 2019-03-29 14:47:48 +08:00
Zexi Li 076ad985cc move consts to apis 2019-03-20 12:08:15 +08:00
邱剑 7d1d851244 Merge pull request #1255 in YUNIONIO/onecloud from ~WANYAOQI/onecloud:feature/fix-package-dependence to release/2.8.0
* commit '53ece34f3b424d4430b1198ea06a66456a4a9a12':
  merge const pkg from cloudcommon to compute
  fix package dependence
2019-03-18 17:18:35 +08:00
Yousong Zhou 1b879d1b24 lbagent: try using unicast vrrp 2019-03-15 12:11:22 +00:00
Yousong Zhou 33f568717b lbagent: report ip, ha_state, version 2019-03-15 12:11:22 +00:00
Yousong Zhou 41bcd59cc1 lbagent: always reload on startup
Instead of at the next resync tick
2019-03-15 12:11:22 +00:00
Yousong Zhou fdb0571c5c lbagent: making agent params with reflect 2019-03-15 12:11:22 +00:00
wanyaoqi e0ee2b8c59 fix package dependence 2019-03-15 11:45:56 +08:00
Yousong Zhou 4b4c86b883 lbagent: fix corpus versioning 2019-03-12 03:39:20 +00:00
Yousong Zhou 8016a27abf lbagent: telegraf: add params influx_db_output_unsafe_ssl 2019-03-12 03:39:20 +00:00
Yousong Zhou c6e4fff0d0 lb: 不记录来自lbagent的GET查询请求
要求

 - _orig=lbagent
 - userCred.HasSystemAdminPrivilege()
2019-03-12 03:39:20 +00:00
Yousong Zhou 4adae9bd88 lbagent: fix typo in log 2019-01-15 08:00:44 +00:00
Yousong Zhou 10a388e6df lbagent: use encoding/json for {,de}serialization 2019-01-15 08:00:44 +00:00
Yousong Zhou 082cff6acd lbagent: 改正cloudcommon.CommonOptions使用 2019-01-15 08:00:44 +00:00
Yousong Zhou 67a9a1921d lbagent: 改正isempty()使用 2019-01-15 08:00:44 +00:00
周有松 65dd335b4d Automatic merge from release/2.3.0 -> release/2.4.0
* commit 'ce995c0582e056ac18447985eef57c622b261fc6':
  lbagent: 增加haproxy reload健壮性
2018-12-29 20:19:47 +08:00
Yousong Zhou 9251c6b45b lbagent: 增加haproxy reload健壮性
HAProxy小概率出现stats socket和stats url未监听到的情况,怀疑是00-haproxy.cfg
被提前删除造成,导致后续的-x haproxy.sock配置重加载失败

健壮性增强,reload失败时,杀掉旧进程pid,重新启动新的haproxy
2018-12-29 08:43:36 +00:00
wanyaoqi 742a67b0f8 client session add context 2018-12-25 13:33:33 +08:00
Yousong Zhou 603e1be98c treewide: 重新组织cloudcommon options
将cloudcommon.Options从cloudcommon.DBOptions中拿出来,并改名为CommonOptions
2018-12-23 15:31:11 +00:00
邱剑 f26634c6ee Automatic merge from release/2.3.0 -> release/2.4.0
* commit '516c39a6144b5558505fa6669d70a8cf4ad3b496':
  loadbalancers: 使用ApplyModelFilters()
  validators: 添加ApplyModelFilters()
  loadbalancerlisteners: 改正update enable_http2
  lbagent: 仅处理manager_id为空的API对象
  gofmt
2018-12-12 21:14:07 +08:00
Yousong Zhou 4f107ee02c lbagent: 仅处理manager_id为空的API对象
当前还没有manager_id字段,先留出
2018-12-12 08:47:04 +00:00
邱剑 2f325530ef Automatic merge from release/2.3.0 -> release/2.4.0
* commit 'ec71bc2fe99668a49fa2cc1b92413798cf6bec4a':
  loadbalancers: 增加rps限速支持
  loadbalancers: 清理监听选项名
  loadbalancers: 移除Bandwidth字段
2018-12-12 15:32:47 +08:00
Yousong Zhou 5564929e34 loadbalancers: 增加rps限速支持 2018-12-12 03:44:30 +00:00
Qiu Jian 965e84ea36 update 2018-12-07 02:57:58 +08:00
Yousong Zhou 9a73d5c095 lbagent: list with details=true explicitly
Previously we depend on .Params() of mcclient to set it for us.  Set it
explicitly just in case
2018-11-08 15:37:48 +00:00
Yousong Zhou 7acc86b021 lbagent: fix unused imports 2018-11-08 15:37:48 +00:00
Yousong Zhou 255f5e242a lbagent: make sonar happy 2018-11-05 08:39:50 +00:00
Yousong Zhou 3768f05b62 lbagent: specificity ordered rule routing 2018-11-01 02:00:36 +00:00
Yousong Zhou 13272b39ef lbagent: add symlink to generated telegraf.conf 2018-10-29 07:09:37 +00:00
Yousong Zhou 719a4686ce lbagent: add telegraf support 2018-10-27 09:40:38 +00:00
Yousong Zhou 988d3ed5fc lbagent: better comments 2018-10-26 06:35:57 +00:00
Yousong Zhou 4f0b4ec7c9 govet: treewide
# yunion.io/x/onecloud/pkg/lbagent/utils
  pkg/lbagent/utils/configdir.go:134: unreachable code
  # yunion.io/x/onecloud/pkg/mcclient/modules
  pkg/mcclient/modules/mod_domains.go:243: Sprintf format %s has arg len(result.Data) of wrong type int
  # yunion.io/x/onecloud/pkg/lbagent/models
  pkg/lbagent/models/reflect.go:68: Errorf call needs 1 arg but has 2 args
  # yunion.io/x/onecloud/pkg/cloudcommon/db
  pkg/cloudcommon/db/db_dispatcher.go:1064: Sprintf call needs 1 arg but has 2 args
  # yunion.io/x/onecloud/pkg/scheduler/core
  pkg/scheduler/core/context.go:579: assignment copies lock value to dataItem.Networks: sync.Map contains sync.Mutex
  # yunion.io/x/onecloud/pkg/scheduler/data_manager
  pkg/scheduler/data_manager/candidate_manager.go:353: Errorf format %#v reads arg #1, but call has 0 args
  # yunion.io/x/onecloud/pkg/scheduler/algorithm/predicates/baremetal
  pkg/scheduler/algorithm/predicates/baremetal/network_predicate.go:145: call of u.SetFiltedData copies lock value: sync.Map contains sync.Mutex
  # yunion.io/x/onecloud/pkg/scheduler/algorithm/predicates/guest
  pkg/scheduler/algorithm/predicates/guest/network_predicate.go:207: call of u.SetFiltedData copies lock value: sync.Map contains sync.Mutex
  # yunion.io/x/onecloud/pkg/cloudcommon/db/lockman
  pkg/cloudcommon/db/lockman/inmemory_test.go:49: loop variable id captured by func literal
  # yunion.io/x/onecloud/pkg/util/seclib2
  pkg/util/seclib2/seclib.go:56: unreachable code
  # yunion.io/x/onecloud/cmd/climc/shell
  cmd/climc/shell/alarmlogs.go:46: result of fmt.Errorf call not used
  # yunion.io/x/onecloud/pkg/util/aliyun
  pkg/util/aliyun/disk.go:267: Errorf format %s has arg size of wrong type int64
  pkg/util/aliyun/image.go:93: Sprintf format %s reads arg #1, but call has 0 args
  # yunion.io/x/onecloud/pkg/compute/models
  pkg/compute/models/cachedimages.go:161: Errorf format %d has arg imgId of wrong type string
  pkg/compute/models/disks.go:1274: Errorln call has possible formatting directive %s
  pkg/compute/models/guests.go:1749: Infof format %s has arg self.IsOwner(userCred) of wrong type bool
  pkg/compute/models/hosts.go:1134: Debugf format %s has arg storage of wrong type *models.SStorage
  pkg/compute/models/hosts.go:1135: Debugf format %s has arg self of wrong type *models.SHost
  # yunion.io/x/onecloud/pkg/util/azure
  pkg/util/azure/instance.go:536: unreachable code
  pkg/util/azure/network.go:128: unreachable code
  pkg/util/azure/storage.go:69: unreachable code
  # yunion.io/x/onecloud/pkg/util/azure/shell
  pkg/util/azure/shell/disk.go:20: unreachable code
  pkg/util/azure/shell/network.go:55: unreachable code
2018-10-22 12:33:41 +00:00
Yousong Zhou 5dd5767d94 govet: treewide struct tag fix
govet complains of the form

	struct field tag `required:true` not compatible with reflect.StructTag.Get: bad syntax for struct tag value
2018-10-22 12:31:12 +00:00
Yousong Zhou af6946ebb5 loadbalancer: initial version 2018-09-30 08:37:37 +00:00