Compare commits

...

656 Commits

Author SHA1 Message Date
yunion-ci-robot
4f2f9420c0 Merge pull request #2527 from ioito/automated-cherry-pick-of-#2522-upstream-release-2.8.0
Automated cherry pick of #2522: fix: sync status after guest sync conf
2019-08-23 18:04:09 +08:00
ioito
820c0f5ca9 fix: sync status after guest sync conf 2019-08-23 17:21:55 +08:00
yunion-ci-robot
866ff3dafd Merge pull request #2506 from ioito/automated-cherry-pick-of-#2499-upstream-release-2.8.0
Automated cherry pick of #2499: fix: qcloud sync unavailable storages
2019-08-23 10:56:08 +08:00
ioito
f5d1ad28ec fix: qcloud sync unavailable storages 2019-08-22 20:49:20 +08:00
yunion-ci-robot
a931461e73 Merge pull request #2482 from ioito/automated-cherry-pick-of-#2451-upstream-release-2.8.0
Automated cherry pick of #2451: bugfix: 避免openstack磁盘扩容成功后未能挂载到虚拟机上
2019-08-22 11:41:07 +08:00
ioito
c97dba35d4 bugfix: 避免openstack磁盘扩容成功后未能挂载到虚拟机上 2019-08-22 10:21:15 +08:00
yunion-ci-robot
8ff1eafe5b Merge pull request #2400 from ioito/automated-cherry-pick-of-#2381-upstream-release-2.8.0
Automated cherry pick of #2381: fix: httputils show error when resp body is not dict
2019-08-20 10:25:08 +08:00
ioito
c0d48b6114 fix: httputils show error when resp body is not dict 2019-08-20 10:20:46 +08:00
yunion-ci-robot
8596a4392f Merge pull request #2348 from yousong/automated-cherry-pick-of-#2343-upstream-release-2.8.0
Automated cherry pick of #2343: hostman: windows: 改正批处理代码
2019-08-17 09:58:06 +08:00
Yousong Zhou
df0056dfb2 hostman: windows: 改正批处理代码 2019-08-16 13:22:42 +00:00
yunion-ci-robot
8f02ead030 Merge pull request #2331 from ioito/automated-cherry-pick-of-#2326-upstream-release-2.8.0
Automated cherry pick of #2326: fix: azure快照的磁盘id应该小写
2019-08-16 16:27:04 +08:00
ioito
dd56d57747 fix: azure快照的磁盘id应该小写 2019-08-16 15:59:44 +08:00
yunion-ci-robot
b63e58cafb Merge pull request #2321 from ioito/automated-cherry-pick-of-#2316-upstream-release-2.8.0
Automated cherry pick of #2316: fix: create disk with project-src=local
2019-08-16 15:25:03 +08:00
ioito
fc2b29be70 fix: create disk with project-src=local 2019-08-16 15:08:23 +08:00
yunion-ci-robot
cc79e19d20 Merge pull request #2256 from wanyaoqi/automated-cherry-pick-of-#2250-upstream-release-2.8.0
Automated cherry pick of #2250: support get user tags
2019-08-13 18:55:03 +08:00
wanyaoqi
d79c3188d3 support get user tags 2019-08-13 18:45:03 +08:00
yunion-ci-robot
caccfd65d3 Merge pull request #2238 from ioito/automated-cherry-pick-of-#2234-upstream-release-2.8.0
Automated cherry pick of #2234: fix: no need to inject password by cloud-init for qcloud
2019-08-12 22:17:06 +08:00
ioito
05e9ece08c fix: no need to inject password by cloud-init for qcloud 2019-08-12 20:28:49 +08:00
yunion-ci-robot
22d6fff81c Merge pull request #2206 from ioito/automated-cherry-pick-of-#2202-upstream-release-2.8.0
Automated cherry pick of #2202: fix: sync cloud snapshot size
2019-08-12 11:51:01 +08:00
ioito
e17184b5fa fix: sync cloud snapshot size 2019-08-10 16:52:02 +08:00
yunion-ci-robot
18a76155be Merge pull request #2190 from ioito/automated-cherry-pick-of-#2186-upstream-release-2.8.0
Automated cherry pick of #2186: fix: lb purge error
2019-08-08 20:07:58 +08:00
ioito
83cf5b2e82 fix: lb purge error 2019-08-08 19:57:34 +08:00
yunion-ci-robot
90423effa4 Merge pull request #2185 from tb365/automated-cherry-pick-of-#2181-upstream-release-2.8.0
Automated cherry pick of #2181: cpu core bugfix
2019-08-08 19:50:59 +08:00
TangBin
638824c10b cpu core bugfix 2019-08-08 19:44:37 +08:00
yunion-ci-robot
a34546c1ec Merge pull request #2086 from ioito/automated-cherry-pick-of-#2082-upstream-release-2.8.0
Automated cherry pick of #2082: fix: get openstack all customize storage type
2019-08-02 20:17:03 +08:00
ioito
ed4a28b554 fix: get openstack all customize storage type 2019-08-02 20:11:41 +08:00
yunion-ci-robot
7b66a5f1ad Merge pull request #2054 from ioito/automated-cherry-pick-of-#2048-upstream-release-2.8.0
Automated cherry pick of #2048: fix: openstack glance image-list not list all images
2019-08-01 16:55:03 +08:00
ioito
aae57f78b1 fix: openstack glance image-list not list all images 2019-07-31 19:47:49 +08:00
yunion-ci-robot
500eedba38 Merge pull request #2023 from ioito/automated-cherry-pick-of-#1982-upstream-release-2.8.0
Automated cherry pick of #1982: fix: rbd image resize not found error
2019-07-31 15:55:00 +08:00
yunion-ci-robot
9d2dd183f5 Merge pull request #2047 from wanyaoqi/automated-cherry-pick-of-#2043-upstream-release-2.8.0
Automated cherry pick of #2043: guest export keys add zone
2019-07-31 15:51:01 +08:00
wanyaoqi
463f413f07 guest export keys add zone 2019-07-31 15:45:31 +08:00
ioito
756d152f4d fix: rbd image resize not found error 2019-07-30 19:11:48 +08:00
yunion-ci-robot
5340769a00 Merge pull request #2009 from ioito/automated-cherry-pick-of-#2005-upstream-release-2.8.0
Automated cherry pick of #2005: fix: add priority for openstack secgroup rule priority
2019-07-30 12:56:33 +08:00
yunion-ci-robot
57fa1ddb7b Merge pull request #1993 from ioito/automated-cherry-pick-of-#1989-upstream-release-2.8.0
Automated cherry pick of #1989: fix: qcloud reserved first, second and last ip for internal connection
2019-07-30 12:53:31 +08:00
ioito
c641beefa7 fix: add priority for openstack secgroup rule priority 2019-07-30 11:51:29 +08:00
ioito
beea0e478f fix: qcloud reserved first, second and last ip for internal connection 2019-07-29 20:04:45 +08:00
yunion-ci-robot
17e0c7e1ab Merge pull request #1914 from ioito/automated-cherry-pick-of-#1910-upstream-release-2.8.0
Automated cherry pick of #1910: fix: 避免镜像同步到私有云自定义镜像里面
2019-07-26 15:32:06 +08:00
ioito
f731ebc62f fix: 避免镜像同步到私有云自定义镜像里面 2019-07-25 14:41:38 +08:00
yunion-ci-robot
d136be7fcf Merge pull request #1866 from ioito/automated-cherry-pick-of-#1860-upstream-release-2.8.0
Automated cherry pick of #1860: 添加同步安全组日志
2019-07-24 09:36:07 +08:00
ioito
8c8f3427b1 避免重复设置同一vpc底下不同安全组externalId 2019-07-23 22:00:06 +08:00
ioito
127a671927 添加同步安全组日志 2019-07-23 21:55:48 +08:00
yunion-ci-robot
2e0e44f8bd Merge pull request #1849 from ioito/automated-cherry-pick-of-#1829-upstream-release-2.8.0
Automated cherry pick of #1829: 避免cacheimage refresh时同步azure镜像信息异常
2019-07-23 18:44:05 +08:00
ioito
34fb2c8ef8 避免cacheimage refresh时同步azure镜像信息异常 2019-07-23 15:07:13 +08:00
yunion-ci-robot
6d54a6d3c4 Merge pull request #1836 from ioito/automated-cherry-pick-of-#1832-upstream-release-2.8.0
Automated cherry pick of #1832: 避免因cloudprovider disable导致账号同步失效
2019-07-23 12:04:04 +08:00
yunion-ci-robot
ee9a503f9d Merge pull request #1828 from ioito/automated-cherry-pick-of-#1820-upstream-release-2.8.0
Automated cherry pick of #1820: 仅忽略 no such service错误,否则以最新api结果为准
2019-07-23 12:01:04 +08:00
ioito
9988e6c18d 避免因cloudprovider disable导致账号同步失效 2019-07-22 20:14:46 +08:00
ioito
6c6562f3b7 仅忽略 no such service错误,否则以最新api结果为准 2019-07-22 10:12:36 +08:00
yunion-ci-robot
4b30f07c59 Merge pull request #1804 from wanyaoqi/bugfix/wyq/fix-export-data-2.8
fix list export data no filed
2019-07-18 19:41:02 +08:00
wanyaoqi
4b747c75d7 fix list export data no filed 2019-07-18 19:35:25 +08:00
yunion-ci-robot
f539ba90fa Merge pull request #1800 from ioito/automated-cherry-pick-of-#1796-upstream-release-2.8.0
Automated cherry pick of #1796: 提高openstack创建windows机器成功率
2019-07-18 15:39:00 +08:00
ioito
1946d27f15 提高openstack创建windows机器成功率 2019-07-18 15:08:01 +08:00
yunion-ci-robot
ac8c898735 Merge pull request #1728 from ioito/automated-cherry-pick-of-#1724-upstream-release-2.8.0
Automated cherry pick of #1724: 修复purge backend野指针引用问题
2019-07-15 10:38:58 +08:00
ioito
311da29dd5 修复purge backend野指针引用问题 2019-07-15 10:25:32 +08:00
yunion-ci-robot
074eec803c Merge pull request #1713 from ioito/automated-cherry-pick-of-#1709-upstream-release-2.8.0
Automated cherry pick of #1709: fix console log
2019-07-13 17:39:59 +08:00
ioito
8543ac55f8 fix console log 2019-07-13 14:48:51 +08:00
yunion-ci-robot
a7a7654967 Merge pull request #1685 from ioito/automated-cherry-pick-of-#1681-upstream-release-2.8.0
Automated cherry pick of #1681: 宿主机存储利用率仅计算本地存储
2019-07-12 14:39:56 +08:00
yunion-ci-robot
7c596ff100 Merge pull request #1703 from ioito/automated-cherry-pick-of-#1699-upstream-release-2.8.0
Automated cherry pick of #1699: 同优先级规则deny优先于allow规则生效
2019-07-12 12:06:57 +08:00
ioito
a9b081ee3e 同优先级规则deny优先于allow规则生效 2019-07-12 11:57:29 +08:00
yunion-ci-robot
a171963ac1 Merge pull request #1680 from ioito/automated-cherry-pick-of-#1676-upstream-release-2.8.0
Automated cherry pick of #1676: 避免重装系统时绑定秘钥后没有account信息
2019-07-11 18:31:55 +08:00
ioito
5e1a094f19 宿主机存储利用率仅计算本地存储 2019-07-11 17:39:07 +08:00
ioito
0fd92435bd 避免重装系统时绑定秘钥后没有account信息 2019-07-11 17:01:39 +08:00
yunion-ci-robot
66aff0a9f5 Merge pull request #1668 from swordqiu/automated-cherry-pick-of-#1667-upstream-release-2.8.0
Automated cherry pick of #1667: fix: task usercred should be utf8 charset
2019-07-11 12:16:57 +08:00
Qiu Jian
10925671ee fix: backport variable name change 2019-07-11 12:10:19 +08:00
Qiu Jian
ab7fef6008 fix: task usercred should be utf8 charset 2019-07-11 12:08:48 +08:00
yunion-ci-robot
6a72d7a2e6 Merge pull request #1658 from ioito/automated-cherry-pick-of-#1654-upstream-release-2.8.0
Automated cherry pick of #1654: fix qcloud associate eip timeout after bind
2019-07-11 08:46:56 +08:00
ioito
116a37571d fix qcloud associate eip timeout after bind 2019-07-10 21:15:33 +08:00
yunion-ci-robot
9b251c87cc Merge pull request #1645 from ioito/automated-cherry-pick-of-#1641-upstream-release-2.8.0
Automated cherry pick of #1641: 统一处理ResourceNotFound返回id not find
2019-07-10 20:46:56 +08:00
ioito
3fa76f6c92 统一处理ResourceNotFound返回id not find 2019-07-10 16:13:18 +08:00
yunion-ci-robot
3638893459 Merge pull request #1630 from ioito/automated-cherry-pick-of-#1626-upstream-release-2.8.0
Automated cherry pick of #1626: metadata permission
2019-07-09 23:23:57 +08:00
yunion-ci-robot
7c4271fa84 Merge pull request #1634 from ioito/automated-cherry-pick-of-#1622-upstream-release-2.8.0
Automated cherry pick of #1622: 兼容zone及usable参数
2019-07-09 23:03:55 +08:00
ioito
2d55107e7f 兼容zone及usable参数 2019-07-09 22:47:28 +08:00
ioito
bd407dcebd metadata permission 2019-07-09 22:41:03 +08:00
yunion-ci-robot
be660f6bd7 Merge pull request #1609 from ioito/automated-cherry-pick-of-#1602-upstream-release-2.8.0
Automated cherry pick of #1602: add task failed code
2019-07-09 17:29:58 +08:00
yunion-ci-robot
508eef918e Merge pull request #1613 from ioito/automated-cherry-pick-of-#1605-upstream-release-2.8.0
Automated cherry pick of #1605: fix clone rbd image error
2019-07-09 17:22:58 +08:00
ioito
6fb5ebb703 fix clone rbd image error 2019-07-09 15:50:43 +08:00
ioito
9940399f23 add task failed code 2019-07-09 15:47:12 +08:00
Jian Qiu
fd195f953a fix: ignore queryField panic (#1583) 2019-07-06 11:07:39 +08:00
yunion-ci-robot
a9ab4151d2 Merge pull request #1577 from ioito/automated-cherry-pick-of-#1573-upstream-release-2.8.0
Automated cherry pick of #1573: add usable filter for network
2019-07-05 23:04:53 +08:00
yunion-ci-robot
030de54720 Merge pull request #1580 from ioito/automated-cherry-pick-of-#1551-upstream-release-2.8.0
Automated cherry pick of #1551: add without_user_meta filter
2019-07-05 22:47:54 +08:00
yunion-ci-robot
fadbdc0140 Merge pull request #1567 from ioito/automated-cherry-pick-of-#1563-upstream-release-2.8.0
Automated cherry pick of #1563: add deploy failed action log
2019-07-05 22:30:53 +08:00
yunion-ci-robot
c8f21e4099 Merge pull request #1558 from ioito/automated-cherry-pick-of-#1550-upstream-release-2.8.0
Automated cherry pick of #1550: fix purge aliyun account error by lbbg
2019-07-05 22:23:00 +08:00
ioito
45d3ead6bc optimized tag filter 2019-07-05 22:10:25 +08:00
ioito
8d8732d9b8 add without_user_meta filter 2019-07-05 21:34:10 +08:00
ioito
541f4b866a add usable filter for network 2019-07-05 18:51:13 +08:00
ioito
7732772b22 add deploy failed action log 2019-07-05 14:20:24 +08:00
ioito
5b377c6f25 fix purge aliyun account error by lbbg 2019-07-05 10:11:50 +08:00
yunion-ci-robot
b1abe6a49e Merge pull request #1533 from ioito/automated-cherry-pick-of-#1529-upstream-release-2.8.0
Automated cherry pick of #1529: fix create image with userCred issue
2019-07-03 23:24:54 +08:00
yunion-ci-robot
2be21aa3b8 Merge pull request #1528 from ioito/automated-cherry-pick-of-#1524-upstream-release-2.8.0
Automated cherry pick of #1524: fix azure reserved ips
2019-07-03 23:04:58 +08:00
ioito
d410f6ca62 fix create image with userCred issue 2019-07-03 20:59:09 +08:00
ioito
bc8e2ac7ae fix azure reserved ips 2019-07-03 20:13:36 +08:00
yunion-ci-robot
848c193ec0 Merge pull request #1516 from wanyaoqi/bugfix/wyq/fix-image-request-timeout-2.8
cherrypick : fix request image timeout
2019-07-03 18:07:55 +08:00
wanyaoqi
971f8ef1d1 fix request image timeout 2019-07-03 18:03:01 +08:00
yunion-ci-robot
ed378eee20 Merge pull request #1483 from ioito/automated-cherry-pick-of-#1479-upstream-release-2.8.0
Automated cherry pick of #1479: fix sync openstack hoststorages issue
2019-07-03 09:04:51 +08:00
yunion-ci-robot
cd71801953 Merge pull request #1494 from ioito/automated-cherry-pick-of-#1486-upstream-release-2.8.0
Automated cherry pick of #1486: fix azure set secgroup error
2019-07-03 08:28:52 +08:00
yunion-ci-robot
829d81b917 Merge pull request #1499 from wanyaoqi/automated-cherry-pick-of-#1495-upstream-release-2.8.0
Automated cherry pick of #1495: fix export data
2019-07-02 22:13:51 +08:00
wanyaoqi
57ef1d39a4 fix export data 2019-07-02 22:05:55 +08:00
ioito
ed5fdfbcfd fix azure set secgroup error 2019-07-02 21:25:39 +08:00
ioito
a1b6e811e2 fix sync openstack hoststorages issue 2019-07-02 20:13:27 +08:00
yunion-ci-robot
e984394b3b Merge pull request #1478 from wanyaoqi/automated-cherry-pick-of-#1471-upstream-release-2.8.0
Automated cherry pick of #1471: fix export data, set no limit; expand timeout
2019-07-02 18:50:55 +08:00
wanyaoqi
3dbfba68f8 fix export data, set no limit; expand timeout 2019-07-02 18:12:25 +08:00
yunion-ci-robot
4daae92728 Merge pull request #1470 from ioito/automated-cherry-pick-of-#1467-upstream-release-2.8.0
Automated cherry pick of #1467: fix create disk scheduler failed
2019-07-02 16:50:53 +08:00
ioito
e56ed6106d fix create disk scheduler failed 2019-07-02 16:49:09 +08:00
yunion-ci-robot
762c8b46e9 Merge pull request #1448 from ioito/automated-cherry-pick-of-#1420-upstream-release-2.8.0
Automated cherry pick of #1420: remove keypair info if rebuild-root net set keypair
2019-07-01 11:20:53 +08:00
ioito
e467356ac9 remove keypair info if rebuild-root net set keypair 2019-07-01 10:31:14 +08:00
yunion-ci-robot
09cf8cc4fc Merge pull request #1430 from yousong/automated-cherry-pick-of-#1421-release-2.8.0
Automated cherry pick of #1421: httperrors: 支持从msgTmpl转换为带%s的msgFmt
2019-06-29 14:32:52 +08:00
Yousong Zhou
c39df519db validators: errors: 使用msgFmt而非包含{NN}的msgTmpl 2019-06-29 06:28:40 +00:00
Yousong Zhou
e31788bc52 httperrors: 支持从msgTmpl转换为带%s的msgFmt 2019-06-29 06:28:40 +00:00
yunion-ci-robot
17ca98f347 Merge pull request #1403 from yousong/automated-cherry-pick-of-#1400-release-2.8.0
Automated cherry pick of #1400: lbagent: 启动时全量取API数据
2019-06-27 17:20:53 +08:00
yunion-ci-robot
7f2f48e0da Merge pull request #1399 from ioito/automated-cherry-pick-of-#1396-upstream-release-2.8.0
Automated cherry pick of #1396: wait ready or running after change vm config
2019-06-27 17:18:51 +08:00
yunion-ci-robot
3724780b00 Merge pull request #1394 from wanyaoqi/feature/wyq/live-migrate-filter-cpu-model-cherrypick-2.8
Cherrypick: Feature/wyq/live migrate filter cpu model cherrypick 2.8
2019-06-27 17:00:50 +08:00
yunion-ci-robot
02d9858295 Merge pull request #1410 from yousong/automated-cherry-pick-of-#670-release-2.8.0
Automated cherry pick of #670: atexit: 添加用于记录在进程退出时执行的队列
2019-06-26 22:04:51 +08:00
Yousong Zhou
4895059f36 cloudcommon: 添加--log-file-prefix选项
指定日志文件名,rotate 10,每个100MB
2019-06-26 14:00:47 +00:00
Yousong Zhou
9bba63bd6d atexit: 添加用于记录在进程退出时执行的队列 2019-06-26 13:59:35 +00:00
Yousong Zhou
2fd839d4da lbagent: 启动时全量取API数据
此变更之后,data/目录内容更多服务于调试作用
2019-06-26 12:26:41 +00:00
ioito
c70e3c8b2d wait ready or running after change vm config 2019-06-26 19:33:58 +08:00
yunion-ci-robot
544597952a Merge pull request #1392 from wanyaoqi/automated-cherry-pick-of-#1174-upstream-release-2.8.0
Automated cherry pick of #1174: import running libvirt guests
2019-06-26 16:48:50 +08:00
wanyaoqi
02195bb345 live migrate filter by cpu model and mircocode, fix guest backup status, misc fix 2019-06-26 13:26:19 +08:00
wanyaoqi
4ff2335e8a import running libvirt guests 2019-06-26 12:57:32 +08:00
yunion-ci-robot
74f981a25f Merge pull request #1375 from wanyaoqi/automated-cherry-pick-of-#1357-upstream-release-2.8.0
Automated cherry pick of #1357: set default http client timeout
2019-06-25 23:27:03 +08:00
yunion-ci-robot
8129339cbe Merge pull request #1383 from ioito/automated-cherry-pick-of-#1380-upstream-release-2.8.0
Automated cherry pick of #1380: clear scheduler cache afeter change host cmtbound
2019-06-25 23:15:55 +08:00
ioito
07463281ac clear scheduler cache afeter change host cmtbound 2019-06-25 21:01:57 +08:00
wanyaoqi
ff39d620ec set default http client timeout 2019-06-25 15:40:04 +08:00
yunion-ci-robot
4ecb311920 Merge pull request #1370 from yousong/automated-cherry-pick-of-#1369-release-2.8.0
Automated cherry pick of #1369: lbagents: 改正vrrp模板
2019-06-25 11:46:49 +08:00
Yousong Zhou
7bb55c16e4 validators: 默认将pending deleted的模型排除在外 2019-06-25 02:46:44 +00:00
Yousong Zhou
ec7a344ebc db: 添加IPendingDeletable类型 2019-06-25 02:46:44 +00:00
Yousong Zhou
4f481e4982 lbagents: 改正vrrp模板 2019-06-25 02:46:44 +00:00
yunion-ci-robot
cc8296fb6a Merge pull request #1355 from ioito/automated-cherry-pick-of-#1352-upstream-release-2.8.0
Automated cherry pick of #1352: avoid duplicate network name
2019-06-24 12:34:49 +08:00
ioito
0bf7f42fc4 avoid duplicate network name 2019-06-24 11:26:39 +08:00
yunion-ci-robot
abab15a405 Merge pull request #1299 from Zexi/automated-cherry-pick-of-#1298-upstream-release-2.8.0
Automated cherry pick of #1298: baremetal: change ipmi user password
2019-06-22 12:44:49 +08:00
Zexi Li
94ebff5848 Merge pull request #1342 from Zexi/automated-cherry-pick-of-#1341-upstream-release-2.8.0
Automated cherry pick of #1341: scheduler: fix prefer avoid score
2019-06-21 14:05:54 +08:00
Zexi
b30a0c1a19 scheduler: fix prefer avoid score 2019-06-21 13:59:09 +08:00
yunion-ci-robot
a3f5f5ed58 Merge pull request #1317 from wanyaoqi/bugfix/wyq/fix-detach-storage-2.8.0
bugfix: host attach storage sync storage status
2019-06-19 20:17:52 +08:00
wanyaoqi
03aa98ca60 fix host attach storage sync status 2019-06-19 19:46:03 +08:00
yunion-ci-robot
d873ae60d8 Merge pull request #1308 from ioito/automated-cherry-pick-of-#1305-upstream-release-2.8.0
Automated cherry pick of #1305: dissocate and release eip optimized\
2019-06-19 18:06:51 +08:00
yunion-ci-robot
0de4e56ccc Merge pull request #1313 from ioito/automated-cherry-pick-of-#1273-upstream-release-2.8.0
Automated cherry pick of #1273: add azure region geographicinfo
2019-06-19 18:03:50 +08:00
yunion-ci-robot
716be40154 Merge pull request #1268 from ioito/automated-cherry-pick-of-#1265-upstream-release-2.8.0
Automated cherry pick of #1265: avoid openstack zone externalid equals
2019-06-19 17:45:52 +08:00
ioito
7e087d8b1e add azure region geographicinfo 2019-06-19 17:42:26 +08:00
ioito
ee702037c2 dissocate and release eip optimized\ 2019-06-19 16:30:16 +08:00
Zexi
4aeb931c3c baremetal: change ipmi user password 2019-06-19 11:17:05 +08:00
yunion-ci-robot
ba566d3e58 Merge pull request #1280 from wanyaoqi/automated-cherry-pick-of-#1278-upstream-release-2.8.0
Automated cherry pick of #1278: filter storage not attached
2019-06-18 17:22:54 +08:00
wanyaoqi
427f34e0c0 filter storage not attached 2019-06-18 16:57:29 +08:00
yunion-ci-robot
ccd1ff02a3 Merge pull request #1253 from ioito/automated-cherry-pick-of-#1240-upstream-release-2.8.0
Automated cherry pick of #1240: choice valid storage for storagecache
2019-06-18 11:08:52 +08:00
ioito
1f3bcbfbeb avoid openstack zone externalid equals 2019-06-17 21:02:46 +08:00
yunion-ci-robot
5648423a23 Merge pull request #1260 from wanyaoqi/automated-cherry-pick-of-#1256-upstream-release-2.8.0
Automated cherry pick of #1256: fix guest sync status interval
2019-06-17 15:53:52 +08:00
wanyaoqi
823224302c fix guest sync status interval 2019-06-17 15:47:37 +08:00
ioito
5853323903 choice valid storage for storagecache 2019-06-17 10:17:02 +08:00
yunion-ci-robot
7266ab9599 Merge pull request #1231 from ioito/automated-cherry-pick-of-#1230-upstream-release-2.8.0
Automated cherry pick of #1230: fix cache image failed error
2019-06-16 17:28:52 +08:00
ioito
030d9e3cf3 fix cache image failed error 2019-06-16 14:33:49 +08:00
yunion-ci-robot
43bcced0d8 Merge pull request #1215 from ioito/automated-cherry-pick-of-#1196-upstream-release-2.8.0
Automated cherry pick of #1196: fix balance permission error
2019-06-15 21:39:52 +08:00
ioito
5b44d7029d fix balance permission error 2019-06-15 13:51:17 +08:00
yunion-ci-robot
3295748d39 Merge pull request #1209 from yousong/automated-cherry-pick-of-#1201-release-2.8.0
Automated cherry pick of #1201: cloudcommon: 移除非必要日志
2019-06-15 10:17:51 +08:00
Yousong Zhou
763f476a72 cloudcommon: 移除非必要日志 2019-06-14 13:41:44 +00:00
yunion-ci-robot
1e31160cf8 Merge pull request #1171 from yousong/automated-cherry-pick-of-#1168-release-2.8.0
Automated cherry pick of #1168: webconsole: 改正文件权限
2019-06-13 14:24:53 +08:00
Yousong Zhou
1344fe9812 webconsole: 改正文件权限
- 密钥不需要执行权限
 - 先改权限再写内容
2019-06-12 10:28:03 +00:00
yunion-ci-robot
dff8e9362b Merge pull request #1167 from ioito/automated-cherry-pick-of-#1164-upstream-release-2.8.0
Automated cherry pick of #1164: 添加vpc操作日志
2019-06-12 18:02:53 +08:00
ioito
22c602962f 添加vpc操作日志 2019-06-12 17:00:20 +08:00
yunion-ci-robot
a9872462b2 Merge pull request #1156 from ioito/automated-cherry-pick-of-#1120-upstream-release-2.8.0
Automated cherry pick of #1120: network创建或删除后刷新调度缓存
2019-06-12 15:26:52 +08:00
yunion-ci-robot
44892c8bec Merge pull request #1161 from wanyaoqi/automated-cherry-pick-of-#1158-upstream-release-2.8.0
Automated cherry pick of #1158: fix attach able storage
2019-06-12 14:43:53 +08:00
wanyaoqi
a4ff3ea2d0 fix attach able storage 2019-06-12 13:55:47 +08:00
ioito
1213809528 network创建或删除后刷新调度缓存 2019-06-12 11:53:18 +08:00
yunion-ci-robot
cc2af45e9e Merge pull request #1119 from ioito/automated-cherry-pick-of-#1116-upstream-release-2.8.0
Automated cherry pick of #1116: fix qcloud disk create name error
2019-06-12 09:04:52 +08:00
yunion-ci-robot
066aa9ec86 Merge pull request #1141 from yousong/automated-cherry-pick-of-#1130-release-2.8.0
Automated cherry pick of #1130: networks: merge与split时将lbnetwork考虑进去
2019-06-11 23:06:52 +08:00
yunion-ci-robot
cdf76b9f6a Merge pull request #1138 from wanyaoqi/automated-cherry-pick-of-#1135-upstream-release-2.8.0
Automated cherry pick of #1135: fix disk delete task base
2019-06-11 20:33:52 +08:00
Yousong Zhou
0176474cd6 networks: merge与split时将lbnetwork考虑进去
- 共用代码,并放到独立的文件中
 - 尽力更新,中途出错不中断,最后一起报出
2019-06-11 06:11:39 +00:00
wanyaoqi
665dd5b4a4 fix disk delete task base 2019-06-11 11:11:10 +08:00
Zexi Li
0a7496420f Merge pull request #1125 from Zexi/automated-cherry-pick-of-#1122-upstream-release-2.8.0
Automated cherry pick of #1122: scheduler: recover panic when stop timer
2019-06-10 17:18:36 +08:00
Zexi
23f549790b scheduler: recover panic when stop timer 2019-06-10 17:17:49 +08:00
ioito
aadee555e1 fix qcloud disk create name error 2019-06-10 16:05:16 +08:00
yunion-ci-robot
b0725e844c Merge pull request #1110 from wanyaoqi/automated-cherry-pick-of-#1099-upstream-release-2.8.0
Automated cherry pick of #1099: fix reserved memory
2019-06-09 23:00:51 +08:00
wanyaoqi
59856937b0 fix disk delete 2019-06-09 22:59:14 +08:00
wanyaoqi
41b1e4b909 fix reserved memory 2019-06-09 22:59:14 +08:00
yunion-ci-robot
52a9f58830 Merge pull request #1106 from Zexi/automated-cherry-pick-of-#1104-upstream-release-2.8.0
Automated cherry pick of #1104: fix: disk input erase storage_id by backend
2019-06-09 11:18:51 +08:00
Zexi
cacdbce9df fix: disk input erase storage_id by backend 2019-06-09 11:02:41 +08:00
yunion-ci-robot
c5716627f7 Merge pull request #1103 from wanyaoqi/automated-cherry-pick-of-#1100-upstream-release-2.8.0
Automated cherry pick of #1100: gpfs
2019-06-09 01:00:50 +08:00
wanyaoqi
517de40e02 gpfs 2019-06-06 23:30:53 +08:00
yunion-ci-robot
5b2dbff139 Merge pull request #1095 from ioito/automated-cherry-pick-of-#1092-upstream-release-2.8.0
Automated cherry pick of #1092: 修复参数赋值问题
2019-06-06 23:25:51 +08:00
ioito
39aea207d9 修复参数赋值问题 2019-06-06 18:14:26 +08:00
yunion-ci-robot
5cc34f8047 Merge pull request #1067 from yousong/automated-cherry-pick-of-#1063-upstream-release-2.8.0
Automated cherry pick of #1063: cloudproviders: 调整lb资源清理顺序
2019-06-05 10:01:49 +08:00
Yousong Zhou
3b44feddee cloudproviders: 调整lb资源清理顺序
lbbg可能被lblis引用,应先清理lblis,再清理lbbg
2019-06-04 17:06:58 +00:00
yunion-ci-robot
e693091ce3 Merge pull request #1030 from ioito/automated-cherry-pick-of-#1024-upstream-release-2.8.0
Automated cherry pick of #1024: 避免未使用最优storage
2019-06-03 18:21:58 +08:00
yunion-ci-robot
13ff2f2247 Merge pull request #1041 from wanyaoqi/automated-cherry-pick-of-#1038-upstream-release-2.8.0
Automated cherry pick of #1038: fix imported bm server start
2019-06-03 18:09:57 +08:00
wanyaoqi
d9ff038db6 fix imported bm server start 2019-06-03 15:29:34 +08:00
ioito
4baf096187 避免未使用最优storage 2019-06-03 10:07:34 +08:00
yunion-ci-robot
07fdd654cc Merge pull request #986 from swordqiu/automated-cherry-pick-of-#983-upstream-release-2.8.0
Automated cherry pick of #983: fix: esxi vm may fail on start or delete in batch
2019-05-31 13:52:19 +08:00
yunion-ci-robot
aacb83b97f Merge pull request #1011 from yunion-ci-robot/cherry-pick-1009-to-release/2.8.0
[release/2.8.0] fix on guest migrate fail
2019-05-31 13:18:20 +08:00
wanyaoqi
8ee225196a fix on guest migrate fail 2019-05-31 05:16:04 +00:00
yunion-ci-robot
191d857e0d Merge pull request #998 from yunion-ci-robot/cherry-pick-968-to-release/2.8.0
[release/2.8.0] 避免oUserData为nil时野指针访问
2019-05-30 17:49:22 +08:00
ioito
fd4fdbb1c4 避免oUserData为nil时野指针访问 2019-05-30 09:37:44 +00:00
yunion-ci-robot
5473c760e1 Merge pull request #996 from yunion-ci-robot/cherry-pick-993-to-release/2.8.0
[release/2.8.0] fix guest display metadata
2019-05-30 16:56:25 +08:00
wanyaoqi
11a5e235e1 fix guest display metadata 2019-05-30 08:49:11 +00:00
yunion-ci-robot
6d661dab16 Merge pull request #989 from yunion-ci-robot/cherry-pick-955-to-release/2.8.0
[release/2.8.0] 避免webconsole频繁连接server,导致IP被封禁
2019-05-30 15:17:18 +08:00
ioito
0b829f4307 避免频繁连接server 2019-05-30 07:04:24 +00:00
Qiu Jian
1e4a992163 fix: esxi vm may fail on start or delete in batch 2019-05-30 14:44:08 +08:00
yunion-ci-robot
6c19d666ac Merge pull request #979 from Zexi/automated-cherry-pick-of-#978-upstream-release-2.8.0
Automated cherry pick of #978: scheduler: add pending usage process
2019-05-29 20:39:20 +08:00
Zexi
d7b681522e scheduler: add pending usage process 2019-05-29 19:48:08 +08:00
yunion-ci-robot
edb5eea56d Merge pull request #966 from yunion-ci-robot/cherry-pick-956-to-release/2.8.0
[release/2.8.0] lb: 支持直接指定ip作为后端
2019-05-29 11:44:20 +08:00
Yousong Zhou
9da2e26e04 mcclient: options: use --loadbalancer for consistency
Fixes 2df78f
2019-05-29 01:52:03 +00:00
Yousong Zhou
dc9f0f32a1 loadbalancerbackends: 支持直接指定IP地址 2019-05-29 01:52:03 +00:00
yunion-ci-robot
82c609392c Merge pull request #954 from ioito/automated-cherry-pick-of-#943-upstream-release-2.8.0
Automated cherry pick of #943: 避免转换成shell格式后导致合并失败
2019-05-28 22:07:20 +08:00
ioito
dc68525efa 避免转换成shell格式后导致合并失败 2019-05-28 17:02:23 +08:00
yunion-ci-robot
14e5285131 Merge pull request #949 from Zexi/automated-cherry-pick-of-#29-upstream-release-2.8.0
Automated cherry pick of #29: feat: 支持为虚拟机或宿主机创建报警规则
2019-05-28 16:50:18 +08:00
yunion-ci-robot
e9002a27f9 Merge pull request #951 from wanyaoqi/automated-cherry-pick-of-#947-upstream-release-2.8.0
Automated cherry pick of #947: support add pid file
2019-05-28 16:13:19 +08:00
wanyaoqi
a717e8113c support add pid file 2019-05-28 16:03:41 +08:00
ningyu
7acd0b19f2 refactor: 修正RP提出的问题
- 创建报警规则时使用--xxx的方式,避免位置参数过多导致传递时记不住顺序
- 将nodealert-change-status拆分成2个命令:nodealert-enable, nodealert-disable
- 使用options.ListStructToParams和options.StructToParams方法来精减参数对象的构建
- 其它小问题,如:统一变量命名、纠正注释等
2019-05-28 15:56:19 +08:00
ningyu
57f5ffd3ea feat: 支持为虚拟机或宿主机创建报警规则
需要依赖的服务:meteralert2.8或以上版本
2019-05-28 15:56:19 +08:00
yunion-ci-robot
c8dcf080d5 Merge pull request #942 from yousong/bugfix/yousong-routetables-280
Cherrypick 933: routetables: 改正同步
2019-05-28 14:47:18 +08:00
yunion-ci-robot
056c89cfb6 Merge pull request #937 from yunion-ci-robot/cherry-pick-932-to-release/2.8.0
[release/2.8.0] 补充缺失的task stage
2019-05-28 13:31:19 +08:00
yunion-ci-robot
b377ba3712 Merge pull request #946 from wanyaoqi/automated-cherry-pick-of-#934-upstream-release-2.8.0
Automated cherry pick of #934: bugfix:
2019-05-28 12:14:18 +08:00
wanyaoqi
9ba2264d8c bugfix:
- fix import from libvirt
- fix server deploy
- fix guest migrate
- golang host bugfix
2019-05-28 12:08:17 +08:00
Yousong Zhou
35382351bd routetables: default to name rtbl-<vpc.name> 2019-05-27 13:22:18 +00:00
Yousong Zhou
0ff39b1cdc routetables: sync: add vpc-awareness 2019-05-27 13:21:17 +00:00
ioito
241eb619e1 补充缺失的task stage 2019-05-27 12:52:26 +00:00
yunion-ci-robot
fac76d231f Merge pull request #931 from ioito/automated-cherry-pick-of-#899-upstream-release-2.8.0
Automated cherry pick of #899: 删除账号时删除空的zone及region
2019-05-25 20:39:18 +08:00
yunion-ci-robot
1d08717ad4 Merge pull request #926 from ioito/automated-cherry-pick-of-#883-upstream-release-2.8.0
Automated cherry pick of #883: 避免同步出现重复eip记录
2019-05-25 20:37:19 +08:00
ioito
e9d1812ca1 删除账号时删除空的zone及region 2019-05-25 20:24:32 +08:00
ioito
fffd343266 避免同步出现重复eip记录 2019-05-25 17:56:06 +08:00
yunion-ci-robot
12942b2877 Merge pull request #924 from yunion-ci-robot/cherry-pick-921-to-release/2.8.0
[release/2.8.0] 校验aliyun eip带宽范围
2019-05-25 17:51:18 +08:00
ioito
edc4dbe580 校验aliyun eip带宽范围 2019-05-25 09:39:45 +00:00
yunion-ci-robot
ce71190faf Merge pull request #918 from ioito/automated-cherry-pick-of-#894-upstream-release-2.8.0
Automated cherry pick of #894: 避免keystone region中使用-导致region被截取
2019-05-25 11:04:17 +08:00
ioito
09f2d6a61e 避免keystone region中使用-导致region被截取 2019-05-25 09:57:29 +08:00
yunion-ci-robot
fc25fc30cb Merge pull request #914 from wanyaoqi/automated-cherry-pick-of-#900-upstream-release-2.8.0
Automated cherry pick of #900: misc fix:
2019-05-24 14:44:18 +08:00
wanyaoqi
41c4b8e890 misc fix:
- fix undeploy backup guest
- fix host service cron job
- task add recover
2019-05-24 13:29:33 +08:00
yunion-ci-robot
a0763b19a9 Merge pull request #904 from yunion-ci-robot/cherry-pick-890-to-release/2.8.0
[release/2.8.0] guests: 变更IP地址时尽量保留原网卡设定
2019-05-24 10:15:18 +08:00
yunion-ci-robot
dd26f69596 Merge pull request #906 from yunion-ci-robot/cherry-pick-896-to-release/2.8.0
[release/2.8.0] 修复多账号导致openstack region同步异常
2019-05-24 10:14:18 +08:00
ioito
27e38d7583 未设置正确的region prefix 2019-05-24 01:48:44 +00:00
Yousong Zhou
c75d2e1b0d guests: change-ipaddr: 尽量保留原网卡配置
网卡序号,带宽限定等

Reported-by: Wenlong Wang
2019-05-24 01:42:39 +00:00
yunion-ci-robot
474872edad Merge pull request #892 from wanyaoqi/automated-cherry-pick-of-#888-upstream-release-2.8.0
Automated cherry pick of #888: - set disk storage_id not required - can't do syncstatus on guest has active tasks in last one hour - fix guestdisk index set wrong number on guest attach disk
2019-05-23 17:16:17 +08:00
wanyaoqi
557f5a304f - set disk storage_id not required - can't do syncstatus on guest has active tasks in last one hour - fix guestdisk index set wrong number on guest attach disk 2019-05-23 11:15:03 +08:00
yunion-ci-robot
a6bd3d4b6a Merge pull request #885 from yousong/automated-cherry-pick-of-#880-release-2.8.0
Automated cherry pick of #880: mcclient: RouteOptions: 缩短命令行参数长度
2019-05-22 14:26:16 +08:00
Yousong Zhou
06c009be9d climc: 在打印路由条目时显示下一跳资源id 2019-05-22 04:00:55 +00:00
Yousong Zhou
740edba9d4 routetables: 厘清指针使用 2019-05-22 04:00:55 +00:00
Yousong Zhou
95f0b5ec73 mcclient: 使--vpc成为必选参数 2019-05-22 04:00:55 +00:00
Yousong Zhou
dbe898e643 mcclient: RouteOptions: 缩短命令行参数长度 2019-05-22 04:00:55 +00:00
yunion-ci-robot
a0fbdf96ab Merge pull request #877 from ioito/automated-cherry-pick-of-#875-upstream-release-2.8.0
Automated cherry pick of #875: openstack认证添加domain_name参数
2019-05-22 00:37:18 +08:00
ioito
a800d9e2d8 openstack认证添加domain_name参数 2019-05-21 17:31:13 +08:00
yunion-ci-robot
b5e2051d6a Merge pull request #874 from ioito/automated-cherry-pick-of-#860-upstream-release-2.8.0
Automated cherry pick of #860: 使用driver注入密码,复用代码
2019-05-21 14:03:21 +08:00
ioito
b67c5cd713 避免climc使用公有云镜像时未设置prefix region导致虚拟机创建失败 2019-05-21 13:32:57 +08:00
ioito
1de046f9eb 使用driver注入密码,复用代码 2019-05-21 13:32:57 +08:00
yunion-ci-robot
6201bfb4f9 Merge pull request #868 from ioito/automated-cherry-pick-of-#866-upstream-release-2.8.0
Automated cherry pick of #866: fix openstack region sync
2019-05-20 22:47:17 +08:00
ioito
75a3f00de9 fix openstack region sync 2019-05-20 22:18:48 +08:00
yunion-ci-robot
3af1dc4dbf Merge pull request #864 from ioito/automated-cherry-pick-of-#859-upstream-release-2.8.0
Automated cherry pick of #859: 不同类型的tag使用对应的参数进行过滤
2019-05-20 21:29:20 +08:00
ioito
4fbd8ce9ce 不同类型的tag使用对应的参数进行过滤 2019-05-20 21:19:40 +08:00
yunion-ci-robot
b1e000ae64 Merge pull request #857 from ioito/automated-cherry-pick-of-#855-upstream-release-2.8.0
Automated cherry pick of #855: 修复调用错误方法
2019-05-20 15:05:16 +08:00
ioito
7c84972c32 修复调用错误方法 2019-05-20 13:48:05 +08:00
yunion-ci-robot
a92791c30b Merge pull request #854 from ioito/automated-cherry-pick-of-#842-upstream-release-2.8.0
Automated cherry pick of #842: 删除虚拟机同时删除lb相关记录
2019-05-18 20:20:18 +08:00
ioito
4fd8a3df02 删除虚拟机同时删除lb相关记录 2019-05-18 20:15:42 +08:00
yunion-ci-robot
75b7a00183 Merge pull request #838 from ioito/automated-cherry-pick-of-#810-upstream-release-2.8.0
Automated cherry pick of #810: 限制添加同一个vpc底下的虚拟机
2019-05-16 17:36:36 +08:00
ioito
217d375f3c 避免关不掉访问控制 2019-05-16 16:47:06 +08:00
ioito
69085c7c63 显示acl名称 2019-05-16 16:47:06 +08:00
ioito
844ce98fba 限制添加同一个vpc底下的虚拟机 2019-05-16 16:47:06 +08:00
yunion-ci-robot
d3b6f6cdb7 Merge pull request #832 from ioito/automated-cherry-pick-of-#830-upstream-release-2.8.0
Automated cherry pick of #830: 修复删除账号错误
2019-05-16 12:38:34 +08:00
ioito
a667a5499c 修复删除账号错误 2019-05-16 12:23:36 +08:00
yunion-ci-robot
4fde087e9a Merge pull request #829 from yunion-ci-robot/cherry-pick-827-to-release/2.8.0
[release/2.8.0] bugfix: fix host setup network
2019-05-16 00:32:35 +08:00
wanyaoqi
937e0d58f8 fix host setup network 2019-05-15 16:30:06 +00:00
yunion-ci-robot
bfcab5b1f6 Merge pull request #826 from yunion-ci-robot/cherry-pick-822-to-release/2.8.0
[release/2.8.0] OpenStack: 增加同步数据准确性
2019-05-15 22:50:36 +08:00
ioito
0f2e322b57 增加同步数据准确性 2019-05-15 14:46:47 +00:00
yunion-ci-robot
dccaf02fea Merge pull request #824 from ioito/automated-cherry-pick-of-#812-upstream-release-2.8.0
Automated cherry pick of #812: 设置端口和权重后同步到公有云上
2019-05-15 22:44:37 +08:00
ioito
451d83511a 设置端口和权重后同步到公有云上 2019-05-15 22:33:31 +08:00
yunion-ci-robot
760f5073e1 Merge pull request #821 from yunion-ci-robot/cherry-pick-811-to-release/2.8.0
[release/2.8.0] bugfix: host cpuset bugfix
2019-05-15 17:09:37 +08:00
wanyaoqi
dcd46d77ec guest fix set oom_adj 2019-05-15 08:56:07 +00:00
wanyaoqi
5142a04806 host cpuset bugfix 2019-05-15 08:56:07 +00:00
yunion-ci-robot
083600ebc7 Merge pull request #818 from yunion-ci-robot/cherry-pick-809-to-release/2.8.0
[release/2.8.0] bugfix: disable clean iptables && fix mac equal
2019-05-15 16:49:36 +08:00
wanyaoqi
17adf2a067 disable clean iptables && fix mac equal 2019-05-15 08:37:21 +00:00
yunion-ci-robot
90b0def56f Merge pull request #816 from yunion-ci-robot/cherry-pick-813-to-release/2.8.0
[release/2.8.0] 避免使用错误方法损坏id
2019-05-15 15:00:35 +08:00
ioito
f7d266f6a3 避免使用错误方法损坏id 2019-05-15 06:58:45 +00:00
yunion-ci-robot
f21b491155 Merge pull request #803 from yunion-ci-robot/cherry-pick-802-to-release/2.8.0
[release/2.8.0] feature: disable cron jobs on slave node
2019-05-13 21:21:40 +08:00
wanyaoqi
cda14a67d2 disable cron jobs on slave node 2019-05-13 13:10:57 +00:00
yunion-ci-robot
2b3f6657bd Merge pull request #801 from yunion-ci-robot/cherry-pick-784-to-release/2.8.0
[release/2.8.0] 避免创建时使用不同公有云的镜像
2019-05-13 19:19:36 +08:00
ioito
89d4feb5a4 避免创建时使用不同公有云的镜像 2019-05-13 11:18:12 +00:00
yunion-ci-robot
a30ddddb76 Merge pull request #798 from yunion-ci-robot/cherry-pick-797-to-release/2.8.0
[release/2.8.0] fix: scheduler not init app db
2019-05-13 19:15:35 +08:00
yunion-ci-robot
b85f131d4a Merge pull request #793 from yunion-ci-robot/cherry-pick-790-to-release/2.8.0
[release/2.8.0] bugfix : fix start script no pid file
2019-05-13 19:14:34 +08:00
Zexi
9c813cc0fb fix: scheduler not init app db 2019-05-13 11:14:07 +00:00
yunion-ci-robot
5aebe01403 Merge pull request #796 from Zexi/automated-cherry-pick-of-#785-upstream-release-2.8.0
Automated cherry pick of #785: fix: add host convert same disk spec check
2019-05-13 18:34:36 +08:00
Zexi
317e62bca7 fix: add host convert same disk spec check 2019-05-13 18:30:28 +08:00
yunion-ci-robot
3f60f283a1 Merge pull request #795 from yunion-ci-robot/cherry-pick-791-to-release/2.8.0
[release/2.8.0] 避免任务完成后依然返回timeout错误
2019-05-13 17:07:33 +08:00
ioito
2749df9564 避免任务完成后依然返回timeout错误 2019-05-13 08:53:09 +00:00
wanyaoqi
b71935f626 fix no pid file 2019-05-13 08:52:04 +00:00
yunion-ci-robot
95c4c18617 Merge pull request #788 from yunion-ci-robot/cherry-pick-786-to-release/2.8.0
[release/2.8.0] bugfix: fix guest delele backup log event
2019-05-13 11:27:35 +08:00
wanyaoqi
e41fdaa8cf fix guest delele backup log event 2019-05-13 03:18:12 +00:00
yunion-ci-robot
eb77f2624c Merge pull request #781 from yunion-ci-robot/cherry-pick-778-to-release/2.8.0
[release/2.8.0] 允许普通用户set manager_id
2019-05-11 17:33:34 +08:00
yunion-ci-robot
7833c85c3e Merge pull request #779 from yunion-ci-robot/cherry-pick-769-to-release/2.8.0
[release/2.8.0] 负载均衡日志补全
2019-05-11 17:28:33 +08:00
ioito
800b64f700 允许普通用户set manager_id 2019-05-11 09:26:45 +00:00
ioito
3a72ea013c 负载均衡日志补全 2019-05-11 09:23:50 +00:00
yunion-ci-robot
c1b4d88682 Merge pull request #777 from yunion-ci-robot/cherry-pick-759-to-release/2.8.0
[release/2.8.0] Aliyun: 避免cache image失败
2019-05-11 17:12:35 +08:00
ioito
c07fdfd572 避免cache image失败 2019-05-11 09:02:16 +00:00
yunion-ci-robot
8f368e0c76 Merge pull request #775 from yunion-ci-robot/cherry-pick-770-to-release/2.8.0
[release/2.8.0] bugfix:  fix host deploy windows password, user can get backup host id
2019-05-10 21:12:34 +08:00
wanyaoqi
9f83b4bc2f qemu prevent oom 2019-05-10 12:55:16 +00:00
wanyaoqi
8de218e5a8 fix host deploy windows password 2019-05-10 12:55:15 +00:00
wanyaoqi
552db484ed user can get backup host id 2019-05-10 12:55:14 +00:00
yunion-ci-robot
cfea0b6539 Merge pull request #773 from wanyaoqi/bugfix/wyq/backport-fix
Bugfix: backport fix
2019-05-10 20:53:35 +08:00
wanyaoqi
f5123e26a4 backup port fix libvirt import 2019-05-10 20:49:18 +08:00
yunion-ci-robot
9a5ffdd0ad Merge pull request #771 from ioito/automated-cherry-pick-of-#767-upstream-release-2.8.0
Automated cherry pick of #767: 移除多余的方法
2019-05-10 12:10:34 +08:00
ioito
a51b105266 移除多余的方法 2019-05-10 11:17:45 +08:00
yunion-ci-robot
5777f88cb1 Merge pull request #766 from yunion-ci-robot/cherry-pick-747-to-release/2.8.0
[release/2.8.0] sku provider filter by zone
2019-05-09 18:20:34 +08:00
yunion-ci-robot
694bbce542 Merge pull request #764 from yunion-ci-robot/cherry-pick-762-to-release/2.8.0
[release/2.8.0] 避免显示脏的image信息
2019-05-09 18:19:34 +08:00
TangBin
6d0971a7a2 sku providerFilter add more comment 2019-05-09 09:53:28 +00:00
TangBin
cb43ab057a sku provider filter by region 2019-05-09 09:53:28 +00:00
TangBin
608395be5a sku provider filter by zone 2019-05-09 09:53:28 +00:00
ioito
984144b6e7 避免显示脏的image信息 2019-05-09 09:52:01 +00:00
yunion-ci-robot
d75e3dea47 Merge pull request #761 from wanyaoqi/automated-cherry-pick-of-#758-upstream-release-2.8.0
Automated cherry pick of #758: fix go vet report bugs
2019-05-09 15:13:34 +08:00
wanyaoqi
e5206f0a2e Readme add go reporter 2019-05-09 15:08:25 +08:00
wanyaoqi
acacce2748 fix go vet report bugs 2019-05-09 15:07:46 +08:00
yunion-ci-robot
ca7beee2f3 Merge pull request #757 from yunion-ci-robot/cherry-pick-754-to-release/2.8.0
[release/2.8.0] bugfix :fix get storage by access path
2019-05-08 18:24:33 +08:00
wanyaoqi
2687527c68 fix get storage by access path 2019-05-08 10:23:39 +00:00
yunion-ci-robot
911d553d9b Merge pull request #753 from yunion-ci-robot/cherry-pick-749-to-release/2.8.0
[release/2.8.0] fix: admaster bug, disk-purge nil pointer error
2019-05-08 13:29:34 +08:00
Qiu Jian
0b08d3e7a8 fix: admaster bug, disk-purge nil pointer error 2019-05-08 05:28:03 +00:00
yunion-ci-robot
4707c2c563 Merge pull request #751 from yunion-ci-robot/cherry-pick-748-to-release/2.8.0
[release/2.8.0] bugfix: fix sync status on stoping
2019-05-08 13:12:32 +08:00
wanyaoqi
3276bd4f98 fix sync status on stoping 2019-05-08 04:54:11 +00:00
yunion-ci-robot
22d531f483 Merge pull request #744 from yunion-ci-robot/cherry-pick-726-to-release/2.8.0
[release/2.8.0] set host is import && fix notify template
2019-05-07 13:07:16 +08:00
yunion-ci-robot
83cdc9d74b Merge pull request #742 from yunion-ci-robot/cherry-pick-725-to-release/2.8.0
[release/2.8.0] bugfix: fix host image service, disable https
2019-05-07 13:06:14 +08:00
wanyaoqi
3482d5e3a7 set host is import && fix notify template 2019-05-07 04:33:00 +00:00
wanyaoqi
5588431454 fix host image service, disable https 2019-05-07 04:31:50 +00:00
yunion-ci-robot
a51f9f949c Merge pull request #739 from yunion-ci-robot/cherry-pick-731-to-release/2.8.0
[release/2.8.0] remove gpu passthrough params addr
2019-05-07 12:31:17 +08:00
yunion-ci-robot
829001d7bd Merge pull request #737 from yunion-ci-robot/cherry-pick-736-to-release/2.8.0
[release/2.8.0] fix: resource set schedtags
2019-05-07 12:18:15 +08:00
wanyaoqi
270c58e38e remove gpu passthrough params addr 2019-05-07 04:17:32 +00:00
Zexi
90b55e576c fix: resource set schedtags 2019-05-07 04:16:29 +00:00
yunion-ci-robot
f886e90c98 Merge pull request #733 from yunion-ci-robot/cherry-pick-732-to-release/2.8.0
[release/2.8.0] update host batch register
2019-05-07 11:33:15 +08:00
TangBin
e4c989cbb3 update host batch register 2019-05-07 03:30:11 +00:00
yunion-ci-robot
e232a32a06 Merge pull request #721 from Zexi/automated-cherry-pick-of-#716-upstream-release-2.8.0
Automated cherry pick of #716: fix baremetal disk config auto extend not work and ipmi_info not record
2019-05-05 20:52:15 +08:00
Zexi
8c61d303de fix baremetal disk config auto extend not work and ipmi_info not record 2019-05-05 20:14:43 +08:00
yunion-ci-robot
98971416d0 Merge pull request #718 from yunion-ci-robot/cherry-pick-711-to-release/2.8.0
[release/2.8.0] bugfix:  fix delete backup status
2019-05-05 19:54:15 +08:00
wanyaoqi
3a6ef8db09 fix backup status 2019-05-05 11:06:45 +00:00
yunion-ci-robot
da54beb6a9 Merge pull request #715 from yunion-ci-robot/cherry-pick-710-to-release/2.8.0
[release/2.8.0] 设置镜像hw_qemu_guest_agent属性
2019-05-05 16:52:15 +08:00
yunion-ci-robot
461cdefe96 Merge pull request #712 from yunion-ci-robot/cherry-pick-699-to-release/2.8.0
[release/2.8.0] bugfix: fix baremetal online prepare!
2019-05-05 16:51:15 +08:00
ioito
4dbf714d63 设置镜像hw_qemu_guest_agent属性 2019-05-05 08:36:46 +00:00
wanyaoqi
d5424e1372 fix baremetal online prepare! 2019-05-05 04:35:31 +00:00
yunion-ci-robot
fdb41edf39 Merge pull request #708 from yunion-ci-robot/cherry-pick-456-to-release/2.8.0
[release/2.8.0] 添加阿里云lb监听参数校验
2019-05-05 11:28:13 +08:00
ioito
8f78362f86 添加阿里云lb监听参数校验 2019-05-05 03:18:43 +00:00
yunion-ci-robot
48c1ee2f0d Merge pull request #705 from yunion-ci-robot/cherry-pick-690-to-release/2.8.0
[release/2.8.0] fix: 1. ignore yunioncloud temp VMs when syncing 2. start esxi VM on same host with lock
2019-05-02 12:05:14 +08:00
Qiu Jian
7e3aaedec0 fix: 1. ignore yunioncloud temp VMs when syncing 2. start esxi VM on same host with lock 2019-05-02 04:03:24 +00:00
yunion-ci-robot
70742ed01c Merge pull request #704 from yunion-ci-robot/cherry-pick-700-to-release/2.8.0
[release/2.8.0] feature: golang host support linux bridge
2019-05-02 10:42:13 +08:00
wanyaoqi
d5145a8cc3 golang host support linux bridge 2019-05-02 02:37:28 +00:00
yunion-ci-robot
a77c1a6950 Merge pull request #702 from yunion-ci-robot/cherry-pick-671-to-release/2.8.0
[release/2.8.0] 修复腾讯云本地和云上out方向规则为空语义不一致问题
2019-05-01 12:02:15 +08:00
ioito
ecad57c8fe 修复腾讯云本地和云上out方向规则为空语义不一致问题 2019-05-01 03:52:46 +00:00
yunion-ci-robot
72263a207c Merge pull request #697 from yunion-ci-robot/cherry-pick-696-to-release/2.8.0
[release/2.8.0] fix: deploy_configs was removed when invoke SetCreateParams
2019-04-30 16:42:13 +08:00
Zexi
409b702acc fix: deploy_configs was removed when invoke SetCreateParams 2019-04-30 08:25:55 +00:00
yunion-ci-robot
03e2113f68 Merge pull request #694 from yunion-ci-robot/cherry-pick-693-to-release/2.8.0
[release/2.8.0] fix: isolated_device dev_type field not set
2019-04-30 14:33:15 +08:00
Zexi
e67e4c5b85 fix: isolated_device dev_type field not set 2019-04-30 06:30:27 +00:00
yunion-ci-robot
904b371a0b Merge pull request #691 from yunion-ci-robot/cherry-pick-689-to-release/2.8.0
[release/2.8.0] netio&diskio fix
2019-04-30 14:28:13 +08:00
TangBin
4122d5b245 rename addNetio variable name 2019-04-30 02:43:16 +00:00
TangBin
f7c2f06204 netio&diskio fix 2019-04-30 02:43:16 +00:00
yunion-ci-robot
884c7ec2de Merge pull request #688 from swordqiu/automated-cherry-pick-of-#609-upstream-release-2.8.0
Automated cherry pick of #609: fix: 1. network interface for prepaid-recycle VM incorrect 2. aliyun not support import image of RHEL
2019-04-29 17:24:12 +08:00
Qiu Jian
8b36357ed1 update vendor 2019-04-29 14:58:19 +08:00
Qiu Jian
4a5e904623 fix: 1. network interface for prepaid-recycle VM incorrect 2. aliyun not support import image of RHEL 2019-04-29 14:56:51 +08:00
yunion-ci-robot
383bd7f2db Merge pull request #683 from yunion-ci-robot/cherry-pick-679-to-release/2.8.0
[release/2.8.0] bugfix: host register add version record, fix getBmAgentUrl
2019-04-29 14:30:12 +08:00
yunion-ci-robot
3932ffffa2 Merge pull request #686 from yunion-ci-robot/cherry-pick-659-to-release/2.8.0
[release/2.8.0] fix: keep order of network interface for baremetal
2019-04-29 14:27:16 +08:00
Qiu Jian
bea3a87db6 fix: keep order of network interface for baremetal 2019-04-29 06:25:07 +00:00
yunion-ci-robot
fdb597bd2b Merge pull request #681 from yunion-ci-robot/cherry-pick-678-to-release/2.8.0
[release/2.8.0] fix: host convert params to ServerCreateInput
2019-04-29 14:21:13 +08:00
wanyaoqi
06e8906519 host register add version record, fix getBmAgentUrl 2019-04-29 05:38:44 +00:00
Zexi
fde23bbe53 fix: host convert params to ServerCreateInput 2019-04-29 05:36:49 +00:00
yunion-ci-robot
912ac0e5f7 Merge pull request #677 from yunion-ci-robot/cherry-pick-675-to-release/2.8.0
[release/2.8.0] scheduler forecast select_candidate not add count
2019-04-28 21:58:13 +08:00
yunion-ci-robot
649f2d6587 Merge pull request #674 from yunion-ci-robot/cherry-pick-672-to-release/2.8.0
[release/2.8.0] 统一使用const,避免city命名不一致
2019-04-28 21:56:12 +08:00
Zexi
25f6b86396 fix: scheduler forecast select_candidate not add count 2019-04-28 13:55:51 +00:00
ioito
5a87cbfe7f 统一使用const,避免city命名不一致 2019-04-28 07:49:20 +00:00
yunion-ci-robot
2892080fbc Merge pull request #668 from yunion-ci-robot/cherry-pick-665-to-release/2.8.0
[release/2.8.0] 修复未返回templateId
2019-04-27 21:31:16 +08:00
ioito
cd535cfc5f 修复未返回templateId 2019-04-27 13:25:26 +00:00
yunion-ci-robot
519596239c Merge pull request #662 from yunion-ci-robot/cherry-pick-660-to-release/2.8.0
[release/2.8.0] 避免nil指针访问
2019-04-27 17:25:12 +08:00
ioito
487097af5f 避免nil指针访问 2019-04-27 09:21:44 +00:00
yunion-ci-robot
f2dba069c7 Merge pull request #656 from yunion-ci-robot/cherry-pick-600-to-release/2.8.0
[release/2.8.0] OpenStack加入重装系统参数校验
2019-04-26 22:24:20 +08:00
yunion-ci-robot
71624bb31d Merge pull request #654 from yunion-ci-robot/cherry-pick-646-to-release/2.8.0
[release/2.8.0] fix: do not directly manage ESXi host that is managed by vcenter
2019-04-26 21:44:13 +08:00
ioito
a441ec5d44 加入重装系统参数校验 2019-04-26 13:42:44 +00:00
Qiu Jian
e1db1d2df7 fix: do not directly manage ESXi host that is managed by vcenter 2019-04-26 13:19:57 +00:00
yunion-ci-robot
9e831f0144 Merge pull request #650 from yunion-ci-robot/cherry-pick-648-to-release/2.8.0
[release/2.8.0] fix: use db.FetchModelObjects to batch Query objects
2019-04-26 21:08:13 +08:00
Qiu Jian
51de0f311d fix: use db.FetchModelObjects to batch Query objects 2019-04-26 07:46:47 +00:00
yunion-ci-robot
49c84f9332 Merge pull request #644 from Zexi/automated-cherry-pick-of-#611-upstream-release-2.8.0
Automated cherry pick of #611: baremetal schedule net bonding check
2019-04-26 02:09:14 +08:00
yunion-ci-robot
b1a87c0d13 Merge pull request #643 from yunion-ci-robot/cherry-pick-634-to-release/2.8.0
[release/2.8.0] 手动同步的也更新last_auto_sync时间
2019-04-26 02:08:13 +08:00
yunion-ci-robot
0f320e3b14 Merge pull request #638 from yunion-ci-robot/cherry-pick-628-to-release/2.8.0
[release/2.8.0] Azure: 修复因系统盘大小导致重装系统失败
2019-04-26 02:06:11 +08:00
Zexi
e123f57a5e baremetal schedule net bonding check 2019-04-26 02:02:41 +08:00
ioito
d4768e57f6 手动同步的也更新last_auto_sync时间 2019-04-25 16:42:57 +00:00
ioito
a4159de9ae Azure: 修复因系统盘大小导致重装系统失败 2019-04-25 16:41:28 +00:00
yunion-ci-robot
4381069012 Merge pull request #636 from yunion-ci-robot/cherry-pick-633-to-release/2.8.0
[release/2.8.0] 避免返回不是id not found,导致network一直删除失败
2019-04-26 00:41:14 +08:00
ioito
ac779027da 避免返回不是id not found,导致network一直删除失败 2019-04-25 16:39:48 +00:00
yunion-ci-robot
f10467abaf Merge pull request #630 from yunion-ci-robot/cherry-pick-624-to-release/2.8.0
[release/2.8.0] cloud-init users支持加上default
2019-04-25 21:49:12 +08:00
ioito
3f9184dc19 cloud-init users支持加上default 2019-04-25 13:29:53 +00:00
yunion-ci-robot
2117d788b8 Merge pull request #626 from yunion-ci-robot/cherry-pick-610-to-release/2.8.0
[release/2.8.0] 避免同步时删除vpc失败,导致不同步vpc底下资源
2019-04-25 21:04:18 +08:00
ioito
65612585d2 避免同步时删除vpc失败,导致不同步vpc底下资源 2019-04-25 12:52:01 +00:00
yunion-ci-robot
e057610a5a Merge pull request #618 from yunion-ci-robot/cherry-pick-613-to-release/2.8.0
[release/2.8.0] Azure: 修复虚拟机时未设置keypair路径
2019-04-25 19:00:14 +08:00
ioito
443406099d Azure: 修复虚拟机时未设置keypair路径 2019-04-25 10:49:48 +00:00
yunion-ci-robot
c9d67e8c94 Merge pull request #616 from yunion-ci-robot/cherry-pick-608-to-release/2.8.0
[release/2.8.0] huawei import keypair & rebuild root & skus filter fix
2019-04-25 18:49:15 +08:00
TangBin
2a3cbbc1fa huawei import keypair & rebuild root & skus filter fix 2019-04-25 10:41:45 +00:00
yunion-ci-robot
5630c660ff Merge pull request #606 from Zexi/automated-cherry-pick-of-#605-upstream-release-2.8.0
Automated cherry pick of #605: fix: baremetal server deploy auto restart not work
2019-04-25 11:09:11 +08:00
Zexi
8bdc2a6efc fix: baremetal server deploy auto restart not work 2019-04-25 10:54:46 +08:00
yunion-ci-robot
c60c8b7cc8 Merge pull request #602 from yunion-ci-robot/cherry-pick-586-to-release/2.8.0
[release/2.8.0] 支持批量添加标签api
2019-04-24 23:01:13 +08:00
ioito
e5038f2f24 支持批量添加标签api 2019-04-24 14:58:57 +00:00
yunion-ci-robot
52d0dbd9ee Merge pull request #598 from yunion-ci-robot/cherry-pick-577-to-release/2.8.0
[release/2.8.0] Azure重装系统支持初始化密码
2019-04-24 22:25:14 +08:00
yunion-ci-robot
a6dafe0db6 Merge pull request #599 from wanyaoqi/automated-cherry-pick-of-#585-upstream-release-2.8.0
Automated cherry pick of #585: import from libvirt link disk, do not move
2019-04-24 22:23:15 +08:00
wanyaoqi
42160dec5d import from libvirt link disk, do not move 2019-04-24 22:15:46 +08:00
ioito
e8eec6cf40 修复typo错误 2019-04-24 14:13:58 +00:00
ioito
358bd695b2 重装系统支持初始化密码 2019-04-24 14:13:58 +00:00
yunion-ci-robot
597b4720fd Merge pull request #592 from Zexi/automated-cherry-pick-of-#591-upstream-release-2.8.0
Automated cherry pick of #591: fix: prepaid recycle host not check storage types
2019-04-24 20:58:13 +08:00
yunion-ci-robot
29f2d5b7d0 Merge pull request #594 from swordqiu/automated-cherry-pick-of-#406-upstream-release-2.8.0
Automated cherry pick of #406: Feature: host support centos 6
2019-04-24 19:56:11 +08:00
Qiu Jian
39f9b1f1a9 abondon code change to pkg/hostman/storageman/imagecachemanager_local.go 2019-04-24 19:50:53 +08:00
Qiu Jian
6f5d02c727 Feature: host support centos 6 2019-04-24 19:49:42 +08:00
Zexi
e68b8e5f58 fix: prepaid recycle host not check storage types 2019-04-24 19:38:26 +08:00
yunion-ci-robot
44e2c1de21 Merge pull request #590 from yunion-ci-robot/cherry-pick-587-to-release/2.8.0
[release/2.8.0] fix: validate baremetal raid config
2019-04-24 18:44:12 +08:00
Zexi
1b015c6a46 fix: validate baremetal raid config 2019-04-24 10:41:46 +00:00
yunion-ci-robot
9f60a96013 Merge pull request #583 from yunion-ci-robot/cherry-pick-581-to-release/2.8.0
[release/2.8.0] fix: baremetal server create params not override disks
2019-04-24 12:19:13 +08:00
Zexi
9df7b8b4ff fix: baremetal server create params not override disks 2019-04-24 04:13:40 +00:00
yunion-ci-robot
7cd0ad4b46 Merge pull request #579 from yunion-ci-robot/cherry-pick-578-to-release/2.8.0
[release/2.8.0] 新增编译:host baremetal-agent 两个 rpm
2019-04-24 10:11:11 +08:00
Zhang Dongliang
0fdc35df66 新增编译:host baremetal-agent 两个 rpm 2019-04-24 02:08:45 +00:00
yunion-ci-robot
321be13a75 Merge pull request #576 from yunion-ci-robot/cherry-pick-558-to-release/2.8.0
[release/2.8.0] fix: convert billingcycle to aliyun renew period error
2019-04-23 17:34:12 +08:00
Qiu Jian
6a3296160b fix: convert billingcycle to aliyun renew period error 2019-04-23 09:31:42 +00:00
yunion-ci-robot
186c12e1cc Merge pull request #571 from yunion-ci-robot/cherry-pick-557-to-release/2.8.0
[release/2.8.0] feature: server migrate add auto start
2019-04-23 17:28:12 +08:00
yunion-ci-robot
20c0207c16 Merge pull request #573 from yunion-ci-robot/cherry-pick-549-to-release/2.8.0
[release/2.8.0] Bugfix/ningyu meteralert project support
2019-04-23 17:27:11 +08:00
yunion-ci-robot
5bfc004689 Merge pull request #570 from ioito/automated-cherry-pick-of-#535-upstream-release-2.8.0
Automated cherry pick of #535: 同步公有云资源创建时间
2019-04-23 17:12:15 +08:00
ningyu
4515e41204 fix: 余额/消费报警引入了项目归属的概念,在创建、列出规则时都需要指定是哪个项目 2019-04-23 09:01:48 +00:00
yunion-ci-robot
98853e18f4 Merge pull request #566 from wanyaoqi/automated-cherry-pick-of-#530-upstream-release-2.8.0
Automated cherry pick of #530: fix guest resume on migrate failed, fix snapshot action log
2019-04-23 16:59:11 +08:00
yunion-ci-robot
c5363ba902 Merge pull request #567 from yunion-ci-robot/cherry-pick-477-to-release/2.8.0
[release/2.8.0] aws rebuild root ignore password/key
2019-04-23 16:57:12 +08:00
wanyaoqi
24e91ca0d9 server migrate add auto start 2019-04-23 08:49:42 +00:00
ioito
dcfd2e950d 同步公有云资源创建时间 2019-04-23 16:49:26 +08:00
tangbin
e8382fea55 string format bugfix 2019-04-23 08:43:27 +00:00
TangBin
622c97f4b4 aws rebuild root ignore password/key 2019-04-23 08:43:27 +00:00
wanyaoqi
6ca97ef540 fix guest resume on migrate failed, fix snapshot action log 2019-04-23 16:43:07 +08:00
yunion-ci-robot
8f882b50fc Merge pull request #561 from yunion-ci-robot/cherry-pick-536-to-release/2.8.0
[release/2.8.0] bugfix: fix aliyun snapshot delete failed, delete linked images first
2019-04-23 16:36:11 +08:00
yunion-ci-robot
2b63fbc873 Merge pull request #559 from yunion-ci-robot/cherry-pick-537-to-release/2.8.0
[release/2.8.0] ip子网支持city过滤
2019-04-23 16:35:11 +08:00
wanyaoqi
b4f036f801 fix aliyun snapshot delete failed, delete linked images first 2019-04-23 08:30:28 +00:00
ioito
b5a79c7581 ip子网支持city过滤 2019-04-23 08:25:22 +00:00
yunion-ci-robot
2aabaf4129 Merge pull request #552 from yunion-ci-robot/cherry-pick-550-to-release/2.8.0
[release/2.8.0] 修复azure拼写错误
2019-04-23 15:29:12 +08:00
yunion-ci-robot
2f6009d1d2 Merge pull request #556 from yunion-ci-robot/cherry-pick-538-to-release/2.8.0
[release/2.8.0] bugfix: fix query networks not set model manager
2019-04-23 14:13:12 +08:00
wanyaoqi
cbf1f63c14 fix query networks not set model manager 2019-04-23 06:11:02 +00:00
ioito
170be67314 修复azure拼写错误 2019-04-23 05:54:49 +00:00
yunion-ci-robot
49602bd398 Merge pull request #544 from yunion-ci-robot/cherry-pick-539-to-release/2.8.0
[release/2.8.0] loadbalancernetwork: 支持lbnetwork-list --details
2019-04-22 23:34:14 +08:00
yunion-ci-robot
dc31e0b4cf Merge pull request #547 from yunion-ci-robot/cherry-pick-540-to-release/2.8.0
[release/2.8.0] fix: domain-config-update rpc method panic
2019-04-22 23:32:13 +08:00
Zexi
3ecf14af2f fix: domain-config-update rpc method panic 2019-04-22 15:03:52 +00:00
Yousong Zhou
da2ddb3b95 loadbalancernetwork: 支持lbnetwork-list --details 2019-04-22 15:02:55 +00:00
yunion-ci-robot
0d6bc4fae6 Merge pull request #533 from yunion-ci-robot/cherry-pick-531-to-release/2.8.0
[release/2.8.0] 避免qcloud password和keypair冲突
2019-04-22 15:12:11 +08:00
ioito
44c942a1c0 避免qcloud password和keypair冲突 2019-04-22 06:52:48 +00:00
yunion-ci-robot
c6ef26b814 Merge pull request #529 from yunion-ci-robot/cherry-pick-475-to-release/2.8.0
[release/2.8.0] guest start monitor on sync status
2019-04-22 10:54:11 +08:00
wanyaoqi
5445a1c14b guest start monitor on sync status 2019-04-22 02:46:26 +00:00
yunion-ci-robot
d73312fce8 Merge pull request #528 from yunion-ci-robot/cherry-pick-526-to-release/2.8.0
[release/2.8.0] fix: automatically purge removed servers on public cloud
2019-04-22 10:43:11 +08:00
Qiu Jian
dffde5187e fix: automatically purge removed servers on public cloud 2019-04-22 02:33:24 +00:00
yunion-ci-robot
d15ad9836a Merge pull request #527 from yunion-ci-robot/cherry-pick-524-to-release/2.8.0
[release/2.8.0] fix: delete servers that has been removed results in delete_failed status
2019-04-22 10:15:11 +08:00
Qiu Jian
ce41a55f1a fix: delete servers that has been removed results in delete_failed status 2019-04-22 01:56:27 +00:00
yunion-ci-robot
edb2b480d7 Merge pull request #523 from yunion-ci-robot/cherry-pick-522-to-release/2.8.0
[release/2.8.0] 修复OpenStack更改配置失败问题
2019-04-20 22:44:11 +08:00
ioito
4790b40602 避免与INSTANCE_STATUS_VERIFY_RESIZE与INSTANCE_STATUS_RESIZE状一样,导致状态未到INSTANCE_STATUS_VERIFY_RESIZE时发送确认请求 2019-04-20 13:38:24 +00:00
yunion-ci-robot
38b37b3f19 Merge pull request #521 from yunion-ci-robot/cherry-pick-520-to-release/2.8.0
[release/2.8.0] 修正openstack状态
2019-04-20 20:00:12 +08:00
ioito
1105c2381a 修正openstack状态 2019-04-20 11:54:30 +00:00
yunion-ci-robot
4201b4d536 Merge pull request #519 from yunion-ci-robot/cherry-pick-518-to-release/2.8.0
[release/2.8.0] fix: cloud-account sync ignore db failure
2019-04-20 18:58:11 +08:00
Qiu Jian
da83c1a652 fix: cloud-account sync ignore db failure 2019-04-20 10:52:25 +00:00
yunion-ci-robot
7b6837045e Merge pull request #517 from yunion-ci-robot/cherry-pick-516-to-release/2.8.0
[release/2.8.0] fix: esxi server skus return empty results
2019-04-20 18:07:11 +08:00
Qiu Jian
6b732d87de fix: esxi server skus return empty results 2019-04-20 10:05:23 +00:00
yunion-ci-robot
5e128d0f8a Merge pull request #515 from yunion-ci-robot/cherry-pick-514-to-release/2.8.0
[release/2.8.0] fix: cloud account/provider missing event logs for delete/enable/disable/change_project
2019-04-20 17:18:11 +08:00
Qiu Jian
45f219008b fix: cloud account/provider missing event logs for delete/enable/disable/change_project 2019-04-20 09:16:24 +00:00
yunion-ci-robot
c6524750ba Merge pull request #513 from yunion-ci-robot/cherry-pick-503-to-release/2.8.0
[release/2.8.0] fix instance spec list query cache error
2019-04-20 17:10:12 +08:00
TangBin
f371a540fb optimaze QueryRelatedRegionIds 2019-04-20 09:07:27 +00:00
TangBin
2a0aa1e426 fix skus & zone-list & cloud-region-list query with params manager&account 2019-04-20 09:07:27 +00:00
TangBin
65cee8b1a4 修复实例规格列表缓存key错误&修复cloudregion manager过滤查询错误 2019-04-20 09:07:27 +00:00
yunion-ci-robot
9bc43c9a77 Merge pull request #512 from yunion-ci-robot/cherry-pick-509-to-release/2.8.0
[release/2.8.0] fix: create server with iso failed
2019-04-20 16:16:11 +08:00
yunion-ci-robot
a29d3836a2 Merge pull request #511 from yunion-ci-robot/cherry-pick-510-to-release/2.8.0
[release/2.8.0] feature: new host spec
2019-04-20 16:15:11 +08:00
Qiu Jian
3d0e63bba4 fix: create server with iso failed 2019-04-20 08:12:31 +00:00
Zexi
22980387c3 feature: new host spec 2019-04-20 08:10:32 +00:00
yunion-ci-robot
cb67571b06 Merge pull request #508 from yunion-ci-robot/cherry-pick-507-to-release/2.8.0
[release/2.8.0] fix: server-create-params network boding config
2019-04-20 15:17:14 +08:00
Zexi
5a6cc00bbc fix: server-create-params network boding config 2019-04-20 06:59:30 +00:00
yunion-ci-robot
a46f579da9 Merge pull request #506 from yunion-ci-robot/cherry-pick-505-to-release/2.8.0
[release/2.8.0] allow list hosts by hypervisor
2019-04-20 12:49:12 +08:00
Qiu Jian
fe453d2121 allow list hosts by hypervisor 2019-04-20 04:48:28 +00:00
yunion-ci-robot
6a5c3ba7e8 Merge pull request #504 from Zexi/hotfix/create-backup-server-panic
fix: create backup server panic
2019-04-20 12:06:10 +08:00
Zexi
4cc0e38d15 fix: create backup server panic 2019-04-20 11:58:01 +08:00
yunion-ci-robot
a3d0ad0f7e Merge pull request #500 from yunion-ci-robot/cherry-pick-489-to-release/2.8.0
[release/2.8.0] 腾讯云要求vpc掩码范围需在16 - 28之间
2019-04-19 20:31:10 +08:00
ioito
e19b1a2db2 腾讯云要求vpc掩码范围需在16 - 28之间 2019-04-19 12:07:41 +00:00
yunion-ci-robot
b72e37f69c Merge pull request #497 from yunion-ci-robot/cherry-pick-493-to-release/2.8.0
[release/2.8.0] 避免因ceph存储阻塞host 服务启动
2019-04-19 20:07:19 +08:00
ioito
761f7b4b95 添加连接ceph超时时间 2019-04-19 12:02:28 +00:00
ioito
1d25fd45e9 忽略rbd错误,并将rbd storage置为离线 2019-04-19 12:02:28 +00:00
yunion-ci-robot
8e157fcfa5 Merge pull request #494 from yunion-ci-robot/cherry-pick-491-to-release/2.8.0
[release/2.8.0] fix: skip quota check in server validateupdatedata if cpu and mem not updated
2019-04-19 17:22:13 +08:00
Qiu Jian
1a5c0e11dd fix: skip quota check in server validateupdatedata if cpu and mem not updated 2019-04-19 08:52:27 +00:00
yunion-ci-robot
1d7d4cbdd4 Merge pull request #488 from yunion-ci-robot/cherry-pick-487-to-release/2.8.0
[release/2.8.0] 避免标签为空时,未返回{data:[]}结构
2019-04-19 13:34:10 +08:00
yunion-ci-robot
fa7a9c37cb Merge pull request #492 from yunion-ci-robot/cherry-pick-490-to-release/2.8.0
[release/2.8.0] fix: add cloud_env filter of private_or_onpremise
2019-04-19 13:23:11 +08:00
Qiu Jian
92fc2cf029 fix: add cloud_env filter of private_or_onpremise 2019-04-19 04:45:23 +00:00
ioito
266e66c41d 避免标签为空时,未返回{data:[]}结构 2019-04-19 03:53:23 +00:00
yunion-ci-robot
5dff7d0b2b Merge pull request #485 from yunion-ci-robot/cherry-pick-474-to-release/2.8.0
[release/2.8.0] 避免一些公有云重装系统后数据未刷新导致任务失败
2019-04-19 00:45:12 +08:00
ioito
6914f74dbd 避免一些公有云重装系统后数据未刷新导致任务失败 2019-04-18 15:09:28 +00:00
yunion-ci-robot
ea7d81091f Merge pull request #482 from yunion-ci-robot/cherry-pick-476-to-release/2.8.0
[release/2.8.0] 避免创建Windows时使用linux格式的userData
2019-04-18 22:37:15 +08:00
ioito
e466b85bad 避免创建Windows时使用linux格式的userData 2019-04-18 14:24:31 +00:00
yunion-ci-robot
d212436c2b Merge pull request #481 from yunion-ci-robot/cherry-pick-480-to-release/2.8.0
[release/2.8.0] fix metadata handler not return
2019-04-18 19:39:11 +08:00
wanyaoqi
4c9ea8e802 fix metadata handler not return 2019-04-18 11:35:22 +00:00
yunion-ci-robot
8b730e6000 Merge pull request #479 from yunion-ci-robot/cherry-pick-478-to-release/2.8.0
[release/2.8.0] feature: mcclient spec modules add rpc method
2019-04-18 18:50:10 +08:00
Zexi
4a43f55c06 feature: mcclient spec modules add rpc method 2019-04-18 10:48:30 +00:00
yunion-ci-robot
21c085aee6 Merge pull request #473 from yunion-ci-robot/cherry-pick-470-to-release/2.8.0
[release/2.8.0] sync sku to scheduler
2019-04-18 15:30:13 +08:00
TangBin
97a37c4f47 fix import 2019-04-18 07:27:25 +00:00
TangBin
84b829ef5c sync sku to scheduler 2019-04-18 07:27:25 +00:00
yunion-ci-robot
b9692c6b51 Merge pull request #468 from yunion-ci-robot/cherry-pick-457-to-release/2.8.0
[release/2.8.0] Bugfix/yousong enhance db tasks
2019-04-18 14:25:11 +08:00
yunion-ci-robot
36aacf5365 Merge pull request #472 from yunion-ci-robot/cherry-pick-452-to-release/2.8.0
[release/2.8.0] 兼容标签返回结构
2019-04-18 14:01:10 +08:00
ioito
1498ea2c5f 兼容标签返回结构 2019-04-18 05:55:27 +00:00
yunion-ci-robot
7cf37a6e27 Merge pull request #469 from wanyaoqi/automated-cherry-pick-of-#408-upstream-release-2.8.0
Automated cherry pick of #408: 1. server export to libvirt generate virt install script 2. fix server import from libvirt
2019-04-18 11:36:13 +08:00
wanyaoqi
5b18ec8111 fix guest concurrent start, add start work 2019-04-18 11:11:25 +08:00
wanyaoqi
809f97ca8b qemu add serial device, fix system service detect os 2019-04-18 11:06:54 +08:00
wanyaoqi
1cc637d629 1. server export to libvirt generate virt install script 2. fix server import from libvirt 2019-04-18 11:06:23 +08:00
Yousong Zhou
3f0becad4b tasks: 改善查询语句
- 索引简化,obj_id的区分度非常高,且在QueryTasksOfObject()等相关的查询中是确定出现的
   - obj_name可认为被obj_id唯一确定
   - created_at若出现可假设被MySQL Index Merge优化
   - stage的值是可枚举的
 - Join taskobjects_tbl时,避免使用子查询查全表
 - 使用Union合并两个查询结果
2019-04-18 02:57:34 +00:00
Yousong Zhou
7174a29060 vendor: 更新yunion.io/x/sqlchemy 2019-04-18 02:57:34 +00:00
yunion-ci-robot
db7a9d9dc1 Merge pull request #465 from yunion-ci-robot/cherry-pick-463-to-release/2.8.0
[release/2.8.0] fix: image status should be converting after upload
2019-04-17 23:40:13 +08:00
Qiu Jian
859f5407b2 fix: 1. image status should be converting after upload 2. move consts to apis 3. add image-event command 2019-04-17 15:26:32 +00:00
yunion-ci-robot
44c339b7a7 Merge pull request #464 from yunion-ci-robot/cherry-pick-454-to-release/2.8.0
[release/2.8.0] Add unified cloud provider and env filter for any resource list
2019-04-17 23:15:11 +08:00
yunion-ci-robot
513af78e7d Merge pull request #460 from yunion-ci-robot/cherry-pick-450-to-release/2.8.0
[release/2.8.0] fix: 1. force use qcow2 format when creating kvm VM 2. add template lock
2019-04-17 23:05:11 +08:00
yunion-ci-robot
e3858744b5 Merge pull request #459 from yunion-ci-robot/cherry-pick-449-to-release/2.8.0
[release/2.8.0] 添加EIP操作相关日志记录
2019-04-17 23:04:15 +08:00
Qiu Jian
d816425670 Add unified cloud provider and env filter for any resource list 2019-04-17 15:02:35 +00:00
Qiu Jian
f5c7c3ac8b fix: 1. force use qcow2 format when creating kvm VM 2. add template lock 2019-04-17 14:34:35 +00:00
yunion-ci-robot
2752d36026 Merge pull request #458 from yunion-ci-robot/cherry-pick-423-to-release/2.8.0
[release/2.8.0] fix: region statusstandalone resource get status api missing
2019-04-17 22:34:17 +08:00
ioito
ac56b6b0d3 修正拼写错误 2019-04-17 14:30:40 +00:00
ioito
366a551a6b 添加eip相关日志记录 2019-04-17 14:30:39 +00:00
Zexi
7215fe72ab fix: region statusstandalone resource get status api missing 2019-04-17 14:25:31 +00:00
yunion-ci-robot
1b954d5e47 Merge pull request #455 from Zexi/automated-cherry-pick-of-#453-upstream-release-2.8.0
Automated cherry pick of #453: 改进调度器 disk 选择 storage 的逻辑:
2019-04-17 18:51:10 +08:00
Zexi
775b80b117 改进调度器 disk 选择 storage 的逻辑:
- 调度器选择 disk 对应一组 storages
- 主备机磁盘选择 storage
- 减少公有云选择 storage 的重复代码
2019-04-17 18:48:38 +08:00
yunion-ci-robot
ba841b675d Merge pull request #451 from yunion-ci-robot/cherry-pick-448-to-release/2.8.0
[release/2.8.0] hide some server metadata
2019-04-17 17:36:10 +08:00
Zexi
37269f4282 hide some server metadata 2019-04-17 08:28:28 +00:00
yunion-ci-robot
a0a64128e2 Merge pull request #447 from yunion-ci-robot/cherry-pick-441-to-release/2.8.0
[release/2.8.0] fix: 创建公有云虚拟机保留镜像原密码功能失效
2019-04-17 14:33:10 +08:00
yunion-ci-robot
4ba0992cc6 Merge pull request #446 from yunion-ci-robot/cherry-pick-426-to-release/2.8.0
[release/2.8.0] webconsole支持指定端口ssh连接
2019-04-17 14:28:11 +08:00
Zexi
0488734442 fix: 创建公有云虚拟机保留镜像原密码功能失效 2019-04-17 06:27:27 +00:00
yunion-ci-robot
22312f27b6 Merge pull request #443 from yunion-ci-robot/cherry-pick-442-to-release/2.8.0
[release/2.8.0] 避免阿里云lb参数校验循环调用
2019-04-17 14:25:13 +08:00
屈轩
8e56c653cd webconsole支持指定端口ssh连接 2019-04-17 05:48:27 +00:00
ioito
81258a7034 修复lb参数校验异常问题 2019-04-17 05:46:26 +00:00
yunion-ci-robot
47daa3afa2 Merge pull request #440 from yunion-ci-robot/cherry-pick-439-to-release/2.8.0
[release/2.8.0] fix: region sku consts undefined
2019-04-17 12:27:11 +08:00
Zexi
bea5503b12 fix: region sku consts undefined 2019-04-17 04:26:22 +00:00
yunion-ci-robot
3d228a087b Merge pull request #436 from yunion-ci-robot/cherry-pick-429-to-release/2.8.0
[release/2.8.0] 优化返回标签结构
2019-04-17 12:24:10 +08:00
yunion-ci-robot
fd4d070197 Merge pull request #435 from yunion-ci-robot/cherry-pick-417-to-release/2.8.0
[release/2.8.0] instance spec query add cache
2019-04-17 12:23:10 +08:00
yunion-ci-robot
a336ae95c3 Merge pull request #437 from Zexi/automated-cherry-pick-of-#430-upstream-release-2.8.0
Automated cherry pick of #430: fix: move all consts in compute/models to apis/compute
2019-04-17 11:18:12 +08:00
Zexi
36ed3bcc97 fix: ucloud eip wrong log Warning invoke 2019-04-17 11:13:33 +08:00
Qiu Jian
4becca44c8 fix: move all consts in compute/models to apis/compute 2019-04-17 11:10:25 +08:00
ioito
230eac1e64 添加返回distinct标签 2019-04-17 02:31:22 +00:00
TangBin
93185d5008 only list vpc usable skus 2019-04-17 02:28:21 +00:00
TangBin
e314b6716e instance spec query add cache 2019-04-17 02:28:21 +00:00
yunion-ci-robot
0232f9261d Merge pull request #434 from yunion-ci-robot/cherry-pick-427-to-release/2.8.0
[release/2.8.0] Hotfix/qj fix cloudcommon policy test error
2019-04-17 10:23:10 +08:00
Qiu Jian
dde6c3d93b fix: pkg/cloudcommon/policy/ go test failure 2019-04-17 02:18:25 +00:00
Qiu Jian
ad1bbf03c1 update vendor and Gopkg.lock 2019-04-17 02:18:25 +00:00
yunion-ci-robot
da235b4c75 Merge pull request #433 from yunion-ci-robot/cherry-pick-431-to-release/2.8.0
[release/2.8.0] fix: cloud account sync status not accurate
2019-04-17 10:09:10 +08:00
Qiu Jian
60c31c5767 fix: cloud account sync status not accurate 2019-04-17 01:58:20 +00:00
yunion-ci-robot
c91bf5cab3 Merge pull request #432 from yunion-ci-robot/cherry-pick-428-to-release/2.8.0
[release/2.8.0] fix: region usage guest 统计数量包括 host disabled
2019-04-17 09:14:09 +08:00
Zexi
a5ab591b02 fix: region usage guest 统计数量包括 host disabled 2019-04-16 18:05:23 +00:00
yunion-ci-robot
8b03dde1f1 Merge pull request #425 from yunion-ci-robot/cherry-pick-424-to-release/2.8.0
[release/2.8.0] fix: capabilitie api duplicate info
2019-04-16 20:43:11 +08:00
yunion-ci-robot
e5d9fb683f Merge pull request #420 from yunion-ci-robot/cherry-pick-419-to-release/2.8.0
[release/2.8.0] 避免OpenStack不支持安全组部署失败
2019-04-16 20:42:10 +08:00
Zexi
66d6c4a5a9 fix: capabilitie api duplicate info 2019-04-16 12:34:24 +00:00
屈轩
8b51115482 避免OpenStack不支持安全组部署失败 2019-04-16 10:54:22 +00:00
yunion-ci-robot
f4d88836d4 Merge pull request #416 from yunion-ci-robot/cherry-pick-415-to-release/2.8.0
[release/2.8.0] fix: cloud account queued sync_status is override as idle
2019-04-16 01:00:14 +08:00
Qiu Jian
f2a65ed203 fix: cloud account queued sync_status is overried as idle 2019-04-15 16:54:21 +00:00
yunion-ci-robot
c5d47bb685 Merge pull request #413 from yunion-ci-robot/cherry-pick-402-to-release/2.8.0
[release/2.8.0] Hotfix/qx auto sync time
2019-04-15 18:24:09 +08:00
屈轩
e3717bf94e typo 2019-04-15 10:15:24 +00:00
屈轩
723ed46a88 加入自动同步时间字段 2019-04-15 10:15:24 +00:00
yunion-ci-robot
5999e2cd78 Merge pull request #412 from yunion-ci-robot/cherry-pick-404-to-release/2.8.0
[release/2.8.0] fix: capability 接口没有考虑 cloudaccount 的禁用情况
2019-04-15 18:15:10 +08:00
Zexi
368c71a9b3 fix: capability 接口没有考虑 cloudaccount 的禁用情况 2019-04-15 10:00:26 +00:00
yunion-ci-robot
3129e099e1 避免创建不受支持的loadbalancer (#409) 2019-04-15 16:02:09 +08:00
Zexi Li
e59056cc13 Automated cherry pick of #168: 优化scheduler缓存 #380: fix: scheduler sku cache stale when region sync sku finished (#397)
* 优化scheduler缓存的sku数据

* fix: scheduler sku cache stale when region sync sku finished
2019-04-15 15:49:14 +08:00
yunion-ci-robot
da01d6b814 [release/2.8.0] Bugfix/tb sku fix (#394)
* sku filter fix

* change aws default secgroup name

* sku provider filter fix
2019-04-15 15:47:10 +08:00
yunion-ci-robot
19203236fb Websockets 不再拉取 ActionLog 的消息 (#407) 2019-04-15 15:26:10 +08:00
yunion-ci-robot
9879f1b702 fix: scheduler forecast backup server not work (#405) 2019-04-15 15:19:09 +08:00
yunion-ci-robot
b7fe4edf89 [release/2.8.0] 为 climc 增加 update-perform --cmp-only 选项,只升级计算节点 (#400)
* 为 climc 增加 update-perform --cmd-only 选项,只升级计算节点; 2个选项 只允许选择其中1个

* minor
2019-04-15 12:02:09 +08:00
yunion-ci-robot
e585e3bbe6 fix: server create params isolated device config no vendor and device type info (#393) 2019-04-13 22:03:09 +08:00
yunion-ci-robot
462d670e75 [release/2.8.0] Hotfix/qx lb manager (#392)
* 设置lb manager_id

* 公有云真删除model
2019-04-13 21:44:11 +08:00
yunion-ci-robot
eca8de6cbd 磁盘大小向上取整 (#389) 2019-04-13 21:31:09 +08:00
yunion-ci-robot
079df200e7 [release/2.8.0] Hotfix/qx cloudprovider info (#386)
* 通用返回cloudprovider info信息

* 通用返回cloudprovider info信息
2019-04-13 20:14:12 +08:00
yunion-ci-robot
e17ca3375b lb: https: allow change certificate (#381) 2019-04-13 19:46:09 +08:00
yunion-ci-robot
b7bb52ebea lb: 改正预删listener时未预删listener rule (#374) 2019-04-13 00:51:10 +08:00
yunion-ci-robot
d5e2fb767f [release/2.8.0] Bugfix/yousong lb delete (#372)
* lb: 修复backend group删除时未删backend

* lb: 预删子资源时排除掉已预删的资源

* lb: s/PreDeleteSubs/pendingDeleteSubs/
2019-04-13 00:31:10 +08:00
yunion-ci-robot
b344d39c94 [release/2.8.0] fix: fail to delete removed cloud resources (#369)
* fix: fail to delete removed cloud resources

* fix: private_cloud and on_premise filter overlaps

* fix: loadbalancer* should use pending_delete to remove resources
2019-04-12 21:19:11 +08:00
yunion-ci-robot
0e0c976858 移除重复代码 (#361) 2019-04-12 17:04:12 +08:00
yunion-ci-robot
e3cb042a7d 增加判断subtask准确度 (#356) 2019-04-12 16:07:11 +08:00
yunion-ci-robot
9cef9f2e78 避免eip未找到时,未设置server状态为fail (#353) 2019-04-12 14:38:10 +08:00
yunion-ci-robot
f855e3dafd fix: baremetal scheduler forecast fail (#351) 2019-04-12 12:36:09 +08:00
yunion-ci-robot
4e05c29cb2 fix: baremetal support options for tftp timeout retry times and block size (#345) 2019-04-11 22:13:14 +08:00
yunion-ci-robot
bf6d708cb0 fix: webconsole vmrc protocol not support (#343) 2019-04-11 15:03:09 +08:00
yunion-ci-robot
551dee0f78 fix: esxi ignore check file failure in host.getIStoragecache (#340) 2019-04-11 15:00:10 +08:00
yunion-ci-robot
6456d8d7c4 fix: fail to fetch private image as admin role (#337) 2019-04-11 13:52:10 +08:00
Jian Qiu
f89e04457e fix: server-deploy fail to set password if reset_password not set (#331) 2019-04-10 23:21:13 +08:00
yunion-ci-robot
5b29da94ff fix: create disk input need storage_id in JSON object (#329) 2019-04-10 21:41:13 +08:00
yunion-ci-robot
85da3e0371 fix: limit baremetal tftp MaxBlockSize to 512 (#323) 2019-04-10 18:28:10 +08:00
yunion-ci-robot
aea2dff4cc bugfix: fix server-change-config prase disks config error fix server deploy change password (#321) 2019-04-10 16:38:09 +08:00
yunion-ci-robot
1e96cf7f8a fix: add server create-params region and zone info (#319) 2019-04-10 15:06:08 +08:00
yunion-ci-robot
f0ed3d5575 避免guest状态出现中间ready的情况 (#311) 2019-04-10 12:36:10 +08:00
yunion-ci-robot
a6a6ed4986 fix: 1. baremetal always boot from pxe 2. baremetal prepare retry multiple local ipmi address (#315) 2019-04-10 11:55:09 +08:00
yunion-ci-robot
284bf7795f lblistener: 检查更新参数时默认使用已绑定acl (#308)
避免报missing acl argument错误
2019-04-10 11:18:10 +08:00
yunion-ci-robot
1771ba8587 避免net_desc为空未进行错误处理,避免network没有IP地址 (#304) 2019-04-09 22:37:26 +08:00
Jian Qiu
c71b78f843 Automated cherry pick of #283: fix: make cloud account&provider enable status more (#287)
* fix: make cloud account&provider enable status more consistent

* comment out FetchCustomizeColumns debug info

* fix: cloud account periodic probe should not relay on enabled status

* misc bug fixes
2019-04-09 22:13:10 +08:00
yunion-ci-robot
63478bc456 baremetal-agent: fix host undo convert duplicate access_mac error (#301) 2019-04-09 21:13:08 +08:00
yunion-ci-robot
ac51780b17 fix: server clone 参数处理扩容情况 (#299) 2019-04-09 18:30:10 +08:00
yunion-ci-robot
0702d97fe5 fix: scheduler disk schedtag filter host type not convert to guest hypervisor (#297) 2019-04-09 17:07:09 +08:00
屈轩
0a35748602 避免未setstorageinfo之前连接ceph集群 (#291) 2019-04-09 16:41:13 +08:00
Zexi Li
2841cf1b3f Automated cherry pick of #74: vm clone #167: region: save server create params into metadata #270: region: enhance server clone releated apis (#288)
* vm clone

* region: save server create params into metadata

* region: enhance server clone releated apis

* fix guestCdrom params missing
2019-04-09 12:18:31 +08:00
tb365
7a2bdb96cd Automated cherry pick of #245: huawei test bugfix (#286)
* huawei test bugfix

* add WaitStatusWithDelay method
2019-04-09 11:04:32 +08:00
Zexi Li
5a5133a6b9 fix: scheduler network predicate not set capability when host filtered (#280) 2019-04-08 22:35:41 +08:00
Zexi Li
f804f40299 fix: host 内存规格信息直接为 MB (#282) 2019-04-08 22:27:34 +08:00
Zexi Li
f125525805 fix: scheduler schedtag filters execute when candidates specified (#278) 2019-04-08 22:24:33 +08:00
Jian Qiu
1b9e3f6ad9 Feature: allow delete cloud-account with resources (#253) 2019-04-08 22:04:33 +08:00
屈轩
9f3d940a90 修复选择endpoint type异常错误 (#267) 2019-04-08 21:08:34 +08:00
wanyaoqi
79ebe00d01 fix task complete (#263) 2019-04-08 21:07:33 +08:00
屈轩
e7505c9bc7 修复:通过镜像创建的磁盘只能使用镜像ID参数 (#259) 2019-04-08 21:04:33 +08:00
wanyaoqi
d31525e9fc Automated cherry pick of #11: import servers from libvirt (#12)
* import servers from libvirt

* dep add libvirt-go-xml

* fix code
2019-04-08 21:01:31 +08:00
Zexi Li
1cd39b05cc fix: scheduler input incompatibility (#272) 2019-04-08 20:19:32 +08:00
Jian Qiu
70afe057ea fix: running guest count incorrect if containers running on host (#274) 2019-04-08 18:46:32 +08:00
Zexi Li
24bcb3d5d9 fix: region list empty or occupied hosts not work (#257) 2019-04-08 15:57:34 +08:00
Zexi Li
5058af8dc8 region: storage support set schedtags (#237) 2019-04-08 10:27:31 +08:00
wanyaoqi
e4737c5a72 fix climc server-deploy (#244) 2019-04-04 22:12:32 +08:00
Yousong Zhou
7c99500476 Automated cherry pick of #235: dep: update yunion.io/x/log (#238)
* treewide: fix typo cloudprovide

* dep: update yunion.io/x/log

* treewide: log.Errorf(err.Error()) to log.Errorln(err)
2019-04-04 22:06:30 +08:00
屈轩
d30d877569 优化扩容已挂载磁盘失败问题 (#249) 2019-04-04 21:56:33 +08:00
Jian Qiu
30ed73b9a8 fix: move vm's metadata sync into deep sync cycle (#234) 2019-04-04 21:50:32 +08:00
wanyaoqi
474abf60c2 action log send to ws service (#246) 2019-04-04 21:48:33 +08:00
Zexi Li
b3e1098890 fix: baremetal convert to host missing cpu and memory params (#242) 2019-04-04 19:51:32 +08:00
Zexi Li
6183e24bd8 fix: GetJointModule2 无法找到 compute_v2 的 endpoint (#231) 2019-04-04 18:25:20 +08:00
wanyaoqi
deec96b160 implement hijacker (#227) 2019-04-04 16:04:21 +08:00
屈轩
bd356833ce 同步镜像最小要求系统盘大小 (#220) 2019-04-04 11:53:20 +08:00
屈轩
5330896970 添加缺失的climc参数选项 (#217) 2019-04-04 11:20:21 +08:00
Jian Qiu
511ea69a6d fix: mark synced removed server with @lost<date> suffix (#215) 2019-04-04 00:33:29 +08:00
屈轩
61ce5c06a0 Automated cherry pick of #201: 补充缺失的al (#202)
* 补充缺失的allowempty tag

* 添加一个可以忽略的错误
2019-04-03 21:50:28 +08:00
屈轩
086c5a2c20 增加错误重试,增加任务成功率 (#198) 2019-04-03 21:39:28 +08:00
Jian Qiu
0fe4577007 feature: add option NameSyncResources to specify resources allowing name synchronization (#212) 2019-04-03 21:25:28 +08:00
Jian Qiu
3d6555cea0 Automated cherry pick of #193: improve server-list performance (#205)
* update vendor

* improve server-list performance

FetchCustomizeColumns that fetch extra fields for all rows 3. separate
read and write http request session

* update: optimize multi-column indexes
2019-04-03 20:13:27 +08:00
Zexi Li
7573536eb1 add OWNERS to support CI robot (#209) 2019-04-03 20:07:03 +08:00
wanyaoqi
e1c781437e bugs fix 2019-04-03 10:46:23 +08:00
Zexi Li
0b99b6874e climc: use default webconsole server url 2019-04-02 23:49:09 +08:00
屈轩
4fdfb05b7a 腾讯云重装系统后状态默认是running 2019-04-02 23:48:21 +08:00
屈轩
778dc211a3 修复:判断镜像状态逻辑错误 2019-04-02 22:24:09 +08:00
屈轩
3a9b8c66fb 忽略因镜像问题导致初始化失败 2019-04-02 21:37:05 +08:00
屈轩
bc5ad29c81 避免rebuild_root时因镜像状态变化导致上传镜像超过限制 2019-04-02 21:23:37 +08:00
屈轩
a39e7c2ce1 手动同步时默认是深度全量同步 2019-04-02 20:50:54 +08:00
屈轩
890808bd0f 同步安全组以公有云为主 2019-04-02 20:48:08 +08:00
屈轩
00d0e3f112 加入自动同步时自动合并安全组 2019-04-02 20:48:08 +08:00
屈轩
a6f5c0b2b0 openstack不能有protocol参数 (#175) 2019-04-02 17:48:58 +08:00
wanyaoqi
7f1aa99ffa Automated cherry pick of #155: bugfix: 1. fix get network desc choose wrong host (#162)
* bugfix: 1. fix get network desc choose wrong host wire 2. fix guest create backup doesn't cache iso image

* host wire detach filter by mac addr
2019-04-02 11:55:57 +08:00
Qiu Jian
d35314fd4c fix: image stream error should return immediately 2019-04-01 22:59:32 +08:00
Qiu Jian
7932e4eacd fix: ucloud GetBalance return ErrNotSupported 2019-04-01 21:02:04 +08:00
Qiu Jian
d48a787d31 fix: exclude hosts whose cloud provider's status not in CLOUD_PROVIDER_VALID_STATUS 2019-04-01 21:02:04 +08:00
Qiu Jian
d3a5457aa5 fix: track balance status of cloud account and avoid unhealth account 2019-04-01 21:02:04 +08:00
屈轩
8615ec8f19 修复Azure: 创建instance使用network-interface ID而非network ID 2019-04-01 20:48:41 +08:00
屈轩
7412ba352b 支持按成功与否过滤 2019-04-01 20:45:27 +08:00
屈轩
72d3dad5ea 腾讯云使用shell格式userdata,避免和cloud-init冲突导致绑定秘钥失败 2019-04-01 11:19:13 +08:00
Qiu Jian
4142a00267 fix: allow automatically choosing available disk storage type if host given 2019-04-01 10:05:19 +08:00
Jian Qiu
458cf8101e fix: skip syncing status if guest in failure status (#139) 2019-03-31 22:03:11 +08:00
Jian Qiu
70320ad95c fix: recode host convert hypervisor, make logic more clear (#135) 2019-03-31 22:00:42 +08:00
Jian Qiu
66d999f1b1 fix: host update status should notify scheduler (#131) 2019-03-31 21:51:53 +08:00
Jian Qiu
24f1aeb031 fix: anonymous user may have admin priviliges (#125) 2019-03-31 15:24:44 +08:00
Qiu Jian
f836bcc405 feature: host add property server_ips that carries the ip list of baremetal server 2019-03-30 08:11:25 +08:00
Qiu Jian
293280f83d fix: ni usercred cause rbac check panic 2019-03-29 22:08:15 +08:00
tb365
89a7bc30f8 修复AWS资源名称为空的问题&增加注入用户登录信息 (#119) 2019-03-29 20:51:50 +08:00
Qiu Jian
b27195815a fix: the default policy for actions not matching any rule defaults to allow 2019-03-29 20:45:32 +08:00
tb365
deac5b4dfd vm metrics fix (#118) 2019-03-29 20:11:29 +08:00
wanyaoqi
478b06b2f5 fix storage commit rate 2019-03-29 18:53:42 +08:00
屈轩
3e3fe847ac 避免续费时未刷新虚拟机状态 2019-03-29 18:36:47 +08:00
屈轩
e5b5c8080a 避免uncache公有云镜像失败 2019-03-29 17:33:10 +08:00
屈轩
531eb60781 使用控制台名称作为同步名称 2019-03-29 16:34:41 +08:00
屈轩
8501e466b6 避免绑定秘钥失败后机器还关联着秘钥 2019-03-29 11:56:58 +08:00
Qiu Jian
c7ccd665b1 fix: do not auto clean expired prepaid servers by default 2019-03-29 00:42:21 +08:00
Qiu Jian
a531cf0813 add more optimization 2019-03-29 00:42:21 +08:00
Qiu Jian
d9a89ce619 minor fixes 2019-03-29 00:42:21 +08:00
Qiu Jian
a7794b9f1c fix: reduce sync workdload by not always sync VM disk/nics/eips & images 2019-03-29 00:42:21 +08:00
Yousong Zhou
fc5356d86a circleci: initial version 2019-03-28 23:11:18 +08:00
Zhang Dongliang
275439681a 删除底层的 action log 2019-03-28 22:32:43 +08:00
Zhang Dongliang
ed04496cfc 为公有云增加 rpm 的定义 2019-03-28 16:33:35 +08:00
屈轩
8d5d1c281d prefer using keypair not password (#67) 2019-03-28 15:52:26 +08:00
Qiu Jian
78c52b7f94 fix: 1. cloud provider update status should clear scheduler cache 2. fix rbact issue prevent admin from creating prepaid vm 2019-03-28 10:15:33 +08:00
屈轩
9c88b3940b fixed security group name duplication that prevented instance from filtering by security group 2019-03-27 22:18:52 +08:00
屈轩
98ab1d82f9 fixed an issue where waiting times were too long due to a lack of refresh operations 2019-03-27 21:18:29 +08:00
屈轩
e078f1e767 remove guest secgroup rule detail 2019-03-27 21:15:29 +08:00
TangBin
6e1ef1b803 aws not found error fix 2019-03-27 20:44:19 +08:00
屈轩
c3c81ef440 避免计费找不到price_key 2019-03-27 20:04:55 +08:00
屈轩
6fdf042362 避免err为nil时指针访问异常 (#37) 2019-03-27 20:02:24 +08:00
Zexi Li
361d4863cd fix: scheduler choose backend incorrect 2019-03-27 17:56:45 +08:00
Zexi Li
51fc9c685a Add travis ci config (#31) 2019-03-27 17:52:12 +08:00
wanyaoqi
4f01353924 server list order by host name 2019-03-27 17:26:05 +08:00
TangBin
cb1085c479 ucloud add method GetSecurityGroupIds 2019-03-27 13:42:27 +08:00
wanyaoqi
760936901b bugfix: 1. fix sched fill disk desc 2. fix image server not handle error (#14) 2019-03-27 11:57:42 +08:00
914 changed files with 39668 additions and 10529 deletions

29
.circleci/Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM centos:7
MAINTAINER Yousong Zhou <zhouyousong@yunion.cn>
RUN true \
&& yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum install -y git wget \
&& yum groupinstall -y "Development Tools" \
&& : ceph for cmd/host \
&& rpm --import 'https://download.ceph.com/keys/release.asc' \
&& yum install -y https://download.ceph.com/rpm-luminous/el7/noarch/ceph-release-1-1.el7.noarch.rpm \
&& yum install -y libcephfs-devel librbd-devel librados-devel \
&& yum clean all
WORKDIR /opt
RUN true \
&& wget https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz \
&& tar xzf go1.12.1.linux-amd64.tar.gz \
&& rm -vf go1.12.1.linux-amd64.tar.gz \
&& true
ENV GOROOT="/opt/go"
ENV PATH="/opt/go/bin:${PATH}"
RUN useradd -c "OneCloud Builder" --create-home --home-dir /home/build --shell /bin/bash build
USER build
ENV HOME /home/build
WORKDIR /home/build
ENV GOPATH="/home/build/go"
ENV PATH="${GOPATH}/bin:${PATH}"

29
.circleci/config.yml Normal file
View File

@@ -0,0 +1,29 @@
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
build:
docker:
- image: yunionio/onecloud-ci:20190328
#### TEMPLATE_NOTE: go expects specific checkout path representing url
#### expecting it in the form of
#### /go/src/github.com/circleci/go-tool
#### /go/src/bitbucket.org/circleci/go-tool
working_directory: /home/build/go/src/yunion.io/x/onecloud
parallelism: 4
steps:
- checkout
- run:
command: |
targets="$(circleci tests glob "cmd/*" | grep -v cmd/host-image | circleci tests split)"
echo $targets | tr ' ' '\n'
make $targets
ls -lh _output/bin/
workflows:
version: 2
build_and_test:
jobs:
- build

22
.travis.yml Normal file
View File

@@ -0,0 +1,22 @@
# This is how to tell Travis to use the fast container-based test
# runner instead of the slow VM-based one.
sudo: false
dist: xenial
services:
- docker
language: go
go_import_path: yunion.io/x/onecloud
go:
- "1.12.x"
# Only clone the most recent commit.
git:
depth: 1
script:
- make docker_build

79
Gopkg.lock generated
View File

@@ -524,6 +524,14 @@
revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
version = "v1.4.7"
[[projects]]
digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda"
name = "github.com/ghodss/yaml"
packages = ["."]
pruneopts = "UT"
revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7"
version = "v1.0.0"
[[projects]]
branch = "master"
digest = "1:36fe9527deed01d2a317617e59304eb2c4ce9f8a24115bcc5c2e37b3aee5bae4"
@@ -533,9 +541,10 @@
revision = "22d885f9ecc78bf4ee5d72b937e4bbcdc58e8cae"
[[projects]]
digest = "1:ff09f03ca12c4d23c28c596eb0738745e36c1cac111f62f64819210f40607cd2"
digest = "1:d5083934eb25e45d17f72ffa86cae3814f4a9d6c073c4f16b64147169b245606"
name = "github.com/gin-gonic/gin"
packages = [
".",
"binding",
"json",
"render",
@@ -851,6 +860,14 @@
revision = "db8e3cd836b82e82e0a9c8edc6896967dd31374f"
version = "v1.1.3"
[[projects]]
branch = "master"
digest = "1:74e674486930998805335f2b2f0af5fd3b183c755973e53f532363a56831b7a3"
name = "github.com/libvirt/libvirt-go-xml"
packages = ["."]
pruneopts = "UT"
revision = "4b6d354bfe8a0c85cebc68f0f7e45f7d5a37de7b"
[[projects]]
digest = "1:4e878df5f4e9fd625bf9c9aac77ef7cbfa4a74c01265505527c23470c0e40300"
name = "github.com/marstr/guid"
@@ -1063,12 +1080,12 @@
version = "v2.0.7"
[[projects]]
digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747"
branch = "master"
digest = "1:deff41c4160cc5b487a1d1a69a58925f2d3ac11befa0692b50e76940594e20f5"
name = "github.com/pkg/errors"
packages = ["."]
pruneopts = "UT"
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
revision = "27936f6d90f9c8e1145f11ed52ffffbfdb9e0af7"
[[projects]]
branch = "master"
@@ -1211,9 +1228,20 @@
version = "v1.0.3"
[[projects]]
digest = "1:18752d0b95816a1b777505a97f71c7467a8445b8ffb55631a7bf779f6ba4fa83"
digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02"
name = "github.com/stretchr/objx"
packages = ["."]
pruneopts = "UT"
revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c"
version = "v0.1.1"
[[projects]]
digest = "1:15a4a7e5afac3cea801fa24831fce3bf3b5bd3620cbf8355a07b7dbf06877883"
name = "github.com/stretchr/testify"
packages = ["assert"]
packages = [
"assert",
"mock",
]
pruneopts = "UT"
revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
version = "v1.2.2"
@@ -1476,14 +1504,6 @@
revision = "df014850f6dee74ba2fc94874043a9f3f75fbfd8"
version = "v1.17.0"
[[projects]]
digest = "1:2655728699af00d823b0a68bd7169fd241a30c04252f456b34421908701b9c3f"
name = "gopkg.in/gin-gonic/gin.v1"
packages = ["."]
pruneopts = "UT"
revision = "d459835d2b077e44f7c9b453505ee29881d5d12d"
version = "v1.2"
[[projects]]
digest = "1:cbc72c4c4886a918d6ab4b95e347ffe259846260f99ebdd8a198c2331cf2b2e9"
name = "gopkg.in/go-playground/validator.v8"
@@ -1684,28 +1704,29 @@
[[projects]]
branch = "master"
digest = "1:5ef22fef33e8bfb5e66901f9adba50f5d594ad20263a132fdc62801033eb7712"
digest = "1:f044fe02305a360710bcb0626b870599537514da95c9d4f4cd31df0b4c017e5f"
name = "yunion.io/x/jsonutils"
packages = ["."]
pruneopts = "UT"
revision = "ff8561d72c32ba4eb91ee660f6f2ca9e6f64d268"
revision = "a964e1e8a05199146284389fe6ef2d1eac2744b4"
[[projects]]
branch = "master"
digest = "1:636db180d3fc734536a5437d93bb6fe937feb036c1ed062c25872a47c4283163"
digest = "1:a872813eff1f3d353a1e4e64d745ac07387ed52cbc4cc2f6180272a7df7f21d1"
name = "yunion.io/x/log"
packages = [
".",
"hooks",
]
pruneopts = "UT"
revision = "5185c49f6d361f61e561fbccba1bedcc7c62748b"
revision = "9f6483a7103dc7b5012ae7aad2c74728e02cf650"
[[projects]]
branch = "master"
digest = "1:f1f1aa2c29c1de090cf90d661fa1ee6c45c2d828059b5ec265a88a771649f83b"
digest = "1:c09298fb61e83dae28b08222e20f31bd109f93c50a29517a17edcc5a5666bd1a"
name = "yunion.io/x/pkg"
packages = [
"errors",
"gotypes",
"prettytable",
"trace",
@@ -1730,30 +1751,29 @@
"util/stringutils",
"util/timeutils",
"util/trace",
"util/ttlpool",
"util/version",
"util/wait",
"util/workqueue",
"utils",
]
pruneopts = "UT"
revision = "f92993f80cd49639f283ff29d6ab3d7cdd6ca941"
revision = "b564cfdcc2247b3f6f6bc4e818b44f08d82dc660"
[[projects]]
branch = "master"
digest = "1:4137f40ed548a5dc02719ad2e6b6bdfd76a9d881fcd1a72eb5970956a7219d03"
digest = "1:f7386c58a1e94eddbca9b8a95167ba7b4bc7d8dfea40a01261f7443757eafb25"
name = "yunion.io/x/sqlchemy"
packages = ["."]
pruneopts = "UT"
revision = "4d8d8e9b16804336f16570787421b9be24a6da1f"
revision = "cfa59aeabbfe47c910920a2e1d61e1eaddd92ec5"
[[projects]]
branch = "master"
digest = "1:6a0bb09937441c871c34278e62ea9c80320a6b9894d63261f5c4246c07aeb510"
digest = "1:d91515edf1e995676f635f39ed5445e45fd3d176c71546744b11cba7e0126421"
name = "yunion.io/x/structarg"
packages = ["."]
pruneopts = "UT"
revision = "f370514c4558e64e798bd83abaff263dabef9f3a"
revision = "115bed041de33bdf3a5be5281d4a6b06607c82d8"
[solve-meta]
analyzer-name = "dep"
@@ -1806,7 +1826,6 @@
"github.com/coredns/coredns/plugin/nsid",
"github.com/coredns/coredns/plugin/pkg/dnsutil",
"github.com/coredns/coredns/plugin/pkg/fall",
"github.com/coredns/coredns/plugin/pkg/log",
"github.com/coredns/coredns/plugin/pkg/upstream",
"github.com/coredns/coredns/plugin/proxy",
"github.com/coredns/coredns/plugin/reload",
@@ -1814,6 +1833,7 @@
"github.com/coredns/coredns/request",
"github.com/fatih/color",
"github.com/fsnotify/fsnotify",
"github.com/gin-gonic/gin",
"github.com/go-sql-driver/mysql",
"github.com/golang-plus/errors",
"github.com/golang-plus/uuid",
@@ -1827,12 +1847,14 @@
"github.com/json-iterator/go",
"github.com/koding/websocketproxy",
"github.com/kr/pty",
"github.com/libvirt/libvirt-go-xml",
"github.com/mholt/caddy",
"github.com/mholt/caddy/startupshutdown",
"github.com/miekg/dns",
"github.com/moul/http2curl",
"github.com/nelsonken/cos-go-sdk-v5/cos",
"github.com/pierrec/lz4",
"github.com/pkg/errors",
"github.com/serialx/hashring",
"github.com/shirou/gopsutil/cpu",
"github.com/shirou/gopsutil/host",
@@ -1840,6 +1862,7 @@
"github.com/shirou/gopsutil/net",
"github.com/shirou/gopsutil/process",
"github.com/stretchr/testify/assert",
"github.com/stretchr/testify/mock",
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common",
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors",
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http",
@@ -1858,7 +1881,6 @@
"golang.org/x/net/bpf",
"golang.org/x/net/ipv4",
"golang.org/x/sys/unix",
"gopkg.in/gin-gonic/gin.v1",
"gopkg.in/yaml.v2",
"k8s.io/api/core/v1",
"k8s.io/apimachinery/pkg/api/errors",
@@ -1871,6 +1893,8 @@
"k8s.io/kubernetes/pkg/scheduler/api/v1",
"yunion.io/x/jsonutils",
"yunion.io/x/log",
"yunion.io/x/log/hooks",
"yunion.io/x/pkg/errors",
"yunion.io/x/pkg/gotypes",
"yunion.io/x/pkg/prettytable",
"yunion.io/x/pkg/trace",
@@ -1893,7 +1917,6 @@
"yunion.io/x/pkg/util/stringutils",
"yunion.io/x/pkg/util/timeutils",
"yunion.io/x/pkg/util/trace",
"yunion.io/x/pkg/util/ttlpool",
"yunion.io/x/pkg/util/version",
"yunion.io/x/pkg/util/wait",
"yunion.io/x/pkg/util/workqueue",

View File

@@ -206,4 +206,7 @@
[[constraint]]
name="github.com/ceph/go-ceph"
branch = "master"
branch = "master"
[[constraint]]
branch = "master"
name = "github.com/libvirt/libvirt-go-xml"

View File

@@ -117,3 +117,6 @@ dep:
%:
@:
docker_build:
$(ROOT_DIR)/build/docker_build.sh

13
OWNERS Normal file
View File

@@ -0,0 +1,13 @@
# See the OWNERS docs at https://go.k8s.io/owners
reviewers:
- swordqiu
- yousong
- wanyaoqi
- Zexi
- ioito
- tb365
approvers:
- swordqiu
- yousong
- wanyaoqi
- Zexi

View File

@@ -1 +1,4 @@
# Yunion onecloud
# Yunion OneCloud
[![CircleCI](https://circleci.com/gh/yunionio/onecloud.svg?style=svg)](https://circleci.com/gh/yunionio/onecloud) [![Build Status](https://travis-ci.org/yunionio/onecloud.svg?branch=master)](https://travis-ci.org/yunionio/onecloud)
[![Go Report Card](https://goreportcard.com/badge/github.com/yunionio/onecloud)](https://goreportcard.com/report/github.com/yunionio/onecloud)

1
build/awscli/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="AWS Command Line Utility"

1
build/azurecli/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="Azure Command Line Utility"

View File

@@ -0,0 +1 @@
DESCRIPTION="Baremetal Agent Command Line Utility"

18
build/docker_build.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
SRC_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
BIN_DIR=$SRC_ROOT/_output/bin
WORK_DIR="/go/src/yunion.io/x/onecloud"
docker run --rm -it \
-w $WORK_DIR \
-v $SRC_ROOT:$WORK_DIR \
d3lx/golang:yunion \
make
echo "Build finish"
ls -alh $BIN_DIR

1
build/esxicli/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="ESXI Command Line Utility"

1
build/host/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="Yunion Host Command Line Utility"

1
build/huaweicli/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="HUAWEI Command Line Utility"

1
build/ipmicli/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="IPMI Command Line Utility"

1
build/openstackcli/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="OPENSTACK Command Line Utility"

1
build/qcloudcli/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="QCLOUD Command Line Utility"

View File

@@ -1 +1 @@
您的{{ .hypervisor }}主机{{ .name }}的系统盘已经重置成功,{{ if .account }}初始帐号为{{ .account }}{{ end }}{{ if .keypair }}访问密钥为{{ .keypair }}{{ end }}{{ if .password }}初始密码为{{ .password }}{{ end }}请使用{{ if .windows }}远程桌面连接器(RDC){{ else }}SSH{{ end }}或控制面板控制台访问云主机。
您的{{ .hypervisor }}主机{{ .name }}重装系统成功,{{ if .account }}初始帐号为{{ .account }}{{ end }}{{ if .keypair }}访问密钥为{{ .keypair }}{{ end }}{{ if .password }}初始密码为{{ .password }}{{ end }}请使用{{ if .windows }}远程桌面连接器(RDC){{ else }}SSH{{ end }}或控制面板控制台访问云主机。

View File

@@ -1 +1 @@
{{ .hypervisor }}主机{{ .name }}的系统盘重置成功
{{ .hypervisor }}主机{{ .name }}重装系统成功

View File

@@ -2,8 +2,11 @@ package main
import (
"yunion.io/x/onecloud/pkg/baremetal/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
service.New().StartService()
}

View File

@@ -1,6 +1,8 @@
package shell
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -17,6 +19,8 @@ type BaseActionListOptions struct {
Action []string `help:"Log action"`
Search string `help:"Filter action logs by obj_name, using 'like' syntax."`
Admin bool `help:"admin mode"`
Succ bool `help:"Show success action log only"`
Fail bool `help:"Show failed action log only"`
}
type ActionListOptions struct {
@@ -64,6 +68,15 @@ func doActionList(s *mcclient.ClientSession, args *ActionListOptions) error {
if args.Admin {
params.Add(jsonutils.JSONTrue, "admin")
}
if args.Succ && args.Fail {
return fmt.Errorf("succ and fail can't go together")
}
if args.Succ {
params.Add(jsonutils.JSONTrue, "success")
}
if args.Fail {
params.Add(jsonutils.JSONFalse, "success")
}
logs, err := modules.Actions.List(s, params)
if err != nil {
return err

View File

@@ -38,6 +38,10 @@ func doComputeEventList(s *mcclient.ClientSession, args *EventListOptions) error
return doEventList(modules.Logs, s, args)
}
func doImageEventList(s *mcclient.ClientSession, args *EventListOptions) error {
return doEventList(modules.ImageLogs, s, args)
}
func doEventList(man modules.ResourceManager, s *mcclient.ClientSession, args *EventListOptions) error {
params := jsonutils.NewDict()
if len(args.Type) > 0 {
@@ -144,4 +148,9 @@ func init() {
nargs := EventListOptions{BaseEventListOptions: args.BaseEventListOptions, Id: args.ID, Type: []string{"kubemachine"}}
return doK8sEventList(s, &nargs)
})
R(&TypeEventListOptions{}, "image-event", "Show operation event logs of glance images", func(s *mcclient.ClientSession, args *TypeEventListOptions) error {
nargs := EventListOptions{BaseEventListOptions: args.BaseEventListOptions, Id: args.ID, Type: []string{"image"}}
return doImageEventList(s, &nargs)
})
}

View File

@@ -32,6 +32,10 @@ func init() {
Usable *bool `help:"List all zones that is usable"`
Hypervisor string `help:"filter hosts by hypervisor"`
StorageNotAttached bool `help:"List hosts not attach specified storage"`
options.BaseListOptions
}
R(&HostListOptions{}, "host-list", "List hosts", func(s *mcclient.ClientSession, opts *HostListOptions) error {
@@ -449,6 +453,7 @@ func init() {
MAC string `help:"Default MAC address of baremetal"`
Rack string `help:"Rack number of baremetal"`
Slots string `help:"Slots number of baremetal"`
IpmiUser string `help:"IPMI user name"`
IpmiPasswd string `help:"IPMI user password"`
IpmiAddr string `help:"IPMI IP address"`
}
@@ -463,6 +468,9 @@ func init() {
if len(args.Slots) > 0 {
params.Add(jsonutils.NewString(args.Slots), "slots")
}
if len(args.IpmiUser) > 0 {
params.Add(jsonutils.NewString(args.IpmiUser), "ipmi_username")
}
if len(args.IpmiPasswd) > 0 {
params.Add(jsonutils.NewString(args.IpmiPasswd), "ipmi_password")
}
@@ -505,20 +513,15 @@ func init() {
return nil
})
type HostSetSchedtagOptions struct {
ID string `help:"ID or Name of host"`
Schedtag []string `help:"Ids of schedtag"`
type HostSpecOptions struct {
ID string `help:"ID or name of host"`
}
R(&HostSetSchedtagOptions{}, "host-set-schedtag", "Set schedtags to a host", func(s *mcclient.ClientSession, args *HostSetSchedtagOptions) error {
params := jsonutils.NewDict()
for idx, tag := range args.Schedtag {
params.Add(jsonutils.NewString(tag), fmt.Sprintf("schedtag.%d", idx))
}
result, err := modules.Hosts.PerformAction(s, args.ID, "set-schedtag", params)
R(&HostSpecOptions{}, "host-spec", "Get host spec info", func(s *mcclient.ClientSession, args *HostSpecOptions) error {
spec, err := modules.Hosts.GetSpecific(s, args.ID, "spec", nil)
if err != nil {
return err
}
printObject(result)
printObject(spec)
return nil
})
}

View File

@@ -88,11 +88,16 @@ func init() {
})
type HostWireDetachOptions struct {
HOST string `help:"ID or Name of Host"`
WIRE string `help:"ID or Name of Wire"`
HOST string `help:"ID or Name of Host"`
WIRE string `help:"ID or Name of Wire"`
MacAddr string `help:"Host wire mac addr"`
}
R(&HostWireDetachOptions{}, "host-wire-detach", "Detach host from wire", func(s *mcclient.ClientSession, args *HostWireDetachOptions) error {
result, err := modules.Hostwires.Detach(s, args.HOST, args.WIRE, nil)
params := jsonutils.NewDict()
if len(args.MacAddr) > 0 {
params.Set("mac_addr", jsonutils.NewString(args.MacAddr))
}
result, err := modules.Hostwires.Detach(s, args.HOST, args.WIRE, params)
if err != nil {
return err
}

View File

@@ -67,4 +67,5 @@ func init() {
printObject(lbbackendgroup)
return nil
})
}

View File

@@ -15,7 +15,7 @@ func init() {
Network string `help:"ID or Name of network"`
Ip string `help:"search the IP address"`
}
R(&LoadbalancerNetworkListOptions{}, "loadbalancer-network-list", "List loadbalancer network pairs", func(s *mcclient.ClientSession, args *LoadbalancerNetworkListOptions) error {
R(&LoadbalancerNetworkListOptions{}, "lbnetwork-list", "List loadbalancer network pairs", func(s *mcclient.ClientSession, args *LoadbalancerNetworkListOptions) error {
var params *jsonutils.JSONDict
{
var err error
@@ -43,5 +43,4 @@ func init() {
printList(result, modules.Loadbalancernetworks.GetColumns(s))
return nil
})
}

View File

@@ -84,4 +84,5 @@ func init() {
printObject(lb)
return nil
})
}

View File

@@ -19,4 +19,17 @@ func init() {
printList(result, []string{})
return nil
})
R(&options.TagListOptions{}, "tag-list", "List tags", func(s *mcclient.ClientSession, opts *options.TagListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Metadatas.Get(s, "tag-value-pairs", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -14,32 +14,23 @@ func init() {
* 创建一条报警规则
*/
type MeterAlertCreateOptions struct {
TYPE string `help:"Alert rule type" choices:"balance|resFee|monthFee"`
THRESHOLD float64 `help:"Threshold value of the metric"`
COMPARATOR string `help:"Comparison operator for join expressions" choices:">|<|>=|<=|=|!="`
RECIPIENTS string `help:"Comma separated recipient ID"`
LEVEL string `help:"Alert level" choices:"normal|important|fatal"`
CHANNEL string `help:"Ways to send an alarm" choices:"email|mobile"`
Type string `help:"Alert rule type" required:"true" choices:"balance|resFee|monthFee"`
Threshold float64 `help:"Threshold value of the metric" required:"true"`
Comparator string `help:"Comparison operator for join expressions" required:"true" choices:">|<|>=|<=|=|!="`
Recipients string `help:"Comma separated recipient ID" required:"true"`
Level string `help:"Alert level" required:"true" choices:"normal|important|fatal"`
Channel string `help:"Ways to send an alarm" required:"true" choices:"email|mobile"`
Provider string `help:"Name of the cloud platform"`
AccountId string `help:"ID of the cloud platform"`
ProjectId string `help:"ID of the project" required:"true"`
}
R(&MeterAlertCreateOptions{}, "meteralert-create", "Create a meter alert rule", func(s *mcclient.ClientSession, args *MeterAlertCreateOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.TYPE), "type")
params.Add(jsonutils.NewFloat(args.THRESHOLD), "threshold")
params.Add(jsonutils.NewString(args.COMPARATOR), "comparator")
params.Add(jsonutils.NewString(args.RECIPIENTS), "recipients")
params.Add(jsonutils.NewString(args.LEVEL), "level")
params.Add(jsonutils.NewString(args.CHANNEL), "channel")
if len(args.Provider) > 0 {
params.Add(jsonutils.NewString(args.Provider), "provider")
}
if len(args.AccountId) > 0 {
params.Add(jsonutils.NewString(args.AccountId), "account_id")
params, err := options.StructToParams(args)
if err != nil {
return err
}
rst, err := modules.MeterAlert.Create(s, params)
if err != nil {
return err
}
@@ -89,27 +80,15 @@ func init() {
Type string `help:"Alarm rule type" choices:"balance|resFee|monthFee"`
CloudProvider string `help:"Name of cloud provider, case sensitive"`
AccountId string `help:"Cloud account ID"`
ProjectId string `help:"ID of the project" required:"true"`
options.BaseListOptions
}
R(&MeterAlertListOptions{}, "meteralert-list", "List meter alert", func(s *mcclient.ClientSession, args *MeterAlertListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
if len(args.Type) > 0 {
params.Add(jsonutils.NewString(args.Type), "type")
}
if len(args.CloudProvider) > 0 {
params.Add(jsonutils.NewString(args.CloudProvider), "provider")
}
if len(args.AccountId) > 0 {
params.Add(jsonutils.NewString(args.AccountId), "account_id")
}
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.MeterAlert.List(s, params)
if err != nil {
return err

View File

@@ -20,6 +20,8 @@ func init() {
Host string `help:"search networks attached to a host"`
Vpc string `help:"search networks belongs to a VPC"`
Region string `help:"search networks belongs to a CloudRegion" json:"cloudregion"`
City string `help:"search networks belongs to a city"`
Usable *bool `help:"search usable networks"`
ServerType string `help:"search networks belongs to a ServerType" choices:"guest|baremetal|container|pxe|ipmi"`
}
R(&NetworkListOptions{}, "network-list", "List networks", func(s *mcclient.ClientSession, opts *NetworkListOptions) error {

View File

@@ -0,0 +1,148 @@
package shell
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
/**
* 创建一条报警规则
*/
type NodealertCreateOptions struct {
Type string `help:"Alert rule type" required:"true" choices:"guest|host"`
Metric string `help:"Metric name, include measurement and field, e.g. vm_cpu.usage_active" required:"true"`
NodeName string `help:"Name of the guest or host" required:"true"`
NodeID string `help:"ID of the guest or host" required:"true"`
Period string `help:"Specify the query time period for the data" required:"true"`
Window string `help:"Specify the query interval for the data" required:"true"`
Threshold float64 `help:"Threshold value of the metric" required:"true"`
Comparator string `help:"Comparison operator for join expressions" choices:">|<|>=|<=|=|!=" required:"true"`
Recipients string `help:"Comma separated recipient ID" required:"true"`
Level string `help:"Alert level" required:"true" choices:"normal|important|fatal"`
Channel string `help:"Ways to send an alarm" required:"true" choices:"email|mobile|dingtalk"`
}
R(&NodealertCreateOptions{}, "nodealert-create", "Create a node alert rule", func(s *mcclient.ClientSession, args *NodealertCreateOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
rst, err := modules.NodeAlert.Create(s, params)
if err != nil {
return err
}
printObject(rst)
return nil
})
/**
* 修改指定的报警规则
*/
type NodealertUpdateOptions struct {
ID string `help:"ID of the alert rule" required:"true" positional:"true"`
Type string `help:"Alert rule type" choices:"guest|host"`
Metric string `help:"Metric name, include measurement and field, such as vm_cpu.usage_active"`
NodeName string `help:"Name of the guest or host"`
NodeID string `help:"ID of the guest or host"`
Period string `help:"Specify the query time period for the data"`
Window string `help:"Specify the query interval for the data"`
Threshold float64 `help:"Threshold value of the metric"`
Comparator string `help:"Comparison operator for join expressions" choices:">|<|>=|<=|=|!="`
Recipients string `help:"Comma separated recipient ID"`
Level string `help:"Alert level" choices:"normal|important|fatal"`
Channel string `help:"Ways to send an alarm" choices:"email|mobile"`
}
R(&NodealertUpdateOptions{}, "nodealert-update", "Update the node alert rule", func(s *mcclient.ClientSession, args *NodealertUpdateOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
rst, err := modules.NodeAlert.Patch(s, args.ID, params)
if err != nil {
return err
}
printObject(rst)
return nil
})
/**
* 删除指定ID的报警规则
*/
type NodealertDeleteOptions struct {
ID string `help:"ID of node alert" required:"true" positional:"true"`
}
R(&NodealertDeleteOptions{}, "nodealert-delete", "Delete a node alert", func(s *mcclient.ClientSession, args *NodealertDeleteOptions) error {
alarm, err := modules.NodeAlert.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(alarm)
return nil
})
/**
* 启用指定ID的报警规则状态
*/
type NodealertUpdateStatusOptions struct {
ID string `help:"ID of the node alert" required:"true" positional:"true"`
}
R(&NodealertUpdateStatusOptions{}, "nodealert-enable", "Enable alert rule for the specified ID", func(s *mcclient.ClientSession, args *NodealertUpdateStatusOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("Enabled"), "status")
alarm, err := modules.NodeAlert.Patch(s, args.ID, params)
if err != nil {
return err
}
printObject(alarm)
return nil
})
/**
* 禁用指定ID的报警规则状态
*/
R(&NodealertUpdateStatusOptions{}, "nodealert-disable", "Disaable alert rule for the specified ID", func(s *mcclient.ClientSession, args *NodealertUpdateStatusOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("Disabled"), "status")
alarm, err := modules.NodeAlert.Patch(s, args.ID, params)
if err != nil {
return err
}
printObject(alarm)
return nil
})
/**
* 列出报警规则
*/
type NodealertListOptions struct {
Type string `help:"Alarm rule type" choices:"guest|host"`
Metric string `help:"Metric name, include measurement and field, e.g. vm_cpu.usage_active"`
NodeName string `help:"Name of the guest or host"`
NodeID string `help:"ID of the guest or host"`
options.BaseListOptions
}
R(&NodealertListOptions{}, "nodealert-list", "List node alert", func(s *mcclient.ClientSession, args *NodealertListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.NodeAlert.List(s, params)
if err != nil {
return err
}
printList(result, modules.NodeAlert.GetColumns(s))
return nil
})
}

View File

@@ -25,10 +25,10 @@ func init() {
typ, _ := routeObj.GetString("type")
cidr, _ := routeObj.GetString("cidr")
next_hop_type, _ := routeObj.GetString("next_hop_type")
next_hop, _ := routeObj.GetString("next_hop")
next_hop_id, _ := routeObj.GetString("next_hop_id")
route := fmt.Sprintf("%8s: %18s %s", typ, cidr, next_hop_type)
if len(next_hop) > 0 {
route += fmt.Sprintf(":%s", next_hop)
if next_hop_id != "" {
route += fmt.Sprintf(":%s", next_hop_id)
}
routes = append(routes, route)
}

View File

@@ -21,6 +21,7 @@ func (h *schedtagModelHelper) register() {
h.list(man.Slave, man.Slave.GetKeyword())
h.add(man, man.Slave.GetKeyword())
h.remove(man, man.Slave.GetKeyword())
h.setTags(man, man.Slave.GetKeyword())
}
}
@@ -83,6 +84,25 @@ func (h *schedtagModelHelper) remove(man modules.JointResourceManager, kw string
})
}
func (h *schedtagModelHelper) setTags(man modules.JointResourceManager, kw string) {
R(
&options.SchedtagSetOptions{},
fmt.Sprintf("%s-set-schedtag", kw),
fmt.Sprintf("Set schedtags to %v", kw),
func(s *mcclient.ClientSession, args *options.SchedtagSetOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := man.Slave.PerformAction(s, args.ID, "set-schedtag", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
}
func init() {
newSchedtagModelHelper(
modules.Schedtaghosts,

View File

@@ -93,6 +93,19 @@ func init() {
return nil
})
type SchedulerCleanCacheOptions struct {
HostId string `help:"ID of host" short-token:"h"`
SessionId string `help:"Session id" short-token:"s"`
}
R(&SchedulerCleanCacheOptions{}, "scheduler-clean-cache", "Clean scheduler hosts cache",
func(s *mcclient.ClientSession, args *SchedulerCleanCacheOptions) error {
err := modules.SchedManager.CleanCache(s, args.HostId, args.SessionId)
if err != nil {
return err
}
return nil
})
type SchedulerHistoryListOptions struct {
Limit int `default:"50" help:"Page limit"`
Offset int `default:"0" help:"Page offset"`
@@ -154,4 +167,17 @@ func init() {
}
return nil
})
type SyncOpt struct {
Wait bool `help:"wait sync finish"`
}
R(&SyncOpt{}, "scheduler-sync-sku", "Sync scheduler SKU cache",
func(s *mcclient.ClientSession, args *SyncOpt) error {
result, err := modules.SchedManager.SyncSku(s, args.Wait)
if err != nil {
return err
}
fmt.Println(result.YAMLString())
return nil
})
}

View File

@@ -1,14 +1,19 @@
package shell
import (
"encoding/json"
"fmt"
"io/ioutil"
"net"
"os"
"path/filepath"
yaml "gopkg.in/yaml.v2"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudcommon/cmdline"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
@@ -84,6 +89,32 @@ func init() {
return nil
})
R(&options.ServerBatchMetadataOptions{}, "server-batch-add-tag", "add tags for some server", func(s *mcclient.ClientSession, opts *options.ServerBatchMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Servers.PerformClassAction(s, "batch-user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ServerBatchMetadataOptions{}, "server-batch-set-tag", "Set tags for some server", func(s *mcclient.ClientSession, opts *options.ServerBatchMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Servers.PerformClassAction(s, "batch-set-user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ServerMetadataOptions{}, "server-add-tag", "Set tag of a server", func(s *mcclient.ClientSession, opts *options.ServerMetadataOptions) error {
params, err := opts.Params()
if err != nil {
@@ -152,6 +183,16 @@ func init() {
return nil
})
R(&options.ServerCloneOptions{}, "server-clone", "Clone a server", func(s *mcclient.ClientSession, opts *options.ServerCloneOptions) error {
params := jsonutils.Marshal(opts).(*jsonutils.JSONDict)
res, err := modules.Servers.PerformAction(s, opts.SOURCE, "clone", params)
if err != nil {
return err
}
printObject(res)
return nil
})
R(&options.ServerLoginInfoOptions{}, "server-logininfo", "Get login info of a server", func(s *mcclient.ClientSession, opts *options.ServerLoginInfoOptions) error {
srvid, e := modules.Servers.GetId(s, opts.ID, nil)
if e != nil {
@@ -526,9 +567,16 @@ func init() {
params, err := options.StructToParams(opts)
if len(opts.Disk) > 0 {
params.Remove("disk.0")
disksConf := make([]*compute.DiskConfig, 0)
for i, d := range opts.Disk {
params.Set(fmt.Sprintf("disk.%d", i+1), jsonutils.NewString(d))
// params.Set(key, value)
diskConfig, err := cmdline.ParseDiskConfig(d, i+1)
if err != nil {
return err
}
disksConf = append(disksConf, diskConfig)
}
params.Set("disks", jsonutils.Marshal(disksConf))
}
if err != nil {
@@ -782,4 +830,144 @@ func init() {
}
return nil
})
type ServersImportFromLibvirtOptions struct {
CONFIG_FILE string `help:"File Path describing servers from libvirt"`
}
type Servers struct {
Mac string `yaml:"mac"`
Ip string `yaml:"ip"`
}
type Hosts struct {
HostIp string `yaml:"host_ip"`
XmlFilePath string `yaml:"xml_file_path"`
MonitorPath string `yaml:"monitor_path"`
Servers []Servers `yaml:"servers"`
}
type LibvirtImportOptions struct {
Hosts []Hosts `yaml:"hosts"`
}
R(&ServersImportFromLibvirtOptions{}, "servers-import-from-libvirt", "Import servers from libvrt", func(s *mcclient.ClientSession, args *ServersImportFromLibvirtOptions) error {
var (
rawConfig []byte
err error
)
rawConfig, err = ioutil.ReadFile(args.CONFIG_FILE)
if err != nil {
return fmt.Errorf("Read config file %s error: %s", args.CONFIG_FILE, err)
}
var (
params []jsonutils.JSONObject
config = &compute.SLibvirtImportConfig{}
)
// Try parse as json first
{
err = json.Unmarshal(rawConfig, config)
if err != nil {
goto YAML
}
for i := 0; i < len(config.Hosts); i++ {
if nIp := net.ParseIP(config.Hosts[i].HostIp); nIp == nil {
return fmt.Errorf("Parse host ip %s failed", config.Hosts[i].HostIp)
}
for _, server := range config.Hosts[i].Servers {
for mac, ip := range server.MacIp {
if _, err := net.ParseMAC(mac); err != nil {
return fmt.Errorf("Parse mac %s error %s", mac, err)
}
if nIp := net.ParseIP(ip); nIp == nil {
return fmt.Errorf("Parse ip %s failed", ip)
}
}
}
}
goto REQUEST
}
YAML: // Try Parse as yaml
{
yamlConfig := &LibvirtImportOptions{}
err = yaml.Unmarshal(rawConfig, yamlConfig)
if err != nil {
return err
}
config.Hosts = make([]compute.SLibvirtHostConfig, len(yamlConfig.Hosts))
for i := 0; i < len(yamlConfig.Hosts); i++ {
if nIp := net.ParseIP(yamlConfig.Hosts[i].HostIp); nIp == nil {
return fmt.Errorf("Parse host ip %s failed", yamlConfig.Hosts[i].HostIp)
}
config.Hosts[i].HostIp = yamlConfig.Hosts[i].HostIp
config.Hosts[i].XmlFilePath = yamlConfig.Hosts[i].XmlFilePath
config.Hosts[i].Servers = make([]compute.SLibvirtServerConfig, len(yamlConfig.Hosts[i].Servers))
for j := 0; j < len(yamlConfig.Hosts[i].Servers); j++ {
config.Hosts[i].Servers[j].MacIp = make(map[string]string)
mac := yamlConfig.Hosts[i].Servers[j].Mac
_, err := net.ParseMAC(mac)
if err != nil {
return fmt.Errorf("Parse mac address %s error %s", mac, err)
}
ip := yamlConfig.Hosts[i].Servers[j].Ip
nIp := net.ParseIP(ip)
if len(nIp) == 0 {
return fmt.Errorf("Parse ip address %s failed", ip)
}
config.Hosts[i].Servers[j].MacIp[mac] = ip
}
}
}
REQUEST:
params, err = jsonutils.Marshal(config.Hosts).GetArray()
if err != nil {
return err
}
for i := 0; i < len(params); i++ {
val := jsonutils.NewDict()
val.Set(modules.Servers.KeywordPlural, params[i])
params[i] = val
}
results := modules.Servers.BatchPerformClassAction(s, "import-from-libvirt", params)
printBatchResults(results, modules.Servers.GetColumns(s))
return nil
})
R(&options.ServerIdOptions{}, "server-create-params", "Show server create params", func(s *mcclient.ClientSession, opts *options.ServerIdOptions) error {
ret, e := modules.Servers.GetSpecific(s, opts.ID, "create-params", nil)
if e != nil {
return e
}
printObject(ret)
return nil
})
type ServerExportVirtInstallCommand struct {
ID string `help:"Server Id" json:"-"`
LibvirtBridge string `help:"Libvirt default bridge" json:"libvirt_bridge"`
ExtraCmdline []string `help:"Extra virt-install arguments add to script, eg:'--extra-args ...', '--console ...'" json:"extra_cmdline"`
}
R(&ServerExportVirtInstallCommand{}, "server-export-virt-install-command", "Export virt-install command line from existing guest", func(s *mcclient.ClientSession, args *ServerExportVirtInstallCommand) error {
params := jsonutils.NewDict()
if len(args.LibvirtBridge) > 0 {
params.Set("libvirt_bridge", jsonutils.NewString(args.LibvirtBridge))
}
if len(args.ExtraCmdline) > 0 {
params.Set("extra_cmdline", jsonutils.NewStringArray(args.ExtraCmdline))
}
result, err := modules.Servers.GetSpecific(s, args.ID, "virt-install", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -134,4 +134,25 @@ func init() {
printObject(result)
return nil
})
type ServerSkuSpecsListOptions struct {
Provider string `help:"List objects from the provider" choices:"OneCloud|VMware|Aliyun|Qcloud|Azure|Aws|Huawei|Openstack|Ucloud" json:"provider"`
PublicCloud *bool `help:"List objects belonging to public cloud" json:"public_cloud"`
Zone string `help:"zone Id or name"`
PostpaidStatus *string `help:"skus available status for postpaid instance" choices:"available|soldout"`
PrepaidStatus *string `help:"skus available status for prepaid instance" choices:"available|soldout"`
IngoreCache bool `help:"query without cache"`
}
R(&ServerSkuSpecsListOptions{}, "server-sku-specs-list", "List all avaiable Server SKU specifications", func(s *mcclient.ClientSession, args *ServerSkuSpecsListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.ServerSkus.Get(s, "instance-specs", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -79,4 +79,20 @@ func init() {
return nil
})
type SnapshotCreateOptions struct {
Disk string `help:"Id of disk to take snapshot" json:"disk" required:"true"`
NAME string `help:"Name of snapshot" json:"name"`
}
R(&SnapshotCreateOptions{}, "snapshot-create", "Create a snapshot", func(s *mcclient.ClientSession, args *SnapshotCreateOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
snapshot, err := modules.Snapshots.Create(s, params)
if err != nil {
return err
}
printObject(snapshot)
return nil
})
}

View File

@@ -17,6 +17,7 @@ func init() {
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv"`
Gpu bool `help:"Only show gpu devices"`
Zone string `help:"Filter by zone id or name"`
Occupied bool `help:"show occupid host" json:"-"`
}
R(&ListOptions{}, "spec", "List all kinds of model specs", func(s *mcclient.ClientSession, args *ListOptions) error {
var params *jsonutils.JSONDict
@@ -41,6 +42,9 @@ func init() {
if args.Zone != "" {
params.Add(jsonutils.NewString(args.Zone), "zone")
}
if args.Occupied {
params.Add(jsonutils.JSONFalse, "is_empty")
}
result, err := modules.Specs.GetModelSpecs(s, model, params)
if err != nil {
return err
@@ -53,10 +57,11 @@ func init() {
options.BaseListOptions
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv"`
Ncpu int64 `help:"#CPU count of host" metavar:"<CPU_COUNT>"`
MemSize string `help:"Memory GB size"`
MemSize int64 `help:"Memory MB size"`
DiskSpec []string `help:"Disk spec string, like 'Linux_adapter0_HDD_111Gx4'"`
Nic int64 `help:"#Nics count of host" metavar:"<NIC_COUNT>"`
GpuModel []string `help:"GPU model, like 'GeForce GTX 1050 Ti'"`
Occupied bool `help:"show occupid host" json:"-"`
}
R(&HostsQueryOptions{}, "spec-hosts-list", "List hosts according by specs", func(s *mcclient.ClientSession, args *HostsQueryOptions) error {
newHostSpecKeys := func() []string {
@@ -64,8 +69,11 @@ func init() {
if args.Ncpu > 0 {
keys = append(keys, fmt.Sprintf("cpu:%d", args.Ncpu))
}
if len(args.MemSize) != 0 {
keys = append(keys, fmt.Sprintf("mem:%s", args.MemSize))
if args.MemSize > 0 {
keys = append(keys, fmt.Sprintf("mem:%dM", args.MemSize))
}
if args.Nic > 0 {
keys = append(keys, fmt.Sprintf("nic:%d", args.Nic))
}
for _, gm := range args.GpuModel {
keys = append(keys, fmt.Sprintf("gpu_model:%s", gm))
@@ -87,6 +95,9 @@ func init() {
if len(args.HostType) > 0 {
params.Add(jsonutils.NewString(args.HostType), "host_type")
}
if args.Occupied {
params.Add(jsonutils.JSONFalse, "is_empty")
}
specKeys := newHostSpecKeys()
resp, err := modules.Specs.SpecsQueryModelObjects(s, "hosts", specKeys, params)
if err != nil {

View File

@@ -80,7 +80,7 @@ func init() {
ZONE string `help:"Zone id of storage"`
Capacity int64 `help:"Capacity of the Storage"`
MediumType string `help:"Medium type, either ssd or rotate" choices:"ssd|rotate"`
StorageType string `help:"Storage type" choices:"local|nas|vsan|rbd|nfs|baremetal"`
StorageType string `help:"Storage type" choices:"local|nas|vsan|rbd|nfs|gpfs|baremetal"`
MonHost string `help:"Ceph mon_host config"`
Key string `help:"Ceph key config"`
Pool string `help:"Ceph Poll Name"`
@@ -214,5 +214,4 @@ func init() {
printObject(storage)
return nil
})
}

View File

@@ -1,6 +1,8 @@
package shell
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -27,21 +29,29 @@ func init() {
})
type SUpdatePerformOptions struct {
Cmp bool `help:"update all the compute nodes automatically"`
Cmp bool `help:"update Controller And all the Compute nodes automatically"`
CmpOnly bool `help:"Updates only computes nodes, excluding controller nodes"`
}
R(&SUpdatePerformOptions{}, "update-perform", "Update the Controler", func(s *mcclient.ClientSession, args *SUpdatePerformOptions) error {
params := jsonutils.NewDict()
if args.Cmp {
params.Add(jsonutils.JSONTrue, "cmp")
if args.Cmp && args.CmpOnly {
return fmt.Errorf("--cmp and --cmp-only can't go together")
}
result, err := modules.Updates.List(s, nil)
if args.Cmp {
params.Add(jsonutils.JSONTrue, "cmp")
} else if args.CmpOnly {
params.Add(jsonutils.JSONTrue, "cmp_only")
}
modules.Updates.PerformAction(s, "", "", params)
result, err := modules.Updates.List(s, nil)
if err != nil {
return err
}
modules.Updates.DoUpdate(s, params)
printList(result, modules.Updates.GetColumns(s))
return nil
})

View File

@@ -5,17 +5,23 @@ import (
"net/url"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
o "yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/webconsole/command"
"yunion.io/x/onecloud/pkg/webconsole/session"
)
const (
DefaultWebconsoleServer = "https://console.yunion.cn/web-console"
)
func init() {
handleResult := func(opt o.WebConsoleOptions, obj jsonutils.JSONObject) error {
if opt.WebconsoleUrl == "" {
printObject(obj)
return nil
opt.WebconsoleUrl = DefaultWebconsoleServer
}
u, err := url.Parse(opt.WebconsoleUrl)
if err != nil {
@@ -25,6 +31,25 @@ func init() {
if err != nil {
return err
}
var query url.Values
connUrl, err := url.ParseRequestURI(connParams)
if err == nil {
query = connUrl.Query()
} else {
query, err = url.ParseQuery(connParams)
if err != nil {
return err
}
}
protocol := query.Get("protocol")
if !utils.IsInStringArray(protocol, []string{
command.PROTOCOL_TTY, session.VNC,
session.SPICE, session.WMKS,
}) {
fmt.Println(connParams)
return nil
}
u.RawQuery = connParams
fmt.Println(u.String())
return nil
@@ -66,7 +91,11 @@ func init() {
})
R(&o.WebConsoleSshOptions{}, "webconsole-ssh", "Connect ssh webconsole", func(s *mcclient.ClientSession, args *o.WebConsoleSshOptions) error {
ret, err := modules.WebConsole.DoSshConnect(s, args.IP, nil)
params, err := args.Params()
if err != nil {
return err
}
ret, err := modules.WebConsole.DoSshConnect(s, args.IP, params)
if err != nil {
return err
}

View File

@@ -1,7 +1,12 @@
package main
import "yunion.io/x/onecloud/pkg/cloudir/service"
import (
"yunion.io/x/onecloud/pkg/cloudir/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
service.StartService()
}

View File

@@ -1,7 +1,12 @@
package main
import "yunion.io/x/onecloud/pkg/cloutpost/service"
import (
"yunion.io/x/onecloud/pkg/cloutpost/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
service.StartService()
}

View File

@@ -74,7 +74,7 @@ func newClient(options *BaseOptions) (*esxi.SESXiClient, error) {
return nil, fmt.Errorf("Missing password")
}
return esxi.NewESXiClient("", "", options.Host, options.Port, options.Account, options.Password)
return esxi.NewESXiClient2("", "", options.Host, options.Port, options.Account, options.Password, false)
}
func main() {

View File

@@ -2,8 +2,11 @@ package main
import (
"yunion.io/x/onecloud/pkg/image/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
service.StartService()
}

View File

@@ -1,7 +1,12 @@
package main
import "yunion.io/x/onecloud/pkg/hostimage"
import (
"yunion.io/x/onecloud/pkg/hostimage"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
hostimage.StartService()
}

View File

@@ -1,8 +1,17 @@
package main
import "yunion.io/x/onecloud/pkg/hostman"
import (
"yunion.io/x/onecloud/pkg/cloudcommon/service"
"yunion.io/x/onecloud/pkg/hostman"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
var srv = hostman.SHostService{}
defer atexit.Handle()
var srv = &hostman.SHostService{}
srv.SServiceBase = &service.SServiceBase{
Service: srv,
}
srv.StartService()
}

View File

@@ -12,9 +12,12 @@ import (
app_common "yunion.io/x/onecloud/pkg/cloudcommon/app"
common_options "yunion.io/x/onecloud/pkg/cloudcommon/options"
"yunion.io/x/onecloud/pkg/lbagent"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
opts := &lbagent.Options{}
commonOpts := &opts.CommonOptions
{

View File

@@ -2,8 +2,11 @@ package main
import (
"yunion.io/x/onecloud/pkg/logger/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
service.StartService()
}

View File

@@ -20,6 +20,7 @@ type BaseOptions struct {
Password string `help:"Password" default:"$OPENSTACK_PASSWORD"`
Project string `help:"Project" default:"$OPENSTACK_PROJECT"`
EndpointType string `help:"Project" default:"$OPENSTACK_ENDPOINT_TYPE|internal"`
DomainName string `help:"DomainName" default:"$OPENSTACK_DOMAIN_NAME"`
RegionID string `help:"RegionId" default:"$OPENSTACK_REGION_ID"`
SUBCOMMAND string `help:"openstackcli subcommand" subcommand:"true"`
}
@@ -77,7 +78,7 @@ func newClient(options *BaseOptions) (*openstack.SRegion, error) {
return nil, fmt.Errorf("Missing Password")
}
cli, err := openstack.NewOpenStackClient("", "", options.AuthURL, options.Username, options.Password, options.Project, options.EndpointType, options.Debug)
cli, err := openstack.NewOpenStackClient("", "", options.AuthURL, options.Username, options.Password, options.Project, options.EndpointType, options.DomainName, options.Debug)
if err != nil {
return nil, err
}

View File

@@ -20,6 +20,7 @@ import (
_ "github.com/mholt/caddy/startupshutdown"
_ "yunion.io/x/onecloud/pkg/dns"
"yunion.io/x/onecloud/pkg/util/atexit"
)
var directives = []string{
@@ -44,5 +45,7 @@ func init() {
}
func main() {
defer atexit.Handle()
coremain.Run()
}

View File

@@ -2,8 +2,11 @@ package main
import (
"yunion.io/x/onecloud/pkg/compute/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
service.StartService()
}

View File

@@ -1,17 +1,20 @@
package main
import (
"os"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/scheduler/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
exitCode := 0
defer func() {
atexit.Exit(exitCode)
}()
if err := service.StartService(); err != nil {
log.Errorln(err)
os.Exit(-1)
exitCode = -1
}
os.Exit(0)
}

View File

@@ -19,6 +19,7 @@ import (
"yunion.io/x/pkg/util/version"
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/nodeid"
"yunion.io/x/onecloud/pkg/util/torrentutils"
@@ -48,6 +49,8 @@ func exitSignalHandlers(client *torrent.Client) {
}
func main() {
defer atexit.Handle()
options := Options{}
parser, err := structarg.NewArgumentParser(&options, "torrent-srv", "bit-torrent server", "2018")

View File

@@ -1,9 +1,12 @@
package main
import (
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/webconsole/service"
)
func main() {
defer atexit.Handle()
service.StartService()
}

View File

@@ -6,9 +6,12 @@ Yunion Conf Service
*/
import (
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/yunionconf/service"
)
func main() {
defer atexit.Handle()
service.StartService()
}

View File

@@ -0,0 +1,6 @@
package billing
const (
BILLING_TYPE_POSTPAID = "postpaid"
BILLING_TYPE_PREPAID = "prepaid"
)

1
pkg/apis/billing/doc.go Normal file
View File

@@ -0,0 +1 @@
package billing // import "yunion.io/x/onecloud/pkg/apis/billing"

View File

@@ -0,0 +1,15 @@
package compute
const (
BAREMETAL_AGENT_ENABLED = "enabled"
BAREMETAL_AGENT_DISABLED = "disabled"
BAREMETAL_AGENT_OFFLINE = "offline"
)
type TAgentType string
const (
AgentTypeBaremetal = TAgentType("baremetal")
AgentTypeEsxi = TAgentType("esxiagent")
AgentTypeDefault = AgentTypeBaremetal
)

View File

@@ -11,6 +11,7 @@ type SchedtagConfig struct {
Id string `json:"id"`
Strategy string `json:"strategy"`
Weight int `json:"weight"`
}
type NetworkConfig struct {
@@ -59,7 +60,7 @@ type DiskConfig struct {
Medium string `json:"medium"`
ImageProperties map[string]string `json:"image_properties"`
Storage string `json:"storage"`
Storage string `json:"storage_id"`
DiskId string `json:"disk_id"`
}
@@ -162,6 +163,24 @@ type ServerCreateInput struct {
// DEPRECATE or not used fields
Baremetal bool `json:"baremetal"`
// Used to store BaremetalConvertHypervisorTaskId
ParentTaskId string `json:"__parent_task_id,omitempty"`
// default stroage type if host is given
DefaultStorageType string `json:"default_storage_type,omitempty"`
}
type ServerCloneInput struct {
apis.Meta
Name string `json:"name"`
AutoStart bool `json:"auto_start"`
EipBw int `json:"eip_bw,omitzero"`
EipChargeType string `json:"eip_charge_type,omitempty"`
Eip string `json:"eip,omitempty"`
PreferHost string `json:"prefer_host_id"`
}
type ServerDeployInput struct {
@@ -170,7 +189,7 @@ type ServerDeployInput struct {
Id string
Keypair string `json:"keypair"`
DeleteKeypair bool `json:"__delete_keypair__"`
DeleteKeypair *bool `json:"__delete_keypair__"`
DeployConfigs []*DeployConfig `json:"deploy_configs"`
ResetPassword *bool `json:"reset_password"`
Password string `json:"password"`

View File

@@ -0,0 +1,17 @@
package compute
const (
CACHED_IMAGE_STATUS_INIT = "init"
CACHED_IMAGE_STATUS_SAVING = "saving"
CACHED_IMAGE_STATUS_CACHING = "caching"
CACHED_IMAGE_STATUS_READY = "ready"
CACHED_IMAGE_STATUS_DELETING = "deleting"
CACHED_IMAGE_STATUS_CACHE_FAILED = "cache_fail"
DOWNLOAD_SESSION_LENGTH = 3600 * 3 // 3 hour
)
const (
CACHED_IMAGE_REFRESH_SECONDS = 900 // 15 minutes
CACHED_IMAGE_REFERENCE_SESSION_EXPIRE_SECONDS = 86400 // 1 day
)

View File

@@ -0,0 +1,57 @@
package compute
const (
CLOUD_PROVIDER_INIT = "init"
CLOUD_PROVIDER_CONNECTED = "connected"
CLOUD_PROVIDER_DISCONNECTED = "disconnected"
CLOUD_PROVIDER_START_DELETE = "start_delete"
CLOUD_PROVIDER_DELETING = "deleting"
CLOUD_PROVIDER_DELETED = "deleted"
CLOUD_PROVIDER_DELETE_FAILED = "delete_failed"
CLOUD_PROVIDER_SYNC_STATUS_QUEUED = "queued"
CLOUD_PROVIDER_SYNC_STATUS_SYNCING = "syncing"
CLOUD_PROVIDER_SYNC_STATUS_IDLE = "idle"
CLOUD_PROVIDER_ONECLOUD = "OneCloud"
CLOUD_PROVIDER_VMWARE = "VMware"
CLOUD_PROVIDER_ALIYUN = "Aliyun"
CLOUD_PROVIDER_QCLOUD = "Qcloud"
CLOUD_PROVIDER_AZURE = "Azure"
CLOUD_PROVIDER_AWS = "Aws"
CLOUD_PROVIDER_HUAWEI = "Huawei"
CLOUD_PROVIDER_OPENSTACK = "OpenStack"
CLOUD_PROVIDER_UCLOUD = "Ucloud"
CLOUD_PROVIDER_HEALTH_NORMAL = "normal" // 远端处于健康状态
CLOUD_PROVIDER_HEALTH_INSUFFICIENT = "insufficient" // 不足按需资源余额
CLOUD_PROVIDER_HEALTH_SUSPENDED = "suspended" // 远端处于冻结状态
CLOUD_PROVIDER_HEALTH_ARREARS = "arrears" // 远端处于欠费状态
CLOUD_PROVIDER_HEALTH_UNKNOWN = "unknown" // 未知状态,查询失败
CLOUD_PROVIDER_HEALTH_NO_PERMISSION = "no permission" // 没有权限获取账单信息
)
var (
CLOUD_PROVIDER_VALID_STATUS = []string{CLOUD_PROVIDER_CONNECTED}
CLOUD_PROVIDER_VALID_HEALTH_STATUS = []string{CLOUD_PROVIDER_HEALTH_NORMAL, CLOUD_PROVIDER_HEALTH_NO_PERMISSION}
CLOUD_PROVIDERS = []string{
CLOUD_PROVIDER_ONECLOUD,
CLOUD_PROVIDER_VMWARE,
CLOUD_PROVIDER_ALIYUN,
CLOUD_PROVIDER_QCLOUD,
CLOUD_PROVIDER_AZURE,
CLOUD_PROVIDER_AWS,
CLOUD_PROVIDER_HUAWEI,
CLOUD_PROVIDER_OPENSTACK,
CLOUD_PROVIDER_UCLOUD,
}
)
const (
CLOUD_ENV_PUBLIC_CLOUD = "public"
CLOUD_ENV_PRIVATE_CLOUD = "private"
CLOUD_ENV_ON_PREMISE = "onpremise"
CLOUD_ENV_PRIVATE_ON_PREMISE = "private_or_onpremise"
)

View File

@@ -0,0 +1,142 @@
package compute
const (
CLOUD_REGION_STATUS_INSERVER = "inservice"
CLOUD_REGION_STATUS_OUTOFSERVICE = "outofservice"
DEFAULT_REGION_ID = "default"
// 中国
CITY_QING_DAO = "Qingdao" //青岛
CITY_BEI_JING = "Beijing" //北京
CITY_ZHANG_JIA_KOU = "Zhangjiakou" //张家口
CITY_HU_HE_HAO_TE = "Huhehaote" //呼和浩特
CITY_HANG_ZHOU = "Hangzhou" //杭州
CITY_SHANG_HAI = "Shanghai" //上海
CITY_SHEN_ZHEN = "Shenzhen" //深圳
CITY_HONG_KONG = "Hongkong" //香港
CITY_NING_XIA = "Ningxia" //宁夏
CITY_GUANG_ZHOU = "Guangzhou" //广州
CITY_GUI_YANG = "Guiyang" //贵阳
CITY_TAIPEI = "Taipei" //台北市
CITY_KAOHSIUNG = "Kaohsiung" //高雄市
CITY_CHENG_DU = "Chengdu" //成都
CITY_CHONG_QING = "Chongqing" //重庆
// 日本
CITY_TOKYO = "Tokyo" //东京
CITY_OSAKA = "Osaka" //大阪市
// 新加坡
CITY_SINGAPORE = "Singapore" //新加坡
// 澳大利亚
CITY_SYDNEY = "Sydney" //悉尼
CITY_YARRALUMLA = "Yarralumla" //亚拉伦拉
CITY_MELBOURNE = "Melbourne" //墨尔本
// 马来西亚
CITY_KUALA_LUMPUR = "Kuala Lumpur" //吉隆坡
// 印度尼西亚
CITY_JAKARTA = "Jakarta" //雅加达
// 印度
CITY_MUMBAI = "Mumbai" //孟买
CITY_KANCHIPURAM = "Kanchipuram" //甘吉布勒姆
CITY_MAHARASHTRA = "Maharashtra" //马哈拉施特拉邦
// 美国
CITY_VIRGINIA = "Virginia" //弗吉尼亚
CITY_SILICONVALLEY = "Siliconvalley" //硅谷
CITY_OHIO = "Ohio" //俄亥俄州
CITY_N_VIRGINIA = "N. Virginia" //北弗吉尼亚
CITY_N_CALIFORNIA = "N. California" //北加州
CITY_OREGON = "Oregon" //俄勒冈州
CITY_LOS_ANGELES = "Los Angeles" //洛杉矶
CITY_SAN_FRANCISCO = "San Francisco" //旧金山
CITY_UTAH = "Utah" //犹他州
CITY_WASHINGTON = "Washington" //华盛顿
CITY_TEXAS = "Texas" //德克萨斯
CITY_CHICAGO = "Chicago" //芝加哥
CITY_IOWA = "Iowa" //爱荷华
CITY_US_GOV_WEST = "us-gov-west" //???
// 英国
CITY_LONDON = "London" //伦敦
CITY_HALTON = "Halton" //哈尔顿
CITY_WEST_SUSSEX = "West Sussex" //西苏塞克斯
// 阿拉伯联合酋长国
CITY_DUBAI = "Dubai" //迪拜
// 德国
CITY_FRANKFURT = "Frankfurt" //法兰克福
// 韩国
CITY_SEOUL = "Seoul" //首尔
CITY_BUSAN = "Busan" //釜山
// 加拿大
CITY_CANADA_CENTRAL = "Canada Central" //加拿大中部
CITY_QUEBEC = "Quebec" //魁北克市
CITY_TORONTO = "Toronto" //多伦多
// 爱尔兰
CITY_IRELAND = "Ireland" //爱尔兰
CITY_DUBLIN = "Dublin" //都柏林
// 法国
CITY_PARIS = "Paris" //巴黎
CITY_ALLIER = "Allier" //阿利埃河
CITY_TARN = "Tarn" //塔恩
// 瑞典
CITY_STOCKHOLM = "Stockholm" //斯德哥尔摩
// 巴西
CITY_SAO_PAULO = "Sao Paulo" //圣保罗
// 荷兰
CITY_HOLLAND = "Holland" //荷兰
// 南非
CITY_PRETORIA = "Pretoria" //比勒陀利亚
CITY_CAPE_TOWN = "Cape Town" //开普敦
// 泰国
CITY_BANGKOK = "Bangkok" //曼谷
// 俄罗斯
CITY_MOSCOW = "Moscow" //莫斯科
// 尼日利亚
CITY_LAGOS = "Lagos" //拉哥斯
// 越南
CITY_HO_CHI_MINH = "Ho Chi Minh" //???
COUNTRY_CODE_CN = "CN" //中国
COUNTRY_CODE_JP = "JP" //日本
COUNTRY_CODE_SG = "SG" //新加坡
COUNTRY_CODE_AU = "AU" //澳大利亚
COUNTRY_CODE_MY = "MY" //马来西亚
COUNTRY_CODE_ID = "ID" //印度尼西亚
COUNTRY_CODE_IN = "IN" //印度
COUNTRY_CODE_US = "US" //美国
COUNTRY_CODE_GB = "GB" //英国
COUNTRY_CODE_AE = "AE" //阿拉伯联合酋长国
COUNTRY_CODE_DE = "DE" //德国
COUNTRY_CODE_KR = "KR" //韩国
COUNTRY_CODE_CA = "CA" //加拿大
COUNTRY_CODE_IE = "IE" //爱尔兰
COUNTRY_CODE_FR = "FR" //法国
COUNTRY_CODE_SE = "SE" //瑞典
COUNTRY_CODE_BR = "BR" //巴西
COUNTRY_CODE_NL = "NL" //荷兰
COUNTRY_CODE_ZA = "ZA" //南非
COUNTRY_CODE_TH = "TH" //泰国
COUNTRY_CODE_RU = "RU" //俄罗斯
COUNTRY_CODE_NG = "NG" //尼日利亚
COUNTRY_CODE_VN = "VN" //越南
)

View File

@@ -37,4 +37,6 @@ const (
DISK_TYPE_VOLUME = "volume"
DISK_BACKING_IMAGE = "image"
DISK_SIZE_AUTOEXTEND = -1
)

View File

@@ -0,0 +1,25 @@
package compute
const (
EIP_MODE_INSTANCE_PUBLICIP = "public_ip"
EIP_MODE_STANDALONE_EIP = "elastic_ip"
EIP_ASSOCIATE_TYPE_SERVER = "server"
EIP_STATUS_READY = "ready"
EIP_STATUS_UNKNOWN = "unknown"
EIP_STATUS_ALLOCATE = "allocate"
EIP_STATUS_ALLOCATE_FAIL = "allocate_fail"
EIP_STATUS_DEALLOCATE = "deallocate"
EIP_STATUS_DEALLOCATE_FAIL = "deallocate_fail"
EIP_STATUS_ASSOCIATE = "associate"
EIP_STATUS_ASSOCIATE_FAIL = "associate_fail"
EIP_STATUS_DISSOCIATE = "dissociate"
EIP_STATUS_DISSOCIATE_FAIL = "dissociate_fail"
EIP_STATUS_CHANGE_BANDWIDTH = "change_bandwidth"
EIP_CHARGE_TYPE_BY_TRAFFIC = "traffic"
EIP_CHARGE_TYPE_BY_BANDWIDTH = "bandwidth"
EIP_CHARGE_TYPE_DEFAULT = EIP_CHARGE_TYPE_BY_TRAFFIC
)

View File

@@ -0,0 +1,5 @@
package compute
const (
ESXI_IMAGE_CACHE_TMP_PREFIX = "yunioncloud.imagecache"
)

View File

@@ -22,6 +22,8 @@ const (
VM_START_STOP = "start_stop"
VM_STOPPING = "stopping"
VM_STOP_FAILED = "stop_fail" // # = running
VM_RENEWING = "renewing"
VM_RENEW_FAILED = "renew_failed"
VM_BACKUP_STARTING = "backup_starting"
VM_BACKUP_CREATING = "backup_creating"
@@ -56,13 +58,13 @@ const (
VM_REBUILD_ROOT = "rebuild_root"
VM_REBUILD_ROOT_FAIL = "rebuild_root_fail"
VM_START_SNAPSHOT = "snapshot_start"
VM_SNAPSHOT = "snapshot"
VM_SNAPSHOT_DELETE = "snapshot_delete"
VM_BLOCK_STREAM = "block_stream"
VM_MIRROR_FAIL = "mirror_failed"
VM_SNAPSHOT_SUCC = "snapshot_succ"
VM_SNAPSHOT_FAILED = "snapshot_failed"
VM_START_SNAPSHOT = "snapshot_start"
VM_SNAPSHOT = "snapshot"
VM_SNAPSHOT_DELETE = "snapshot_delete"
VM_BLOCK_STREAM = "block_stream"
VM_BLOCK_STREAM_FAIL = "block_stream_fail"
VM_SNAPSHOT_SUCC = "snapshot_succ"
VM_SNAPSHOT_FAILED = "snapshot_failed"
VM_SYNCING_STATUS = "syncing"
VM_SYNC_CONFIG = "sync_config"
@@ -88,6 +90,9 @@ const (
VM_ADMIN = "admin"
VM_IMPORT = "import"
VM_IMPORT_FAILED = "import_fail"
SHUTDOWN_STOP = "stop"
SHUTDOWN_TERMINATE = "terminate"
@@ -165,3 +170,18 @@ var HOSTTYPE_HYPERVISOR = map[string]string{
HOST_TYPE_OPENSTACK: HYPERVISOR_OPENSTACK,
HOST_TYPE_UCLOUD: HYPERVISOR_UCLOUD,
}
const (
VM_AWS_DEFAULT_LOGIN_USER = "ec2user"
VM_AZURE_DEFAULT_LOGIN_USER = "toor"
VM_METADATA_APP_TAGS = "app_tags"
VM_METADATA_CREATE_PARAMS = "create_params"
VM_METADATA_LOGIN_ACCOUNT = "login_account"
VM_METADATA_LOGIN_KEY = "login_key"
VM_METADATA_LOGIN_KEY_TIMESTAMP = "login_key_timestamp"
VM_METADATA_OS_ARCH = "os_arch"
VM_METADATA_OS_DISTRO = "os_distribution"
VM_METADATA_OS_NAME = "os_name"
VM_METADATA_OS_VERSION = "os_version"
)

View File

@@ -0,0 +1,72 @@
package compute
type SImportNic struct {
Index int `json:"index"`
Bridge string `json:"bridge"`
Domain string `json:"domain"`
Ip string `json:"ip"`
Vlan int `json:"vlan"`
Driver string `json:"driver"`
Masklen int `json:"masklen"`
Virtual bool `json:"virtual"`
Manual bool `json:"manual"`
WireId string `json:"wire_id"`
NetId string `json:"net_id"`
Mac string `json:"mac"`
BandWidth int `json:"bw"`
Dns string `json:"dns"`
Net string `json:"net"`
Interface string `json:"interface"`
Gateway string `json:"gateway"`
Ifname string `json:"ifname"`
}
type SImportDisk struct {
Index int `json:"index"`
DiskId string `json:"disk_id"`
Driver string `json:"driver"`
CacheMode string `json:"cache_mode"`
AioMode string `json:"aio_mode"`
SizeMb int `json:"size"`
Format string `json:"format"`
Fs string `json:"fs"`
Mountpoint string `json:"mountpoint"`
Dev string `json:"dev"`
TemplateId string `json:"template_id"`
AccessPath string `json:"AccessPath"`
Backend string `json:"Backend"`
}
type SImportGuestDesc struct {
Id string `json:"uuid"`
Name string `json:"name"`
Nics []SImportNic `json:"nics"`
Disks []SImportDisk `json:"disks"`
Metadata map[string]string `json:"metadata"`
MemSizeMb int `json:"mem"`
Cpu int `json:"cpu"`
TemplateId string `json:"template_id"`
ImagePath string `json:"image_path"`
Vdi string `json:"vdi"`
Hypervisor string `json:"hypervisor"`
HostId string `json:"host"`
BootOrder string `json:"boot_order"`
IsSystem bool `json:"is_system"`
Description string `json:"description"`
MonitorPath string `json:"monitor_path"`
}
type SLibvirtServerConfig struct {
MacIp map[string]string `json:"mac_ip"`
}
type SLibvirtHostConfig struct {
Servers []SLibvirtServerConfig `json:"servers"`
XmlFilePath string `json:"xml_file_path"`
MonitorPath string `json:"monitor_path"`
HostIp string `json:"host_ip"`
}
type SLibvirtImportConfig struct {
Hosts []SLibvirtHostConfig `json:"hosts"`
}

45
pkg/apis/compute/host.go Normal file
View File

@@ -0,0 +1,45 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
)
type HostSpec struct {
apis.Meta
Cpu int `json:"cpu"`
Mem int `json:"mem"`
NicCount int `json:"nic_count"`
Manufacture string `json:"manufacture"`
Model string `json:"model"`
Disk DiskDriverSpec `json:"disk"`
Driver string `json:"driver"`
}
type DiskDriverSpec map[string]DiskAdapterSpec
type DiskAdapterSpec map[string][]*DiskSpec
type DiskSpec struct {
apis.Meta
Type string `json:"type"`
Size int64 `json:"size"`
StartIndex int `json:"start_index"`
EndIndex int `json:"end_index"`
Count int `json:"count"`
}

View File

@@ -66,6 +66,31 @@ var LB_BACKENDGROUP_TYPE = choices.NewChoices(
LB_BACKENDGROUP_TYPE_MASTER_SLAVE,
)
const (
LB_ALIYUN_SPEC_SHAREABLE = "" //性能共享型
LB_ALIYUN_SPEC_S1_SMALL = "slb.s1.small"
LB_ALIYUN_SPEC_S2_SMALL = "slb.s2.small"
LB_ALIYUN_SPEC_S3_SMALL = "slb.s3.small"
LB_ALIYUN_SPEC_S2_MEDIUM = "slb.s2.medium"
LB_ALIYUN_SPEC_S3_MEDIUM = "slb.s3.medium"
LB_ALIYUN_SPEC_S3_LARGE = "slb.s3.large"
)
const (
LB_MbpsMin = 0
LB_MbpsMax = 10000
)
var LB_ALIYUN_SPECS = choices.NewChoices(
LB_ALIYUN_SPEC_SHAREABLE,
LB_ALIYUN_SPEC_S1_SMALL,
LB_ALIYUN_SPEC_S2_SMALL,
LB_ALIYUN_SPEC_S3_SMALL,
LB_ALIYUN_SPEC_S2_MEDIUM,
LB_ALIYUN_SPEC_S3_MEDIUM,
LB_ALIYUN_SPEC_S3_LARGE,
)
// Load Balancer network type (vpc or classic) determines viable backend
// servers (they should be from the same network type as the load balancer).
//
@@ -217,6 +242,7 @@ const (
LB_SCHEDULER_WLC = "wlc" // weighted least connection
LB_SCHEDULER_SCH = "sch" // source-ip-based consistent hash
LB_SCHEDULER_TCH = "tch" // 4-tuple-based consistent hash
LB_SCHEDULER_QCH = "qch"
)
var LB_SCHEDULER_TYPES = choices.NewChoices(
@@ -227,15 +253,32 @@ var LB_SCHEDULER_TYPES = choices.NewChoices(
LB_SCHEDULER_TCH,
)
var LB_ALIYUN_UDP_SCHEDULER_TYPES = choices.NewChoices(
LB_SCHEDULER_RR,
LB_SCHEDULER_WRR,
LB_SCHEDULER_WLC,
LB_SCHEDULER_SCH,
LB_SCHEDULER_TCH,
LB_SCHEDULER_QCH,
)
var LB_ALIYUN_COMMON_SCHEDULER_TYPES = choices.NewChoices(
LB_SCHEDULER_RR,
LB_SCHEDULER_WRR,
LB_SCHEDULER_WLC,
)
// TODO raw type
const (
LB_BACKEND_GUEST = "guest"
LB_BACKEND_HOST = "host"
LB_BACKEND_IP = "ip"
)
var LB_BACKEND_TYPES = choices.NewChoices(
LB_BACKEND_GUEST,
LB_BACKEND_HOST,
LB_BACKEND_IP,
)
const (
@@ -256,6 +299,12 @@ const (
LB_CHARGE_TYPE_BY_HOUR = "hour"
)
var LB_CHARGE_TYPES = choices.NewChoices(
LB_CHARGE_TYPE_BY_TRAFFIC,
LB_CHARGE_TYPE_BY_BANDWIDTH,
LB_CHARGE_TYPE_BY_HOUR,
)
const (
LB_HA_STATE_MASTER = "MASTER"
LB_HA_STATE_BACKUP = "BACKUP"

View File

@@ -35,4 +35,9 @@ var (
NETWORK_TYPE_PXE,
NETWORK_TYPE_IPMI,
}
REGINAL_NETWORK_PROVIDERS = []string{
CLOUD_PROVIDER_HUAWEI,
CLOUD_PROVIDER_UCLOUD,
}
)

View File

@@ -0,0 +1,28 @@
package compute
const (
SkuCategoryGeneralPurpose = "general_purpose" // 通用型
SkuCategoryBurstable = "burstable" // 突发性能型
SkuCategoryComputeOptimized = "compute_optimized" // 计算优化型
SkuCategoryMemoryOptimized = "memory_optimized" // 内存优化型
SkuCategoryStorageIOOptimized = "storage_optimized" // 存储IO优化型
SkuCategoryHardwareAccelerated = "hardware_accelerated" // 硬件加速型
SkuCategoryHighStorage = "high_storage" // 高存储型
SkuCategoryHighMemory = "high_memory" // 高内存型
)
const (
SkuStatusAvailable = "available"
SkuStatusSoldout = "soldout"
)
var InstanceFamilies = map[string]string{
SkuCategoryGeneralPurpose: "g1",
SkuCategoryBurstable: "t1",
SkuCategoryComputeOptimized: "c1",
SkuCategoryMemoryOptimized: "r1",
SkuCategoryStorageIOOptimized: "i1",
SkuCategoryHardwareAccelerated: "",
SkuCategoryHighStorage: "hc1",
SkuCategoryHighMemory: "hr1",
}

View File

@@ -0,0 +1,14 @@
package compute
const (
// create by
SNAPSHOT_MANUAL = "manual"
SNAPSHOT_AUTO = "auto"
SNAPSHOT_CREATING = "creating"
SNAPSHOT_ROLLBACKING = "rollbacking"
SNAPSHOT_FAILED = "create_failed"
SNAPSHOT_READY = "ready"
SNAPSHOT_DELETING = "deleting"
SNAPSHOT_UNKNOWN = "unknown"
)

View File

@@ -9,6 +9,7 @@ const (
STORAGE_NAS = "nas"
STORAGE_VSAN = "vsan"
STORAGE_NFS = "nfs"
STORAGE_GPFS = "gpfs"
STORAGE_PUBLIC_CLOUD = "cloud"
STORAGE_CLOUD_EFFICIENCY = "cloud_efficiency"
@@ -69,7 +70,7 @@ var (
STORAGE_ALL_TYPES = []string{
STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_SHEEPDOG,
STORAGE_RBD, STORAGE_DOCKER, STORAGE_NAS, STORAGE_VSAN,
STORAGE_NFS,
STORAGE_NFS, STORAGE_GPFS,
}
STORAGE_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_SHEEPDOG,
STORAGE_RBD, STORAGE_DOCKER, STORAGE_NAS, STORAGE_VSAN, STORAGE_NFS,
@@ -80,7 +81,15 @@ var (
STORAGE_HUAWEI_SSD, STORAGE_HUAWEI_SAS, STORAGE_HUAWEI_SATA,
STORAGE_OPENSTACK_ISCSI, STORAGE_UCLOUD_CLOUD_NORMAL, STORAGE_UCLOUD_CLOUD_SSD,
STORAGE_UCLOUD_LOCAL_NORMAL, STORAGE_UCLOUD_LOCAL_SSD, STORAGE_UCLOUD_EXCLUSIVE_LOCAL_DISK,
STORAGE_GPFS,
}
STORAGE_LIMITED_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_NAS, STORAGE_RBD, STORAGE_NFS}
HOST_STORAGE_LOCAL_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL}
STORAGE_LIMITED_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_NAS, STORAGE_RBD, STORAGE_NFS, STORAGE_GPFS}
SHARED_FILE_STORAGE = []string{STORAGE_NFS, STORAGE_GPFS}
// 目前来说只支持这些
SHARED_STORAGE = []string{STORAGE_NFS, STORAGE_GPFS, STORAGE_RBD}
)

View File

@@ -0,0 +1,17 @@
package compute
const (
VPC_STATUS_PENDING = "pending"
VPC_STATUS_AVAILABLE = "available"
VPC_STATUS_FAILED = "failed"
VPC_STATUS_START_DELETE = "start_delete"
VPC_STATUS_DELETING = "deleting"
VPC_STATUS_DELETE_FAILED = "delete_failed"
VPC_STATUS_DELETED = "deleted"
VPC_STATUS_UNKNOWN = "unknown"
MAX_VPC_PER_REGION = 3
DEFAULT_VPC_ID = "default"
NORMAL_VPC_ID = "normal" // 没有关联VPC的安全组统一使用normal
)

View File

@@ -0,0 +1,9 @@
package compute
const (
ZONE_INIT = "init"
ZONE_ENABLE = "enable"
ZONE_DISABLE = "disable"
ZONE_SOLDOUT = "soldout"
// ZONE_LACK = "lack"
)

26
pkg/apis/image/consts.go Normal file
View File

@@ -0,0 +1,26 @@
package image
type TImageType string
const (
// https://docs.openstack.org/glance/pike/user/statuses.html
//
IMAGE_STATUS_QUEUED = "queued"
IMAGE_STATUS_SAVING = "saving"
IMAGE_STATUS_ACTIVE = "active"
IMAGE_STATUS_CONVERTING = "converting"
IMAGE_STATUS_DEACTIVATED = "deactivated"
IMAGE_STATUS_KILLED = "killed"
IMAGE_STATUS_DELETED = "deleted"
IMAGE_STATUS_PENDING_DELETE = "pending_delete"
ImageTypeTemplate = TImageType("image")
ImageTypeISO = TImageType("iso")
LocalFilePrefix = "file://"
)
var (
ImageDeadStatus = []string{IMAGE_STATUS_DEACTIVATED, IMAGE_STATUS_KILLED, IMAGE_STATUS_DELETED, IMAGE_STATUS_PENDING_DELETE}
)

View File

@@ -38,9 +38,6 @@ type ServerConfig struct {
Name string `json:"name"`
GuestStatus string `json:"guest_status"`
// HostId used by migrate
HostId string `json:"host_id"`
// DEPRECATED
Metadata map[string]string `json:"__meta__"`
ForGuests []*ForGuest `json:"for_guests"`
@@ -56,6 +53,12 @@ type ScheduleInput struct {
ScheduleBaseConfig
ServerConfig
// HostId used by migrate
HostId string `json:"host_id"`
LiveMigrate bool `json:"live_migrate"`
CpuDesc string `json:"cpu_desc"`
CpuMicrocode string `json:"cpu_microcode"`
}
func (input ScheduleInput) ToConditionInput() *jsonutils.JSONDict {
@@ -66,19 +69,18 @@ func (input ScheduleInput) ToConditionInput() *jsonutils.JSONDict {
}
type CandidateDisk struct {
Index int `json:"index"`
StorageId string `json:"storage_id"`
Index int `json:"index"`
StorageIds []string `json:"storage_ids"`
}
type CandidateResource struct {
HostId string `json:"host_id"`
Name string `json:"name"`
Disks []*CandidateDisk `json:"disks"`
SessionId string `json:"session_id"`
HostId string `json:"host_id"`
Name string `json:"name"`
Disks []*CandidateDisk `json:"disks"`
// used by backup schedule
BackupCandidate *CandidateResource `json:"backup_candidate"`
IsMaster bool `json:"is_master"`
IsSlave bool `json:"is_slave"`
// Error means no candidate found, include reasons
Error string `json:"error"`

View File

@@ -1,9 +1,11 @@
package appsrv
import (
"bufio"
"context"
"fmt"
"math/rand"
"net"
"net/http"
"os"
"strings"
@@ -27,6 +29,7 @@ type Application struct {
name string
context context.Context
session *SWorkerManager
readSession *SWorkerManager
systemSession *SWorkerManager
roots map[string]*RadixNode
rootLock *sync.RWMutex
@@ -60,6 +63,7 @@ func NewApplication(name string, connMax int, db bool) *Application {
context: context.Background(),
connMax: connMax,
session: NewWorkerManager("HttpRequestWorkerManager", connMax, DEFAULT_BACKLOG, db),
readSession: NewWorkerManager("HttpGetRequestWorkerManager", connMax, DEFAULT_BACKLOG, db),
systemSession: NewWorkerManager("InternalHttpRequestWorkerManager", 1, DEFAULT_BACKLOG, false),
roots: make(map[string]*RadixNode),
rootLock: &sync.RWMutex{},
@@ -141,6 +145,13 @@ type loggingResponseWriter struct {
status int
}
func (lrw *loggingResponseWriter) Hijack() (rwc net.Conn, buf *bufio.ReadWriter, err error) {
if f, ok := lrw.ResponseWriter.(http.Hijacker); ok {
return f.Hijack()
}
return nil, nil, fmt.Errorf("not a hijacker")
}
func (lrw *loggingResponseWriter) WriteHeader(code int) {
if code < 100 || code >= 600 {
log.Errorf("Invalud status code %d, set code to 598", code)
@@ -208,7 +219,7 @@ func (app *Application) handleCORS(w http.ResponseWriter, r *http.Request) bool
}
func (app *Application) defaultHandle(w http.ResponseWriter, r *http.Request, rid string) (*SHandlerInfo, *SAppParams) {
segs := SplitPath(r.URL.Path)
segs := SplitPath(r.URL.EscapedPath())
params := make(map[string]string)
w.Header().Set("Server", "Yunion AppServer/Go/2018.4")
w.Header().Set("X-Frame-Options", "SAMEORIGIN")
@@ -220,7 +231,7 @@ func (app *Application) defaultHandle(w http.ResponseWriter, r *http.Request, ri
if ok {
fw := newResponseWriterChannel(w)
worker := make(chan *SWorker)
to := hand.processTimeout
to := hand.FetchProcessTimeout(r)
if to == 0 {
to = app.processTimeout
}
@@ -228,7 +239,11 @@ func (app *Application) defaultHandle(w http.ResponseWriter, r *http.Request, ri
defer cancel()
session := hand.workerMan
if session == nil {
session = app.session
if r.Method == "GET" || r.Method == "HEAD" {
session = app.readSession
} else {
session = app.session
}
}
appParams := hand.GetAppParams(params, segs)
appParams.Request = r

View File

@@ -27,6 +27,14 @@ type SHandlerInfo struct {
skipLog bool
}
func (this *SHandlerInfo) FetchProcessTimeout(r *http.Request) time.Duration {
if r.Method == http.MethodGet && len(r.URL.Query().Get("export_keys")) > 0 {
return time.Hour * 2
} else {
return this.processTimeout
}
}
func (this *SHandlerInfo) GetName(params map[string]string) string {
if len(this.name) > 0 {
return this.name

View File

@@ -1,8 +1,10 @@
package appsrv
import (
"bufio"
"context"
"fmt"
"net"
"net/http"
"yunion.io/x/onecloud/pkg/httperrors"
@@ -66,6 +68,18 @@ func (w *responseWriterChannel) Flush() {
}
}
// Hijack implements the Hijacker.Hijack method. Our response is both a ResponseWriter
// and a Hijacker.
func (w *responseWriterChannel) Hijack() (rwc net.Conn, buf *bufio.ReadWriter, err error) {
if w.isClosed {
return nil, nil, fmt.Errorf("response stream has been closed")
}
if f, ok := w.backend.(http.Hijacker); ok {
return f.Hijack()
}
return nil, nil, fmt.Errorf("not a hijacker")
}
func (w *responseWriterChannel) wait(ctx context.Context, workerChan chan *SWorker) interface{} {
var err error
var worker *SWorker

View File

@@ -208,7 +208,7 @@ func (wm *SWorkerManager) scheduleWithLock() {
log.Debugf("no enough worker, add new worker %s", worker)
}
go worker.run()
} else {
} else if wm.queue.Size() > 10 {
log.Warningf("[%s] BUSY activeWork %d detachedWork %d max %d queue: %d", wm, wm.ActiveWorkerCount(), wm.DetachedWorkerCount(), wm.workerCount, wm.queue.Size())
}
}

View File

@@ -677,15 +677,24 @@ func (b *SBaremetalInstance) GetNotifyUrl() string {
}
func (b *SBaremetalInstance) GetTFTPResponse() string {
return fmt.Sprintf(
`default start
resp := `default start
serial 1 115200
label start
menu label ^Start
menu default
kernel kernel
append initrd=initramfs token=%s url=%s`,
auth.GetTokenString(), b.GetNotifyUrl())
`
if b.NeedPXEBoot() {
resp += " kernel kernel\n"
resp += fmt.Sprintf(" append initrd=initramfs token=%s url=%s",
auth.GetTokenString(), b.GetNotifyUrl())
} else {
resp += " COM32 chain.c32\n"
resp += " APPEND hd0 0\n"
}
log.Infof("%s", resp)
return resp
}
func (b *SBaremetalInstance) GetTaskQueue() *tasks.TaskQueue {
@@ -920,6 +929,7 @@ func (b *SBaremetalInstance) DoPXEBoot() error {
return fmt.Errorf("Baremetal %s ipmitool is nil", b.GetId())
}
/*
func (b *SBaremetalInstance) DoDiskBoot() error {
log.Infof("Do DISK Boot ........., wait")
b.ClearSSHConfig()
@@ -929,6 +939,7 @@ func (b *SBaremetalInstance) DoDiskBoot() error {
}
return fmt.Errorf("Baremetal %s ipmitool is nil", b.GetId())
}
*/
func (b *SBaremetalInstance) GetPowerStatus() (string, error) {
ipmiCli := b.GetIPMITool()
@@ -1005,7 +1016,7 @@ func (b *SBaremetalInstance) StartBaremetalResetBMCTask(userCred mcclient.TokenC
}
func (b *SBaremetalInstance) DelayedServerReset(_ jsonutils.JSONObject) (jsonutils.JSONObject, error) {
err := b.DoDiskBoot()
err := b.DoPXEBoot()
return nil, err
}

View File

@@ -18,7 +18,8 @@ type BaremetalOptions struct {
DhcpRenewalTime int `default:"67108864" help:"DHCP renewal time in seconds"` // 0x4000000
EnableGeneralGuestDhcp bool `default:"false" help:"Enable DHCP service for general guest, e.g. those on VMware ESXi or Xen"`
ForceDhcpProbeIpmi bool `default:"false" help:"Force DHCP probe IPMI interface network connection"`
TftpMaxTimeoutRetries int `default:"20" help:"Maximal tftp timeout retries, default is 20"`
TftpBlockSizeInBytes int `default:"1024" help:"tftp block size, default is 1024"`
TftpMaxTimeoutRetries int `default:"50" help:"Maximal tftp timeout retries, default is 50"`
LengthyWorkerCount int `default:"8" help:"Parallel worker count for lengthy tasks"`
ShortWorkerCount int `default:"8" help:"Parallel worker count for short-lived tasks"`

View File

@@ -153,12 +153,14 @@ func (req *dhcpRequest) fetchConfig(session *mcclient.ClientSession) (*dhcp.Resp
if err != nil {
return nil, err
}
if req.baremetalInstance.NeedPXEBoot() {
return req.baremetalInstance.GetPXEDHCPConfig(req.ClientArch)
}
// always response PXE request
// let bootloader decide boot local or remote
// if req.baremetalInstance.NeedPXEBoot() {
return req.baremetalInstance.GetPXEDHCPConfig(req.ClientArch)
// }
// ignore
log.Warningf("No need to pxeboot, ignore the request ...(mac:%s guid:%s)", req.ClientMac, req.ClientGuid)
return nil, nil
// log.Warningf("No need to pxeboot, ignore the request ...(mac:%s guid:%s)", req.ClientMac, req.ClientGuid)
// return nil, nil
} else {
// handle normal DHCP request
bmInstance := req.baremetalManager.GetBaremetalByMac(req.ClientMac)
@@ -221,12 +223,11 @@ func (req *dhcpRequest) findNetworkConf(session *mcclient.ClientSession, filterU
func (req *dhcpRequest) findBaremetalsOfAnyMac(session *mcclient.ClientSession, isBaremetal bool) (*modules.ListResult, error) {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(api.HOST_TYPE_BAREMETAL), "host_type")
params.Add(jsonutils.NewString(req.ClientMac.String()), "any_mac")
if isBaremetal {
params.Add(jsonutils.JSONTrue, "is_baremetal")
} else {
params.Add(jsonutils.NewString("baremetal"), "host_type")
params.Add(jsonutils.NewString(api.HOST_TYPE_BAREMETAL), "host_type")
}
return modules.Hosts.List(session, params)
}

View File

@@ -12,6 +12,7 @@ import (
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/baremetal/options"
"yunion.io/x/onecloud/pkg/util/tftp"
)
@@ -124,6 +125,9 @@ func (s *Server) serveTFTP(l net.PacketConn, handler *TFTPHandler) error {
InfoLog: func(msg string) { log.Debugf("TFTP msg: %s", msg) },
TransferLog: handler.transferLog,
Dial: bindDial,
MaxBlockSize: int64(options.Options.TftpBlockSizeInBytes),
WriteAttempts: options.Options.TftpMaxTimeoutRetries,
}
err := ts.Serve(l)
if err != nil {

View File

@@ -269,25 +269,15 @@ func (self *SBaremetalTaskBase) EnsurePowerShutdown(soft bool) error {
return nil
}
func (self *SBaremetalTaskBase) EnsurePowerUp(bootdev string) error {
log.Infof("EnsurePowerUp: bootdev=%s", bootdev)
var bootFunc func() error = nil
switch bootdev {
case "pxe":
bootFunc = self.Baremetal.DoPXEBoot
case "disk":
bootFunc = self.Baremetal.DoDiskBoot
}
if bootFunc == nil {
return fmt.Errorf("No boot func %s found", bootdev)
}
func (self *SBaremetalTaskBase) EnsurePowerUp() error {
log.Infof("EnsurePowerUp: bootdev=pxe")
status, err := self.Baremetal.GetPowerStatus()
if err != nil {
return err
}
for status == "" || status == types.POWER_STATUS_OFF {
if status == types.POWER_STATUS_OFF {
err = bootFunc()
err = self.Baremetal.DoPXEBoot()
if err != nil {
return err
}
@@ -362,7 +352,7 @@ func (self *SBaremetalPXEBootTaskBase) InitPXEBootTask(pxeBootTask IPXEBootTask,
if err := self.EnsurePowerShutdown(false); err != nil {
return self, fmt.Errorf("EnsurePowerShutdown: %v", err)
}
if err := self.EnsurePowerUp("pxe"); err != nil {
if err := self.EnsurePowerUp(); err != nil {
return self, fmt.Errorf("EnsurePowerUp to pxe: %v", err)
}
// this stage will be called by baremetalInstance when pxe start notify
@@ -392,7 +382,7 @@ func (self *SBaremetalPXEBootTaskBase) WaitForShutdown(ctx context.Context, args
}
func (self *SBaremetalPXEBootTaskBase) OnStopComplete(ctx context.Context, args interface{}) error {
err := self.EnsurePowerUp("pxe")
err := self.EnsurePowerUp()
if err != nil {
return err
}

View File

@@ -66,7 +66,7 @@ func (self *SBaremetalServerBaseDeployTask) OnPXEBoot(ctx context.Context, term
return err
}
if onFinishAction == "restart" {
err = self.EnsurePowerUp("disk")
err = self.EnsurePowerUp()
if err != nil {
return err
}

View File

@@ -108,6 +108,7 @@ func (task *sBaremetalPrepareTask) DoPrepare(cli *ssh.Client) error {
log.Errorf("Lan channel %d MAC address is empty", lanChannel)
continue
}
ipmiNic := &types.SNicDevInfo{
Mac: conf.Mac,
Up: false,
@@ -118,10 +119,12 @@ func (task *sBaremetalPrepareTask) DoPrepare(cli *ssh.Client) error {
rootId := ipmitool.GetRootId(ipmiSysInfo)
err = ipmitool.SetLanUserPasswd(sshIPMI, lanChannel, rootId, ipmiUser, ipmiPasswd)
if err != nil {
// ignore the error
log.Errorf("Lan channel %d set user password error: %v", lanChannel, err)
}
err = ipmitool.EnableLanAccess(sshIPMI, lanChannel)
if err != nil {
// ignore the error
log.Errorf("Lan channel %d enable lan access error: %v", lanChannel, err)
}
@@ -134,55 +137,20 @@ func (task *sBaremetalPrepareTask) DoPrepare(cli *ssh.Client) error {
}
if len(tryAddrs) > 0 && !o.Options.ForceDhcpProbeIpmi {
for _, tryAddr := range tryAddrs {
log.Infof("IP addr found in IPMI config, try use %s as IPMI address", tryAddr)
ipConf, err := task.getIPMIIPConfig(tryAddr)
if err != nil {
log.Errorf("Failed to get IPMI ipconfig for %s", tryAddr)
continue
}
err = ipmitool.SetLanStatic(sshIPMI, lanChannel, ipConf.IPAddr, ipConf.Netmask, ipConf.Gateway)
if err != nil {
log.Errorf("Failed to set IPMI static net config %#v for %s", *ipConf, tryAddr)
continue
}
time.Sleep(1 * time.Second)
conf, err = ipmitool.GetLanConfig(sshIPMI, lanChannel)
if err != nil {
log.Errorf("Failed to get lan config after set static network: %v", err)
continue
}
log.Infof("Get lan config %#v", *conf)
if conf.IPAddr == "" || conf.IPAddr != tryAddr {
log.Errorf("Failed to set ipmi lan channel %d static ipaddr", lanChannel)
continue
}
rmcpIPMI := ipmitool.NewLanPlusIPMI(tryAddr, ipmiUser, ipmiPasswd)
conf2, err := ipmitool.GetLanConfig(rmcpIPMI, lanChannel)
if err != nil {
log.Errorf("Failed to get lan channel %d config use RMCP mode: %v", lanChannel, err)
continue
}
if len(conf2.Mac) != 0 &&
conf2.Mac.String() == conf.Mac.String() &&
conf2.IPAddr != "" && conf2.IPAddr == tryAddr {
// make sure the ipaddr is a IPMI address
// enable the netif
if err := task.sendNicInfo(ipmiNic, -1, types.NIC_TYPE_IPMI, false, tryAddr); err != nil {
log.Errorf("Fail to set existing BMC IP address to %s", tryAddr)
} else {
ipmiInfo.IpAddr = tryAddr
ipmiLanChannel = lanChannel
break
}
} else {
log.Errorf("Use RMCP mode get invalid lan config: %#v", conf2)
}
if ipmiLanChannel >= 0 {
// found and set config on lanChannel
tryResult := task.tryLocalIpmiAddr(sshIPMI, ipmiNic, lanChannel,
ipmiUser, ipmiPasswd, tryAddr)
if tryResult {
ipmiInfo.IpAddr = tryAddr
ipmiLanChannel = lanChannel
break
}
}
if ipmiLanChannel >= 0 {
// found and set config on lanChannel
break
}
}
if len(tryAddrs) > 0 {
task.baremetal.SetExistingIPMIIPAddr(tryAddrs[0])
}
@@ -280,14 +248,15 @@ func (task *sBaremetalPrepareTask) DoPrepare(cli *ssh.Client) error {
if err := task.sendStorageInfo(size); err != nil {
log.Errorf("sendStorageInfo error: %v", err)
}
for i := range nicsInfo {
if nicsInfo[i].Mac.String() == adminNic.GetMac().String() {
if i != 0 {
nicsInfo = append(nicsInfo[i:], nicsInfo[0:i]...)
}
break
}
}
// XXX do not change nic order anymore
// for i := range nicsInfo {
// if nicsInfo[i].Mac.String() == adminNic.GetMac().String() {
// if i != 0 {
// nicsInfo = append(nicsInfo[i:], nicsInfo[0:i]...)
// }
// break
// }
// }
err = task.removeAllNics()
if err != nil {
return err
@@ -311,6 +280,70 @@ func (task *sBaremetalPrepareTask) DoPrepare(cli *ssh.Client) error {
return nil
}
func (task *sBaremetalPrepareTask) tryLocalIpmiAddr(sshIPMI *ipmitool.SSHIPMI, ipmiNic *types.SNicDevInfo, lanChannel int, ipmiUser, ipmiPasswd, tryAddr string) bool {
log.Infof("IP addr found in IPMI config, try use %s as IPMI address", tryAddr)
ipConf, err := task.getIPMIIPConfig(tryAddr)
if err != nil {
log.Errorf("Failed to get IPMI ipconfig for %s", tryAddr)
return false
}
err = ipmitool.SetLanStatic(sshIPMI, lanChannel, ipConf.IPAddr, ipConf.Netmask, ipConf.Gateway)
if err != nil {
log.Errorf("Failed to set IPMI static net config %#v for %s", *ipConf, tryAddr)
return false
}
var conf *types.SIPMILanConfig
tried := 0
maxTries := 5
time.Sleep(2 * time.Second)
for tried = 0; tried < maxTries; tried += 1 {
conf, err = ipmitool.GetLanConfig(sshIPMI, lanChannel)
if err != nil {
log.Errorf("Failed to get lan config after set static network: %v", err)
continue
}
log.Infof("Get lan config %#v", *conf)
if conf.IPAddr == "" || conf.IPAddr != tryAddr {
log.Errorf("Failed to set ipmi lan channel %d static ipaddr", lanChannel)
continue
}
break
}
if tried >= maxTries {
log.Errorf("Failed to get lan config after %s tries", tried)
return false
}
rmcpIPMI := ipmitool.NewLanPlusIPMI(tryAddr, ipmiUser, ipmiPasswd)
for tried = 0; tried < maxTries; tried += 1 {
conf2, err := ipmitool.GetLanConfig(rmcpIPMI, lanChannel)
if err != nil {
log.Errorf("Failed to get lan channel %d config use RMCP mode: %v", lanChannel, err)
continue
}
if len(conf2.Mac) != 0 &&
conf2.Mac.String() == conf.Mac.String() &&
conf2.IPAddr != "" && conf2.IPAddr == tryAddr {
break
} else {
log.Errorf("fail to rmcp get IPMI ip config %v", conf2)
time.Sleep(5 * time.Second)
}
}
if tried < maxTries {
// make sure the ipaddr is a IPMI address
// enable the netif
err := task.sendNicInfo(ipmiNic, -1, types.NIC_TYPE_IPMI, false, tryAddr)
if err != nil {
log.Errorf("Fail to set existing BMC IP address to %s", tryAddr)
} else {
return true
}
}
return false
}
func (task *sBaremetalPrepareTask) getIPMIUserPasswd(sysInfo *types.SIPMISystemInfo) (string, string, string) {
var (
ipmiUser string

View File

@@ -34,7 +34,7 @@ type IBaremetal interface {
GetPowerStatus() (string, error)
DoPowerShutdown(soft bool) error
DoPXEBoot() error
DoDiskBoot() error
// DoDiskBoot() error
RemoveServer()
}

View File

@@ -23,8 +23,8 @@ func NewBaremetalServerStartTask(
self := &SBaremetalServerStartTask{
SBaremetalTaskBase: baseTask,
}
if err := self.Baremetal.DoDiskBoot(); err != nil {
return nil, fmt.Errorf("DoDiskBoot: %v", err)
if err := self.Baremetal.DoPXEBoot(); err != nil {
return nil, fmt.Errorf("DoPXEBoot: %v", err)
}
self.SetStage(self.WaitForStart)
ExecuteTask(self, nil)

View File

@@ -28,7 +28,7 @@ func NewBaremetalUnmaintenanceTask(
if err != nil {
return task, fmt.Errorf("EnsurePowerShutdown hard: %v", err)
}
err = task.EnsurePowerUp("disk")
err = task.EnsurePowerUp()
if err != nil {
return task, fmt.Errorf("EnsurePowerUp disk: %v", err)
}

View File

@@ -90,7 +90,8 @@ func (p *Partition) Format(fs string, uuid string) error {
cmd = []string{"/usr/sbin/mkfs.ext3"}
cmdUUID = []string{"/usr/sbin/tune2fs", "-U", uuid}
case "ext4":
cmd = []string{"/usr/sbin/mkfs.ext4", "-O", "^64bit", "-E", "lazy_itable_init=1"}
// for baremetal, force 64bit support large disks
cmd = []string{"/usr/sbin/mkfs.ext4", "-O", "64bit", "-E", "lazy_itable_init=1"}
cmdUUID = []string{"/usr/sbin/tune2fs", "-U", uuid}
case "ext4dev":
cmd = []string{"/usr/sbin/mkfs.ext4dev", "-E", "lazy_itable_init=1"}

View File

@@ -0,0 +1 @@
package agent // import "yunion.io/x/onecloud/pkg/cloudcommon/agent"

View File

@@ -310,10 +310,11 @@ func FetchScheduleInputByJSON(obj jsonutils.JSONObject) (*scheduler.ScheduleInpu
if err != nil {
return nil, err
}
conf := &input.ServerConfig
if obj.Contains("scheduler") {
obj, _ = obj.Get("scheduler")
obj.Unmarshal(conf)
}
conf := &input.ServerConfig
conf.ServerConfigs, err = FetchServerConfigsByJSON(obj)
if err != nil {
return nil, err

View File

@@ -95,6 +95,8 @@ func ParseDiskConfig(diskStr string, idx int) (*compute.DiskConfig, error) {
diskConfig.Mountpoint = p
} else if p == "autoextend" {
diskConfig.SizeMb = -1
} else if utils.IsInStringArray(p, compute.STORAGE_ALL_TYPES) {
diskConfig.Backend = p
} else if strings.HasPrefix(p, "snapshot-") {
// HACK: use snapshot creat disk format snapshot-id
// example: snapshot-3140cecb-ccc4-4865-abae-3a5ba8c69d9b

View File

@@ -9,7 +9,6 @@ import (
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/util/logclient"
)
type SAdminSharableVirtualResourceBase struct {
@@ -138,6 +137,5 @@ func (model *SAdminSharableVirtualResourceBase) setInfo(ctx context.Context,
return err
}
OpsLog.LogEvent(model, ACT_UPDATE, diff, userCred)
logclient.AddActionLogWithContext(ctx, model, logclient.ACT_UPDATE, diff, userCred, true)
return err
}

View File

@@ -24,8 +24,8 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/auth"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/util/httputils"
"yunion.io/x/onecloud/pkg/util/logclient"
"yunion.io/x/onecloud/pkg/util/rbacutils"
"yunion.io/x/onecloud/pkg/util/stringutils2"
)
type DBModelDispatcher struct {
@@ -310,13 +310,28 @@ func listItemQueryFilters(manager IModelManager, ctx context.Context, q *sqlchem
return q, nil
}
func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery, query jsonutils.JSONObject) ([]jsonutils.JSONObject, error) {
listF := listFields(manager, userCred)
fieldFilter := jsonutils.GetQueryStringArray(query, "field")
if len(fieldFilter) > 0 && IsAdminAllowList(userCred, manager) {
// only sysadmin can specify list Fields
listF = fieldFilter
func mergeFields(metaFields, queryFields []string, isAdmin bool) stringutils2.SSortedStrings {
meta := stringutils2.NewSortedStrings(metaFields)
if len(queryFields) == 0 {
return meta
}
query := stringutils2.NewSortedStrings(queryFields)
_, mAndQ, qNoM := stringutils2.Split(meta, query)
if !isAdmin {
return mAndQ
}
// only sysadmin can specify list Fields
return stringutils2.Merge(mAndQ, qNoM)
}
func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery, query jsonutils.JSONObject) ([]jsonutils.JSONObject, error) {
metaFields := listFields(manager, userCred)
fieldFilter := jsonutils.GetQueryStringArray(query, "field")
listF := mergeFields(metaFields, fieldFilter, IsAdminAllowList(userCred, manager))
showDetails := false
showDetailsJson, _ := query.Get("details")
if showDetailsJson != nil {
@@ -324,15 +339,7 @@ func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.To
} else {
showDetails = true
}
item, err := NewModelObject(manager)
if err != nil {
return nil, err
}
itemInitValue := reflect.Indirect(reflect.ValueOf(item))
item, err = NewModelObject(manager)
if err != nil {
return nil, err
}
items := make([]IModel, 0)
results := make([]jsonutils.JSONObject, 0)
rows, err := q.Rows()
if err != nil {
@@ -340,8 +347,10 @@ func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.To
}
defer rows.Close()
for rows.Next() {
itemValue := reflect.Indirect(reflect.ValueOf(item))
itemValue.Set(itemInitValue)
item, err := NewModelObject(manager)
if err != nil {
return nil, err
}
extraData := jsonutils.NewDict()
if query.Contains("export_keys") {
RowMap, err := q.Row2Map(rows)
@@ -363,12 +372,8 @@ func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.To
}
}
jsonData := jsonutils.Marshal(item)
jsonDict, ok := jsonData.(*jsonutils.JSONDict)
if !ok {
return nil, fmt.Errorf("invalid model data structure, not a dict")
}
jsonDict = jsonDict.CopyIncludes(listF...)
jsonDict := jsonutils.Marshal(item).(*jsonutils.JSONDict)
jsonDict = jsonDict.CopyIncludes([]string(listF)...)
jsonDict.Update(extraData)
if showDetails && !query.Contains("export_keys") {
extraDict := item.GetCustomizeColumns(ctx, userCred, query)
@@ -378,6 +383,16 @@ func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.To
jsonDict = getModelExtraDetails(item, ctx, jsonDict)
}
results = append(results, jsonDict)
items = append(items, item)
}
if showDetails && !query.Contains("export_keys") {
extraRows := manager.FetchCustomizeColumns(ctx, userCred, query, items, stringutils2.NewSortedStrings(fieldFilter))
// log.Debugf("manager.FetchCustomizeColumns: %s %s", extraRows, listF)
if len(extraRows) == len(results) {
for i := range results {
results[i].(*jsonutils.JSONDict).Update(extraRows[i])
}
}
}
return results, nil
}
@@ -446,6 +461,13 @@ func ListItems(manager IModelManager, ctx context.Context, userCred mcclient.Tok
if totalCnt > maxLimit && (limit <= 0 || limit > maxLimit) {
limit = maxLimit
}
// export data only
exportLimit, err := query.Int("export_limit")
if query.Contains("export_keys") && err == nil {
limit = exportLimit
}
orderBy := jsonutils.GetQueryStringArray(queryDict, "order_by")
if len(orderBy) == 0 {
colSpec := manager.TableSpec().ColumnSpec("id")
@@ -551,7 +573,7 @@ func (dispatcher *DBModelDispatcher) List(ctx context.Context, query jsonutils.J
log.Errorf("Fail to list items: %s", err)
return nil, httperrors.NewGeneralError(err)
}
if userCred.HasSystemAdminPrivilege() && dispatcher.modelManager.ListSkipLog(ctx, userCred, query) {
if userCred != nil && userCred.HasSystemAdminPrivilege() && dispatcher.modelManager.ListSkipLog(ctx, userCred, query) {
appParams := appsrv.AppContextGetParams(ctx)
if appParams != nil {
appParams.SkipLog = true
@@ -604,20 +626,27 @@ func getItemDetails(manager IModelManager, item IModel, ctx context.Context, use
extraDict, err := item.GetExtraDetails(ctx, userCred, query)
if err != nil {
return nil, httperrors.NewGeneralError(err)
} else if extraDict != nil {
jsonData := jsonutils.Marshal(item)
jsonDict, ok := jsonData.(*jsonutils.JSONDict)
if !ok {
return nil, fmt.Errorf("fail to convert model to json")
}
jsonDict = jsonDict.CopyIncludes(GetDetailFields(manager, userCred)...)
jsonDict.Update(extraDict)
jsonDict = getModelExtraDetails(item, ctx, jsonDict)
return jsonDict, nil
} else {
}
if extraDict == nil {
// override GetExtraDetails
return nil, nil
}
metaFields := GetDetailFields(manager, userCred)
fieldFilter := jsonutils.GetQueryStringArray(query, "field")
getFields := mergeFields(metaFields, fieldFilter, IsAdminAllowGet(userCred, item))
jsonDict := jsonutils.Marshal(item).(*jsonutils.JSONDict)
jsonDict = jsonDict.CopyIncludes(getFields...)
jsonDict.Update(extraDict)
jsonDict = getModelExtraDetails(item, ctx, jsonDict)
extraRows := manager.FetchCustomizeColumns(ctx, userCred, query, []IModel{item}, stringutils2.NewSortedStrings(fieldFilter))
if len(extraRows) == 1 {
jsonDict.Update(extraRows[0])
}
return jsonDict, nil
}
func (dispatcher *DBModelDispatcher) tryGetModelProperty(ctx context.Context, property string, query jsonutils.JSONObject) (jsonutils.JSONObject, error) {
@@ -937,7 +966,6 @@ func (dispatcher *DBModelDispatcher) Create(ctx context.Context, query jsonutils
}()
OpsLog.LogEvent(model, ACT_CREATE, model.GetShortDesc(ctx), userCred)
logclient.AddActionLogWithContext(ctx, model, logclient.ACT_CREATE, "", userCred, true)
dispatcher.modelManager.OnCreateComplete(ctx, []IModel{model}, userCred, query, data)
return getItemDetails(dispatcher.modelManager, model, ctx, userCred, query)
}
@@ -1218,13 +1246,11 @@ func updateItem(manager IModelManager, item IModel, ctx context.Context, userCre
if err != nil {
log.Errorf("validate update condition error: %s", err)
logclient.AddActionLogWithContext(ctx, item, logclient.ACT_UPDATE, err.Error(), userCred, false)
return nil, httperrors.NewGeneralError(err)
}
dataDict, ok := data.(*jsonutils.JSONDict)
if !ok {
logclient.AddActionLogWithContext(ctx, item, logclient.ACT_UPDATE, "Invalid data JSONObject", userCred, false)
return nil, httperrors.NewInternalServerError("Invalid data JSONObject")
}
@@ -1232,7 +1258,6 @@ func updateItem(manager IModelManager, item IModel, ctx context.Context, userCre
if len(name) > 0 {
err = alterNameValidator(item, name)
if err != nil {
logclient.AddActionLogWithContext(ctx, item, logclient.ACT_UPDATE, err.Error(), userCred, false)
return nil, err
}
}
@@ -1241,7 +1266,6 @@ func updateItem(manager IModelManager, item IModel, ctx context.Context, userCre
if err != nil {
errMsg := fmt.Sprintf("validate update data error: %s", err)
log.Errorf(errMsg)
logclient.AddActionLogWithContext(ctx, item, logclient.ACT_UPDATE, errMsg, userCred, false)
return nil, httperrors.NewGeneralError(err)
}
@@ -1252,7 +1276,6 @@ func updateItem(manager IModelManager, item IModel, ctx context.Context, userCre
err = filterData.Unmarshal(item)
if err != nil {
errMsg := fmt.Sprintf("unmarshal fail: %s", err)
logclient.AddActionLogWithContext(ctx, item, logclient.ACT_UPDATE, errMsg, userCred, false)
log.Errorf(errMsg)
return httperrors.NewGeneralError(err)
}
@@ -1264,7 +1287,6 @@ func updateItem(manager IModelManager, item IModel, ctx context.Context, userCre
return nil, httperrors.NewGeneralError(err)
}
OpsLog.LogEvent(item, ACT_UPDATE, diff, userCred)
logclient.AddActionLogWithContext(ctx, item, logclient.ACT_UPDATE, diff, userCred, true)
item.PostUpdate(ctx, userCred, query, data)
@@ -1308,11 +1330,9 @@ func DeleteModel(ctx context.Context, userCred mcclient.TokenCredential, item IM
if err != nil {
msg := fmt.Sprintf("save update error %s", err)
log.Errorf(msg)
// logclient.AddActionLogWithContext(ctx, item, logclient.ACT_DELETE, msg, userCred, false)
return httperrors.NewGeneralError(err)
}
OpsLog.LogEvent(item, ACT_DELETE, item.GetShortDesc(ctx), userCred)
logclient.AddSimpleActionLog(item, logclient.ACT_DELETE, item.GetShortDesc(ctx), userCred, true)
return nil
}

View File

@@ -39,7 +39,7 @@ func (self *SEnabledStatusStandaloneResourceBase) PerformEnable(ctx context.Cont
return nil, err
}
OpsLog.LogEvent(self, ACT_ENABLE, "", userCred)
logclient.AddActionLogWithContext(ctx, self, logclient.ACT_ENABLE, nil, userCred, true)
logclient.AddSimpleActionLog(self, logclient.ACT_ENABLE, nil, userCred, true)
}
return nil, nil
}
@@ -59,7 +59,7 @@ func (self *SEnabledStatusStandaloneResourceBase) PerformDisable(ctx context.Con
return nil, err
}
OpsLog.LogEvent(self, ACT_DISABLE, "", userCred)
logclient.AddActionLogWithContext(ctx, self, logclient.ACT_DISABLE, nil, userCred, true)
logclient.AddSimpleActionLog(self, logclient.ACT_DISABLE, nil, userCred, true)
}
return nil, nil
}

Some files were not shown because too many files have changed in this diff Show More