Compare commits

...

609 Commits

Author SHA1 Message Date
Zexi Li
5fe63939c8 Merge pull request #14970 from swordqiu/automated-cherry-pick-of-#14967-upstream-release-3.7
Automated cherry pick of #14967: fix: set vfs_cache_pressure to 350
2022-09-14 01:06:11 +08:00
Qiu Jian
17ea5c88c4 fix: set vfs_cache_pressure to 350 2022-09-13 17:04:30 +08:00
Zexi Li
ed96fb595d Merge pull request #14938 from swordqiu/automated-cherry-pick-of-#14935-upstream-release-3.7
Automated cherry pick of #14935: fix: agent pull list with system scope
2022-09-07 10:37:18 +08:00
Qiu Jian
4c09fcb142 fix: agent pull list with system scope 2022-09-07 01:01:33 +08:00
Zexi Li
46857f6aed Merge pull request #14648 from zexi/automated-cherry-pick-of-#14589-upstream-release-3.7
Automated cherry pick of #14589: fix(monitor): no metrics of baremetal server
2022-07-15 18:58:05 +08:00
Zexi Li
cc005c85b4 fix(monitor): no metrics of baremetal server 2022-07-15 18:57:21 +08:00
Jian Qiu
77b3964377 fix(region):资源统计bug,已使用资源统计包含裸金属资源,总数未包含,导致资源使用率统计异常。 guestUsage统计中排除掉裸金属资源,hypervisors.Delete(api.HYPERVISOR_CONTAINER, api.HYPERVISOR_BAREMETAL) (#14404)
Co-authored-by: chenxiaochen <chenxiaochen@bonc.com.cn>
2022-06-05 18:11:07 +08:00
Jian Qiu
5aad97e80f fix: disk info exception (#14253)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-05-13 22:05:09 +08:00
Zexi Li
e79848378c fix(baremetal): try clear jbod devices before create (#14180) 2022-05-01 21:36:53 +08:00
Zexi Li
5f76aed489 Merge pull request #14144 from swordqiu/automated-cherry-pick-of-#14141-upstream-release-3.7
Automated cherry pick of #14141: fix: fail to delete storages with fake-deleted snapshots
2022-04-26 02:26:14 +08:00
Qiu Jian
7ff3d249eb fix: fail to delete storages with fake-deleted snapshots 2022-04-25 23:33:36 +08:00
Zexi Li
f9ba73c2be Merge pull request #14124 from zexi/automated-cherry-pick-of-#14123-upstream-release-3.7
Automated cherry pick of #14123: fix(region): make access_ip of host updatable
2022-04-24 14:29:22 +08:00
Zexi Li
a4d189d1ab fix(region): make access_ip of host updatable 2022-04-24 11:42:55 +08:00
Zexi Li
2b7b17ab72 Merge pull request #14010 from ioito/automated-cherry-pick-of-#14007-upstream-release-3.7
Automated cherry pick of #14007: fix(region): avoid export duplicate tag key
2022-04-13 16:21:20 +08:00
ioito
629b925bbc fix(region): avoid export duplicate tag key 2022-04-13 16:11:56 +08:00
Zexi Li
a56fc718be Merge pull request #13983 from zexi/automated-cherry-pick-of-#13981-upstream-release-3.7
Automated cherry pick of #13981: fix(region): multi disk created after instance snapshot
2022-04-13 00:56:22 +08:00
Zexi Li
a1d87f6fda Merge pull request #13995 from ioito/automated-cherry-pick-of-#13987-upstream-release-3.7
Automated cherry pick of #13987: fix(region): huawei api
2022-04-12 16:45:43 +08:00
ioito
6dccd2a84c fix(region): huawei api 2022-04-12 16:02:33 +08:00
Zexi Li
bf0f1adbd2 Merge pull request #13992 from ioito/automated-cherry-pick-of-#13989-upstream-release-3.7
Automated cherry pick of #13989: fix(region): avoid panic
2022-04-12 15:06:20 +08:00
ioito
adf23b0a5e fix(region): avoid panic 2022-04-12 14:57:39 +08:00
Zexi Li
3196b8a2df fix(region): multi disk created after instance snapshot 2022-04-12 13:58:52 +08:00
Jian Qiu
c3b12f8adc fix: more detailed privilege hint (#13978)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-04-12 12:10:05 +08:00
Zexi Li
258600660d Merge pull request #13965 from ioito/automated-cherry-pick-of-#13962-upstream-release-3.7
Automated cherry pick of #13962: fix(region): aws all regions
2022-04-11 20:46:58 +08:00
ioito
86ce76ead4 fix(region): aws all regions 2022-04-11 20:02:05 +08:00
Zexi Li
d4d5f200fe Merge pull request #13931 from ioito/automated-cherry-pick-of-#13928-upstream-release-3.7
Automated cherry pick of #13928: fix(region): aws storage type sync
2022-04-07 17:46:44 +08:00
ioito
f0869d0dc4 fix(region): aws storage type sync 2022-04-07 17:35:32 +08:00
Jian Qiu
76b09d8f33 fix: save image for aarch64 os show os_arch of x86_64 (#13906)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-04-05 16:12:22 +08:00
Jian Qiu
5c60b4144b fix: cloudaccounts getMoreDetails should pass ctx (#13887)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-04-05 11:19:02 +08:00
Jian Qiu
3a46caa65d fix: better handling of network not avaiable on host error (#13893)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-04-05 11:17:26 +08:00
屈轩
5a9da2d081 fix(apigateway): export timeout (#13830) 2022-03-31 12:57:22 +08:00
Zexi Li
c2a656a63b Merge pull request #13834 from rainzm/automated-cherry-pick-of-#13831-upstream-release-3.7
Automated cherry pick of #13831: fix(glance): check image after initializing s3
2022-03-30 16:53:31 +08:00
rainzm
282174f5b1 fix(glance): check image after initializing s3 2022-03-30 16:05:11 +08:00
Zexi Li
b1f31115a2 fix(telegraf-raid-plugin): zombies recycle (#13819) 2022-03-30 07:41:08 +08:00
Zexi Li
a1b8cd41f7 Merge pull request #13756 from ioito/automated-cherry-pick-of-#13753-upstream-release-3.7
Automated cherry pick of #13753: fix(region): clean glance image cache
2022-03-23 23:44:50 +08:00
ioito
5761100cd5 fix(region): clean glance image cache 2022-03-22 19:00:52 +08:00
Zexi Li
f46d7efd50 Merge pull request #13724 from zhaoxiangchun/automated-cherry-pick-of-#13721-upstream-release-3.7
Automated cherry pick of #13721: fix(host): fix guest nicStat  Metric in host
2022-03-21 12:51:44 +08:00
zhaoxiangchun
ca5f7a40be fix(host): fix guest nicStat Metric in host 2022-03-18 15:55:02 +08:00
Zexi Li
653d3f79fd Merge pull request #13714 from swordqiu/automated-cherry-pick-of-#13711-upstream-release-3.7
Automated cherry pick of #13711: fix: host deploy mkdir permission
2022-03-17 21:25:26 +08:00
Qiu Jian
cd2420d236 fix: host deploy mkdir permission 2022-03-17 16:54:12 +08:00
屈轩
674c880b42 fix(glance): image save (#13676) 2022-03-11 16:16:41 +08:00
Zexi Li
db4f6acf21 Merge pull request #13662 from swordqiu/automated-cherry-pick-of-#13659-upstream-release-3.7
Automated cherry pick of #13659: fix: aws s3 object with leading slash
2022-03-10 18:51:45 +08:00
Qiu Jian
50f877f242 fix: aws s3 object with leading slash 2022-03-10 11:09:08 +08:00
Zexi Li
e3af3ab9cc Merge pull request #13650 from ioito/automated-cherry-pick-of-#13647-upstream-release-3.7
Automated cherry pick of #13647: fix(region): huawei storage type
2022-03-09 14:58:47 +08:00
Zexi Li
d45bf19ecb Merge pull request #13656 from rainzm/automated-cherry-pick-of-#13651-upstream-release-3.7
Automated cherry pick of #13651: fix(scheduler): init db after init auth
2022-03-09 14:57:25 +08:00
ioito
9e7b95c011 fix(region): huawei storage type 2022-03-09 14:47:12 +08:00
rainzm
b61a2f8b62 fix(scheduler): init db after init auth 2022-03-09 14:36:56 +08:00
Zexi Li
964d78711a Merge pull request #13609 from swordqiu/automated-cherry-pick-of-#13606-upstream-release-3.7
Automated cherry pick of #13606: fix: disable cache for oidc auth callback
2022-03-07 16:01:30 +08:00
Zexi Li
305a5527f9 Merge pull request #13623 from ioito/automated-cherry-pick-of-#13620-upstream-release-3.7
Automated cherry pick of #13620: fix(region): qcloud disk range changed
2022-03-07 16:00:41 +08:00
Zexi Li
483608344d Merge pull request #13627 from zexi/automated-cherry-pick-of-#13624-upstream-release-3.7
Automated cherry pick of #13624: feat(telegraf-raid-plugin): update rootfs and image version
2022-03-07 15:59:42 +08:00
Zexi Li
27a6ed9dc8 feat(telegraf-raid-plugin): update rootfs and image version 2022-03-07 12:15:05 +08:00
ioito
7a90e0f848 fix(region): qcloud disk range changed 2022-03-07 11:15:27 +08:00
Qiu Jian
571ebe342d fix: disable cache for oidc auth callback 2022-03-06 12:02:51 +08:00
Zexi Li
4b88356f31 Merge pull request #13599 from rainzm/automated-cherry-pick-of-#13596-upstream-release-3.7
Automated cherry pick of #13596: fix(ansible): use the correct length value 'text'
2022-03-04 22:00:55 +08:00
rainzm
d6a87b62a0 fix(ansible): use the correct length value 'text' 2022-03-04 16:18:14 +08:00
Zexi Li
fd5e4fb024 Merge pull request #13592 from rainzm/automated-cherry-pick-of-#13589-upstream-release-3.7
Automated cherry pick of #13589: fix(region,devtool): get ssh port from 'servers/<id>/sshport' api
2022-03-03 21:00:50 +08:00
Zexi Li
978d30441f Merge pull request #13587 from ioito/automated-cherry-pick-of-#13584-upstream-release-3.7
Automated cherry pick of #13584: fix(region): not allow merge default secgroup
2022-03-03 20:59:47 +08:00
rainzm
66b871ab9b fix(region,devtool): get ssh port from 'servers/<id>/sshport' api 2022-03-03 19:22:08 +08:00
ioito
4e4ae3fffa fix(region): not allow merge default secgroup 2022-03-03 15:50:45 +08:00
Zexi Li
4518281b44 Merge pull request #13558 from ioito/automated-cherry-pick-of-#13552-upstream-release-3.7
Automated cherry pick of #13552: fix(yunionapi): reset password with base64
2022-03-01 11:05:28 +08:00
ioito
d3cf843801 fix(yunionapi): reset password with base64 2022-02-28 11:46:53 +08:00
Zexi Li
9c5fb35ce6 Merge pull request #13296 from rainzm/automated-cherry-pick-of-#13293-upstream-release-3.7
Automated cherry pick of #13293: fix(glance): convert image in s3 storage
2022-02-28 10:49:13 +08:00
rainzm
219fb016ae fix(glance): re-convert as long as subformat is not active
之前的写法会导致saving或者save_fail状态的subformat,不会再次
转换。而且镜像是否需要转换,由ImageCheckTask决定了,ImageConvertTask
只需要注意不重新转换active的subformat就好了,save失败的subformat
也应该设置状态为save_fail。
2022-02-25 18:55:36 +08:00
rainzm
a494c1197d fix(glance): convert image in s3 storage 2022-02-25 18:55:36 +08:00
Zexi Li
68bfa3152e Merge pull request #13534 from rainzm/automated-cherry-pick-of-#13531-upstream-release-3.7
Automated cherry pick of #13531: fix(region): init scalinggroup controller in correct order
2022-02-24 10:18:25 +08:00
rainzm
5411576ff7 fix(region): init scalinggroup controller in correct order 2022-02-23 20:15:59 +08:00
Rain Zheng
8ef670ae46 fix(region): delete disk actually when cleaning disks (#13524) 2022-02-22 17:59:02 +08:00
Zexi Li
6ae7079851 Merge pull request #13514 from ioito/hotfix/qx-ceph-size
fix(host): ceph df size
2022-02-22 15:54:10 +08:00
ioito
b4325c243d fix(host): ceph df size 2022-02-22 11:21:37 +08:00
Zexi Li
327f877f33 Merge pull request #13507 from swordqiu/automated-cherry-pick-of-#13504-upstream-release-3.7
Automated cherry pick of #13504: fix: user create user nil pointer error
2022-02-21 16:53:31 +08:00
Qiu Jian
03890ad5aa fix: user create user nil pointer error 2022-02-21 12:18:44 +08:00
Zexi Li
01a5f7848d Merge pull request #13429 from swordqiu/automated-cherry-pick-of-#13426-upstream-release-3.7
Automated cherry pick of #13426: fix: delay block stream after server start
2022-02-12 21:15:45 +08:00
Qiu Jian
27e85aab82 fix: delay block stream after server start 2022-02-12 00:35:22 +08:00
Zexi Li
5797a2bdd9 Merge pull request #13238 from ioito/automated-cherry-pick-of-#13235-upstream-release-3.7
Automated cherry pick of #13235: fix(region): vpc tag sync
2022-01-19 11:01:40 +08:00
ioito
f57bc1f68a fix(region): vpc tag sync 2022-01-19 10:59:20 +08:00
Zexi Li
9b6c834ea8 Merge pull request #13222 from ioito/automated-cherry-pick-of-#13219-upstream-release-3.7
Automated cherry pick of #13219: fix(region): sync tags for vpc and network
2022-01-17 20:40:06 +08:00
ioito
694bb35c9f fix(region): sync tags for vpc and network 2022-01-17 20:38:30 +08:00
Zexi Li
6699c667ee Merge pull request #13182 from zexi/automated-cherry-pick-of-#13180-upstream-release-3.7
Automated cherry pick of #13180: feat(scheduler): log CheckDisksAllocable skipped storage
2022-01-11 11:21:18 +08:00
Zexi Li
ef1aaf6f7e feat(scheduler): log CheckDisksAllocable skipped storage 2022-01-11 11:19:57 +08:00
Zexi Li
2f10ada251 Merge pull request #13160 from ioito/automated-cherry-pick-of-#13158-upstream-release-3.7
Automated cherry pick of #13158: fix(region): kvm vm no need remote update
2022-01-10 15:08:54 +08:00
ioito
1e3c9a6912 fix(region): kvm vm no need remote update 2022-01-10 11:10:08 +08:00
Zexi Li
df1a737e94 Merge pull request #13155 from swordqiu/automated-cherry-pick-of-#13153-upstream-release-3.7
Automated cherry pick of #13153: fix: windows server name cannot be longer than 15 chars
2022-01-09 21:30:59 +08:00
Qiu Jian
e61d8ebf05 fix: windows server name cannot be longer than 15 chars 2022-01-09 19:57:58 +08:00
Zexi Li
8e4f922a06 Merge pull request #13145 from ioito/automated-cherry-pick-of-#13143-upstream-release-3.7
Automated cherry pick of #13143: fix(cloudevent): skip cloudevent init data
2022-01-07 22:42:31 +08:00
ioito
0be8176cc6 fix(cloudevent): skip cloudevent init data 2022-01-07 19:33:58 +08:00
Zexi Li
bfdf628e2d Merge pull request #13131 from ioito/automated-cherry-pick-of-#13129-upstream-release-3.7
Automated cherry pick of #13129: fix(region): image not found details error
2022-01-05 22:05:39 +08:00
ioito
215adf220a fix(region): image not found details error 2022-01-05 15:49:20 +08:00
Zexi Li
c540f755f3 Merge pull request #13122 from rainzm/automated-cherry-pick-of-#13120-upstream-release-3.7
Automated cherry pick of #13120: fix(region): check whether ipProvider is nil
2022-01-04 14:59:43 +08:00
rainzm
3c95a6100f fix(region): check whether ipProvider is nil 2022-01-04 11:47:56 +08:00
Zexi Li
d42706e386 Merge pull request #13119 from swordqiu/automated-cherry-pick-of-#13117-upstream-release-3.7
Automated cherry pick of #13117: fix: host tune system set default arp gc threshold
2022-01-04 11:45:20 +08:00
Qiu Jian
0d99403e04 fix: host tune system set default arp gc threshold 2022-01-04 11:04:38 +08:00
Zexi Li
80eb7e1176 Merge pull request #13075 from ioito/automated-cherry-pick-of-#13073-upstream-release-3.7
Automated cherry pick of #13073: fix(region): lb filter by owner
2021-12-29 19:25:13 +08:00
Zexi Li
0fdd31ffcb Merge pull request #13065 from rainzm/automated-cherry-pick-of-#13063-upstream-release-3.7
Automated cherry pick of #13063: fix(region): distinguish guests_ Root and data of image sub image
2021-12-29 19:24:23 +08:00
ioito
51bd75a885 fix(region): lb filter by owner 2021-12-29 14:52:07 +08:00
Zexi Li
b9fbaafe09 Merge pull request #13058 from ioito/automated-cherry-pick-of-#13056-upstream-release-3.7
Automated cherry pick of #13056: fix(region): ignore invalid zone id skus
2021-12-29 11:14:49 +08:00
rainzm
7b85fdcc30 fix(region): distinguish guests_ Root and data of image sub image 2021-12-28 18:36:02 +08:00
ioito
b86c39ca00 fix(region): ignore invalid zone id skus 2021-12-28 14:41:02 +08:00
Zexi Li
781765b3ae Merge pull request #13052 from ioito/automated-cherry-pick-of-#13050-upstream-release-3.7
Automated cherry pick of #13050: fix(region): aws security group name generate
2021-12-28 10:56:41 +08:00
Zexi Li
0efba2e7b9 Merge pull request #13055 from ioito/automated-cherry-pick-of-#13053-upstream-release-3.7
Automated cherry pick of #13053: fix(region): json to string fix
2021-12-28 10:54:50 +08:00
ioito
cac7b8547a fix(region): json to string fix 2021-12-28 10:42:40 +08:00
ioito
749c5bc3d9 fix(region): aws security group name generate 2021-12-28 09:57:28 +08:00
Zexi Li
b945f9173e Merge pull request #13038 from swordqiu/automated-cherry-pick-of-#13036-upstream-release-3.7
Automated cherry pick of #13036: fix: enable kvm_pv_eoi by default
2021-12-27 12:10:59 +08:00
Qiu Jian
9c476d5b00 fix: enable kvm_pv_eoi by default 2021-12-24 21:49:05 +08:00
Zexi Li
e280146389 Merge pull request #13029 from ioito/automated-cherry-pick-of-#13027-upstream-release-3.7
Automated cherry pick of #13027: fix(region): google security group fix
2021-12-24 18:23:25 +08:00
Zexi Li
acbd42d1cd Merge pull request #13017 from ioito/automated-cherry-pick-of-#13015-upstream-release-3.7
Automated cherry pick of #13015: fix(region): vpc create with tags
2021-12-24 18:11:27 +08:00
Zexi Li
7cea8c796a Merge pull request #13022 from zexi/gpu-fuzzy-match
fix(region): gpu fuzzy match model name exactly
2021-12-24 18:09:40 +08:00
ioito
38a0d07444 fix(region): google security group fix 2021-12-24 17:55:53 +08:00
Zexi Li
e23bc808e5 fix(region): gpu fuzzy match model name exactly 2021-12-24 14:49:30 +08:00
ioito
00affbc8d7 fix(region): vpc create with tags 2021-12-23 19:39:41 +08:00
Zexi Li
c1824f028e Merge pull request #13007 from ioito/automated-cherry-pick-of-#13005-upstream-release-3.7
Automated cherry pick of #13005: fix(region): sku scheduler sync
2021-12-23 16:19:44 +08:00
ioito
7deb089546 fix(region): sku scheduler sync 2021-12-23 14:52:47 +08:00
Zexi Li
f7ba89055e Merge pull request #13000 from swordqiu/automated-cherry-pick-of-#12998-upstream-release-3.7
Automated cherry pick of #12998: fix: migrate timeout error
2021-12-23 09:59:07 +08:00
Qiu Jian
13671ee635 fix: migrate timeout error 2021-12-23 07:57:09 +08:00
Zexi Li
23d40f27d0 Merge pull request #12960 from ioito/automated-cherry-pick-of-#12958-upstream-release-3.7
Automated cherry pick of #12958: fix(region): qcloud secgroup rule sync
2021-12-22 10:36:34 +08:00
Zexi Li
5c64900c78 Merge pull request #12973 from ioito/automated-cherry-pick-of-#12971-upstream-release-3.7
Automated cherry pick of #12971: fix(region): security group cache filter
2021-12-22 10:24:55 +08:00
ioito
212124e944 fix(region): security group cache filter 2021-12-21 21:28:52 +08:00
ioito
5f6019c699 fix(region): qcloud secgroup rule sync 2021-12-21 14:21:16 +08:00
Zexi Li
59dd20b3f4 Merge pull request #12931 from ioito/automated-cherry-pick-of-#12929-upstream-release-3.7
Automated cherry pick of #12929: fix(region): security group name generate for every cloud platform
2021-12-20 13:03:35 +08:00
Zexi Li
4d669ec875 Merge pull request #12944 from ioito/automated-cherry-pick-of-#12942-upstream-release-3.7
Automated cherry pick of #12942: fix(keystone): scope resource count
2021-12-20 13:01:16 +08:00
Zexi Li
4448d9f43f Merge pull request #12954 from swordqiu/automated-cherry-pick-of-#12938-upstream-release-3.7
Automated cherry pick of #12938: fix: server migration halted by an unexpected STOP event
2021-12-19 18:33:29 +08:00
Qiu Jian
0ce7bf694b remove s.server 2021-12-19 07:49:22 +08:00
Qiu Jian
6711b35e1c fix: server migration halted by an unexpected STOP event 2021-12-19 00:00:47 +08:00
Zexi Li
0b554e710f Merge pull request #12948 from ioito/automated-cherry-pick-of-#12946-upstream-release-3.7
Automated cherry pick of #12946: fix(region): dns zone cache purge
2021-12-18 01:05:55 +08:00
ioito
bc3bd5cd95 fix(region): dns zone cache purge 2021-12-17 18:08:19 +08:00
ioito
01a29e133e fix(keystone): scope resource count 2021-12-17 16:11:07 +08:00
Zexi Li
b6bd866a7b fix(host): more readable error info of GetWireOfIp (#12937) 2021-12-16 21:13:56 +08:00
ioito
89e9992e1e fix(region): security group name generate for every cloud platform 2021-12-16 14:29:52 +08:00
Zexi Li
35a73eb7c6 Merge pull request #12919 from ioito/automated-cherry-pick-of-#12913-upstream-release-3.7
Automated cherry pick of #12913: fix(region): vpc sync misc fix
2021-12-16 10:51:47 +08:00
Zexi Li
a86300e1a1 Merge pull request #12927 from swordqiu/automated-cherry-pick-of-#12925-upstream-release-3.7
Automated cherry pick of #12925: fix: lbagent pull resources of OneCloud only
2021-12-16 10:40:19 +08:00
Qiu Jian
5e90dba611 fix: lbagent pull resources of OneCloud only 2021-12-15 22:44:52 +08:00
ioito
7e128a8eba fix(region): vpc sync misc fix 2021-12-15 16:41:01 +08:00
Zexi Li
b7e8cbb87c Merge pull request #12904 from zexi/automated-cherry-pick-of-#12902-upstream-release-3.7
Automated cherry pick of #12902: feat(host): qemu add uuid option
2021-12-14 21:24:59 +08:00
Zexi Li
389f457f0a Merge pull request #12908 from rainzm/automated-cherry-pick-of-#12906-upstream-release-3.7
Automated cherry pick of #12906: fix(region): respect disk's snapshotId in disk_batch_create_task
2021-12-14 21:24:20 +08:00
rainzm
60517a517f fix(region): respect disk's snapshotId in disk_batch_create_task 2021-12-14 21:17:30 +08:00
Zexi Li
95054b9943 Merge pull request #12895 from ioito/automated-cherry-pick-of-#12893-upstream-release-3.7
Automated cherry pick of #12893: fix(region): openstack use proxy
2021-12-14 21:08:45 +08:00
Zexi Li
194b0a1c59 feat(host): qemu add uuid option 2021-12-14 21:03:47 +08:00
ioito
525d8e7b28 fix(region): openstack use proxy 2021-12-14 14:34:19 +08:00
Zexi Li
978dc20edb Merge pull request #12863 from rainzm/automated-cherry-pick-of-#12861-upstream-release-3.7
Automated cherry pick of #12861: fix(hostman): update storagecacheimage status from 'ready' to 'avtive'
2021-12-13 17:15:18 +08:00
Zexi Li
3133ecf246 Merge pull request #12877 from swordqiu/automated-cherry-pick-of-#12875-upstream-release-3.7
Automated cherry pick of #12875: feature: support galaxy kylin guest OS
2021-12-12 12:12:55 +08:00
Qiu Jian
d1225d226a feature: support galaxy kylin guest OS 2021-12-11 13:29:04 +08:00
Zexi Li
c0d255ebc2 Merge pull request #12860 from ioito/automated-cherry-pick-of-#12858-upstream-release-3.7
Automated cherry pick of #12858: fix(region): zstack time zone auth
2021-12-10 16:57:41 +08:00
Zexi Li
a8eca2b38b Merge pull request #12866 from ioito/automated-cherry-pick-of-#12864-upstream-release-3.7
Automated cherry pick of #12864: fix(region): aliyun route table sync
2021-12-10 16:55:02 +08:00
ioito
8b27985b01 fix(region): aliyun route table sync 2021-12-10 16:34:27 +08:00
rainzm
6aaa57dbe6 fix(hostman): update storagecacheimage status from 'ready' to 'avtive' 2021-12-10 15:31:22 +08:00
ioito
68c9edbd09 fix(region): zstack time zone auth 2021-12-10 15:08:29 +08:00
Zexi Li
d214efdb65 Merge pull request #12839 from swordqiu/automated-cherry-pick-of-#12837-upstream-release-3.7
Automated cherry pick of #12837: fix: fail to recover disk status if disk in unknown status
2021-12-08 12:45:09 +08:00
Qiu Jian
55d1647403 fix: fail to recover disk status if disk in unknown status 2021-12-08 00:29:29 +08:00
Zexi Li
4862cd2343 Merge pull request #12831 from swordqiu/automated-cherry-pick-of-#12829-upstream-release-3.7
Automated cherry pick of #12829: fix: opslog might log event with empty usercred
2021-12-07 10:24:47 +08:00
Qiu Jian
1c9a4d208c fix: opslog might log event with empty usercred 2021-12-06 22:17:05 +08:00
Zexi Li
ad9575a757 Merge pull request #12809 from rainzm/automated-cherry-pick-of-#12807-upstream-release-3.7
Automated cherry pick of #12807: fix(scheduler): consider perfer and avoid score when sorting HostPrirityList
2021-12-06 14:49:49 +08:00
Zexi Li
c1c85a6ae0 Merge pull request #12821 from swordqiu/automated-cherry-pick-of-#12819-upstream-release-3.7
Automated cherry pick of #12819: fix: fail to insert action log with empty notes
2021-12-06 00:04:16 +08:00
Zexi Li
c19625b549 Merge pull request #12824 from swordqiu/automated-cherry-pick-of-#12822-upstream-release-3.7
Automated cherry pick of #12822: fix: image service can start without valid track endpoints
2021-12-06 00:03:33 +08:00
Qiu Jian
cc5fa51d22 fix: image service can start without valid track endpoints 2021-12-05 23:30:15 +08:00
Qiu Jian
a4ecbeaa54 fix: fail to insert action log with empty notes 2021-12-05 23:26:01 +08:00
rainzm
c181ea4cdd fix(scheduler): consider perfer and avoid score when sorting HostPriorityList 2021-12-03 15:01:47 +08:00
Zexi Li
d7d30a7295 Merge pull request #12799 from rainzm/automated-cherry-pick-of-#12797-upstream-release-3.7
Automated cherry pick of #12797: fix(scheduler): correct sorting for HostPriorityList
2021-12-02 21:15:15 +08:00
rainzm
24fbba971f fix(scheduler): correct sorting for HostPriorityList 2021-12-02 21:09:39 +08:00
Zexi Li
ca30e96e07 Merge pull request #12789 from rainzm/automated-cherry-pick-of-#12787-upstream-release-3.7
Automated cherry pick of #12787: fix(esxiagent): update storagecachedimage status from 'ready' to 'active'
2021-12-02 14:15:11 +08:00
rainzm
a3d8a0facf fix(esxiagent): update storagecachedimage status from 'ready' to 'active' 2021-12-02 11:33:56 +08:00
Zexi Li
e8d7985344 Merge pull request #12779 from rainzm/automated-cherry-pick-of-#12777-upstream-release-3.7
Automated cherry pick of #12777: fix(ansibleserver): update file-repo from v0.3.3 to v0.3.4
2021-11-30 20:16:19 +08:00
rainzm
ff8ea35f96 fix(ansibleserver): update file-repo from v0.3.3 to v0.3.4
1. When checking telegraf, it is compatible with higher version Debian
2. Debian compatible when getting the installation package name
2021-11-30 17:55:49 +08:00
Zexi Li
8b1f127cad Merge pull request #12765 from ioito/automated-cherry-pick-of-#12763-upstream-release-3.7
Automated cherry pick of #12763: fix(region): delete vm and disk when it was not found
2021-11-30 00:04:35 +08:00
ioito
e015e06072 fix(region): delete vm and disk when it was not found 2021-11-29 16:40:03 +08:00
Zexi Li
a607840763 Merge pull request #12749 from swordqiu/automated-cherry-pick-of-#12747-upstream-release-3.7
Automated cherry pick of #12747: fix: vpcagent fail to refresh session token
2021-11-28 18:12:57 +08:00
Qiu Jian
20dab1e89d fix: vpcagent fail to refresh session token 2021-11-26 01:19:32 +08:00
Zexi Li
b270c4833d Merge pull request #12742 from rainzm/automated-cherry-pick-of-#12740-upstream-release-3.7
Automated cherry pick of #12740: fix: close it after using sql.Rows
2021-11-25 21:35:50 +08:00
Zexi Li
a592b16767 Merge pull request #12744 from rainzm/automated-cherry-pick-of-#12737-upstream-release-3.7
Automated cherry pick of #12737: fix(region): add rows.Close func
2021-11-25 21:35:16 +08:00
yangbaoqiang
4bf7b68e56 fix(region): add rows.Close func 2021-11-25 17:44:05 +08:00
rainzm
6b043e2392 fix: close it after using sql.Rows 2021-11-25 17:42:29 +08:00
Zexi Li
fbe66f5ed5 Merge pull request #12734 from ioito/automated-cherry-pick-of-#12732-upstream-release-3.7
Automated cherry pick of #12732: fix(region): apsara rds network sync
2021-11-25 00:43:38 +08:00
Qu Xuan
b99eb92ef2 fix(region): apsara rds network sync 2021-11-24 16:26:13 +08:00
Zexi Li
be4db4e8a5 Merge pull request #12728 from zexi/automated-cherry-pick-of-#12724-upstream-release-3.7
Automated cherry pick of #12724: fix(region): adjust the logic of rebuild guest
2021-11-23 10:14:56 +08:00
yangbaoqiang
90e3ad8463 fix(region): openstack.go
1.调整eip解绑后,重新绑定函数位置
2.调整guest数据盘卸载后,重新挂载函数位置
2021-11-23 10:11:53 +08:00
Zexi Li
33ce47428c Merge pull request #12704 from zexi/automated-cherry-pick-of-#12701-upstream-release-3.7
Automated cherry pick of #12701: fix(host): only local disk enable file.locking option on arm64 host
2021-11-18 22:23:50 +08:00
Zexi Li
8de1411e64 fix(host): only local disk enable file.locking option on arm64 host 2021-11-18 10:49:24 +08:00
Zexi Li
3a17d88a08 Merge pull request #12689 from ioito/automated-cherry-pick-of-#12687-upstream-release-3.7
Automated cherry pick of #12687: fix(cloudevent): qcloud event time
2021-11-17 16:41:25 +08:00
Zexi Li
e17219882e Merge pull request #12695 from swordqiu/hotfix/qj-fix-sqlchemy-version-for-release-3.7
fix: fix version of sqlchemy to v1.0.0 for release/3.7
2021-11-17 15:43:22 +08:00
Qiu Jian
08d7ef3e7a fix: fix version of sqlchemy to v1.0.0 for release/3.7 2021-11-17 14:52:41 +08:00
Qu Xuan
e673037461 fix(cloudevent): qcloud event time 2021-11-16 17:41:12 +08:00
Zexi Li
2acc3bd664 Merge pull request #12635 from tb365/bugfix/tb-bugfix-110802
fix: add license upload
2021-11-16 10:19:59 +08:00
Zexi Li
85decb22dd Merge pull request #12668 from swordqiu/automated-cherry-pick-of-#12666-upstream-release-3.7
Automated cherry pick of #12666: fix: fail to free reserved ip in non-owner project
2021-11-11 10:06:23 +08:00
Qiu Jian
ad737c19cb fix: fail to free reserved ip in non-owner project 2021-11-11 07:39:20 +08:00
Zexi Li
e7292c61ba Merge pull request #12654 from swordqiu/automated-cherry-pick-of-#12641-upstream-release-3.7
Automated cherry pick of #12641: fix: false delted field for deleted resources
2021-11-09 20:52:45 +08:00
Qiu Jian
c803b96fca fix: false delted field for deleted resources 2021-11-09 19:46:32 +08:00
Zexi Li
ef7b65085b Merge pull request #12648 from zexi/automated-cherry-pick-of-#12647-upstream-release-3.7
Automated cherry pick of #12647: fix(webconsole): host ssh use cloudroot user error
2021-11-09 19:32:01 +08:00
Zexi Li
bf9864632e fix(webconsole): host ssh use cloudroot user error 2021-11-09 18:33:39 +08:00
Zexi Li
eafd6bb3d1 Merge pull request #12638 from tb365/automated-cherry-pick-of-#12636-upstream-release-3.7
Automated cherry pick of #12636: qcloud&aliyun update backend weight value range fix
2021-11-09 01:15:49 +08:00
tb365
2fb770bf19 qcloud&aliyun update backend weight value range fix 2021-11-08 17:23:54 +08:00
Qu Xuan
bb5bb827d1 fix: add license upload 2021-11-08 16:59:01 +08:00
Jian Qiu
c400485b3a fix: cleanup compile warnings (#12622)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2021-11-06 12:29:55 +08:00
Zexi Li
93354f17ed Merge pull request #12324 from tb365/bugfix/tb-bugfix-092802
guest start sync with cloud vm
2021-11-05 18:38:28 +08:00
Zexi Li
899bc53fd3 Merge pull request #12611 from ioito/automated-cherry-pick-of-#12609-upstream-release-3.7
Automated cherry pick of #12609: fix(region): avoid cidr change 0.0.0.0/0
2021-11-05 10:40:13 +08:00
Qu Xuan
4b5b628fac fix(region): avoid cidr change 0.0.0.0/0 2021-11-05 10:06:13 +08:00
Zexi Li
3a258e01b3 feat(region,host): create or update server add machine option (#12607) 2021-11-04 22:27:12 +08:00
Zexi Li
515f057e58 Merge pull request #12592 from rainzm/automated-cherry-pick-of-#12590-upstream-release-3.7
Automated cherry pick of #12590: fix(esxi): avoid uplink dvpg
2021-11-03 18:07:46 +08:00
rainzm
ddd9c7b3a7 fix(esxi): avoid uplink dvpg 2021-11-03 17:06:35 +08:00
Zexi Li
954314848f Merge pull request #12563 from swordqiu/automated-cherry-pick-of-#12561-upstream-release-3.7
Automated cherry pick of #12561: fix: delayed probing GPU on host init and add disable_gpu option
2021-11-03 00:01:10 +08:00
Zexi Li
279752ebd0 Merge pull request #12579 from rainzm/automated-cherry-pick-of-#12577-upstream-release-3.7
Automated cherry pick of #12577: fix(region): delete instance snapshot itself after deleting subsnapshots
2021-11-02 23:47:57 +08:00
rainzm
b6a8a381f3 fix(region): delete instance snapshot itself after deleting subsnapshots 2021-11-02 10:29:36 +08:00
Zexi Li
de1a8e7ead Merge pull request #12573 from ioito/automated-cherry-pick-of-#12571-upstream-release-3.7
Automated cherry pick of #12571: fix(region): avoid panic when query is nil
2021-11-01 20:28:48 +08:00
Zexi Li
4049aea70c Merge pull request #12576 from rainzm/automated-cherry-pick-of-#12574-upstream-release-3.7
Automated cherry pick of #12574: Flag for installing agent
2021-11-01 20:27:29 +08:00
rainzm
808c0392fd feat(region): add have-agent action for guest 2021-11-01 19:42:26 +08:00
rainzm
b7c7884c04 feat(cloudproxy): add purge-forward for proxy endpoint 2021-11-01 19:42:26 +08:00
Qu Xuan
b90811d0bd fix(region): avoid panic when query is nil 2021-11-01 16:32:20 +08:00
Zexi Li
a3144a5542 Merge pull request #12566 from rainzm/automated-cherry-pick-of-#12564-upstream-release-3.7
Automated cherry pick of #12564: fix(region): init timerQueue correctly
2021-11-01 10:05:40 +08:00
rainzm
0bb2ee63d7 fix(region): init timerQueue correctly 2021-10-30 18:01:57 +08:00
Qiu Jian
cba42da3b4 fix: delayed probing GPU on host init and add disable_gpu option 2021-10-30 11:54:11 +08:00
Zexi Li
91996c7871 Merge pull request #12550 from swordqiu/automated-cherry-pick-of-#12548-upstream-release-3.7
Automated cherry pick of #12548: fix: apigateway request api_server option directly from keystone
2021-10-29 11:08:36 +08:00
Qiu Jian
05812fb3f8 fix: apigateway request api_server option directly from keystone 2021-10-28 23:55:03 +08:00
Zexi Li
3fd8cfe18c Merge pull request #12542 from ioito/automated-cherry-pick-of-#12540-upstream-release-3.7
Automated cherry pick of #12540: fix(host): avoid storage attach not report error
2021-10-28 18:25:45 +08:00
Qu Xuan
e050c5dd84 fix(host): avoid storage attach not report error 2021-10-28 17:01:13 +08:00
Zexi Li
6dc50cb125 Merge pull request #12537 from ioito/automated-cherry-pick-of-#12535-upstream-release-3.7
Automated cherry pick of #12535: fix(region): validate update
2021-10-28 16:36:48 +08:00
Qu Xuan
048d6fd8f1 fix(region): validate update 2021-10-27 17:55:56 +08:00
yunion-ci-robot
1a863c67ec Merge pull request #12514 from zhaoxiangchun/automated-cherry-pick-of-#12495-upstream-release-3.7
Automated cherry pick of #12495: fix(cloudcommon): update db_dispatcher set order by to sqlchemy.SQuery
2021-10-27 17:27:45 +08:00
Zexi Li
2cfef55af9 Merge pull request #12518 from tb365/automated-cherry-pick-of-#12517-upstream-release-3.7
Automated cherry pick of #12517: cn-southwest-2 default bgp type 5_sbgp
2021-10-26 19:32:28 +08:00
Zexi Li
377015dff5 Merge pull request #12525 from ioito/automated-cherry-pick-of-#12523-upstream-release-3.7
Automated cherry pick of #12523: fix(region): openstack eip sync
2021-10-26 19:16:03 +08:00
Qu Xuan
739ce265f7 fix(region): openstack eip sync 2021-10-26 15:37:12 +08:00
tb365
1af6227623 cn-southwest-2 default bgp type 5_sbgp 2021-10-26 09:30:11 +08:00
Zexi Li
5ee80b42f6 Merge pull request #12512 from zexi/automated-cherry-pick-of-#12510-upstream-release-3.7
Automated cherry pick of #12510: fix(baremetal): TaskWorkerCount options not init
2021-10-25 15:35:18 +08:00
zhaoxiangchun
052a98a560 fix(cloudcommon): update db_dispatcher set order by to sqlchemy.SQuery
1. 支持对使用了聚合函数的field进行orderby 操作,如:sum(amount) as
   amount
2021-10-25 14:22:47 +08:00
Zexi Li
8216e8e83b fix(baremetal): TaskWorkerCount options not init 2021-10-25 12:10:08 +08:00
Zexi Li
771b992664 Merge pull request #12509 from swordqiu/automated-cherry-pick-of-#11626-upstream-release-3.7
Automated cherry pick of #11626: fix: compatible with new io scheduler(bfq/mq-deadline) of new Linux kernel
2021-10-25 11:46:03 +08:00
Qiu Jian
81161fd8c7 fix: compatible with new io scheduler(bfq/mq-deadline) of new Linux kernel
1. support bfq/mq-deadline multiqueue io scheduler
2. add delay for link setup
2021-10-25 11:01:54 +08:00
yunion-ci-robot
0bb6d198e1 Merge pull request #12507 from ioito/automated-cherry-pick-of-#12505-upstream-release-3.7
Automated cherry pick of #12505: fix(region): qcloud classic nic and storage sync
2021-10-24 16:57:09 +08:00
Qu Xuan
e507287331 fix(region): qcloud classic nic and storage sync 2021-10-22 18:31:23 +08:00
Zexi Li
3def816f5b Merge pull request #12500 from ioito/automated-cherry-pick-of-#12498-upstream-release-3.7
Automated cherry pick of #12498: fix(region): hide rbd disk secret
2021-10-22 16:51:05 +08:00
Qu Xuan
7c03a8447b fix(region): hide rbd disk secret 2021-10-22 15:44:43 +08:00
Zexi Li
f44c9732ed Merge pull request #12493 from ioito/automated-cherry-pick-of-#12491-upstream-release-3.7
Automated cherry pick of #12491: fix(region): set storage with snapshot id when change vm disk config
2021-10-22 13:13:19 +08:00
Qu Xuan
e16020de56 fix(region): set storage with snapshot id when change vm disk config 2021-10-22 11:49:27 +08:00
yunion-ci-robot
e85ae135e9 Merge pull request #12489 from zexi/automated-cherry-pick-of-#12487-upstream-release-3.7
Automated cherry pick of #12487: fix(host): disk snapshot file locking off
2021-10-22 11:41:16 +08:00
Zexi Li
85d5b6e707 fix(host): disk snapshot file locking off 2021-10-22 11:21:33 +08:00
Zexi Li
e86201e5e5 Merge pull request #12473 from tb365/automated-cherry-pick-of-#12471-upstream-release-3.7
Automated cherry pick of #12471: host count add filters
2021-10-21 20:09:11 +08:00
Zexi Li
799951cdc1 Merge pull request #12483 from ioito/automated-cherry-pick-of-#12481-upstream-release-3.7
Automated cherry pick of #12481: fix(host): same mountpoint rbd storage
2021-10-21 17:11:51 +08:00
Qu Xuan
836c6c4a8f fix(host): same mountpoint rbd storage 2021-10-21 14:37:03 +08:00
Zexi Li
522a181aa7 Merge pull request #12477 from zexi/baremetal-rebuild-root
fix(baremetal): rebuild root calculate root disk partitions incorrect
2021-10-21 11:27:44 +08:00
Zexi Li
6be9f25d91 fix(baremetal): rebuild root calculate root disk partitions incorrect 2021-10-21 01:00:19 +08:00
tb365
3634601d3d host count add filters 2021-10-20 17:29:40 +08:00
Zexi Li
a4be855896 Merge pull request #12459 from zexi/automated-cherry-pick-of-#12457-upstream-release-3.7
Automated cherry pick of #12457: fix(baremetal): add task_worker_count option
2021-10-19 22:40:44 +08:00
Zexi Li
9a2ac4ab38 Merge pull request #12462 from ioito/automated-cherry-pick-of-#12460-upstream-release-3.7
Automated cherry pick of #12460: optimized(region): improve img convert speed
2021-10-19 22:38:51 +08:00
Zexi Li
cbb13fe8f1 Merge pull request #12466 from swordqiu/automated-cherry-pick-of-#12464-upstream-release-3.7
Automated cherry pick of #12464: fix: glance depends s3fs
2021-10-19 22:30:26 +08:00
Qiu Jian
8b28e83393 fix: glance depends s3fs 2021-10-19 12:32:40 +08:00
Qu Xuan
e3b40959cf optimized(region): improve img convert speed 2021-10-19 10:56:54 +08:00
Zexi Li
f0a6fe50f3 fix(baremetal): add task_worker_count option 2021-10-18 22:44:15 +08:00
Zexi Li
89fda32e5d Merge pull request #12348 from tb365/automated-cherry-pick-of-#12347-upstream-release-3.7
Automated cherry pick of #12347: ctyun api updates
2021-10-18 18:19:42 +08:00
Zexi Li
a0ccd87f52 Merge pull request #12446 from swordqiu/automated-cherry-pick-of-#12444-upstream-release-3.7
Automated cherry pick of #12444: fix: glance use multicloud objectstorage client to manipulate objectstorage
2021-10-18 15:14:34 +08:00
Qiu Jian
369f4bec04 fix: remove s3fs client from docker image 2021-10-17 02:53:52 +08:00
Qiu Jian
ae06963e71 fix: make minio endpoint compatible with multicloud objectstorage 2021-10-17 02:53:52 +08:00
Qiu Jian
88e14cac57 fix: glance use multicloud objectstorage client to manipulate objectstorage 2021-10-17 02:53:52 +08:00
Zexi Li
bd975ab477 Merge pull request #12421 from ioito/automated-cherry-pick-of-#12412-upstream-release-3.7
Automated cherry pick of #12412: fix(host): xfs unlock
2021-10-15 09:46:39 +08:00
Zexi Li
9b196ead74 Merge pull request #12425 from ioito/automated-cherry-pick-of-#12423-upstream-release-3.7
Automated cherry pick of #12423: fix(region): google rds tags sync
2021-10-15 09:45:48 +08:00
Zexi Li
e4cfbbaf09 Merge pull request #12428 from rainzm/automated-cherry-pick-of-#12426-upstream-release-3.7
Automated cherry pick of #12426: fix(region): wait all goroutine finished when execute scheduled_tasks
2021-10-15 09:39:05 +08:00
rainzm
4db8213419 fix(region): wait all goroutine finished when execute scheduled_tasks 2021-10-14 16:04:13 +08:00
Qu Xuan
d2ce12bd6c fix(region): google rds tags sync 2021-10-14 15:24:01 +08:00
Qu Xuan
c6f9daac65 fix(host): xfs unlock 2021-10-14 14:57:49 +08:00
Zexi Li
d96bdc4837 Merge pull request #12404 from rainzm/automated-cherry-pick-of-#12403-upstream-release-3.7
Automated cherry pick of #12403: fix(devtool): change agent install metadata key
2021-10-14 12:44:12 +08:00
Zexi Li
27e74a02d5 Merge pull request #12417 from swordqiu/automated-cherry-pick-of-#12415-upstream-release-3.7
Automated cherry pick of #12415: fix: enable disabled select user for windows (especially for windows 10)
2021-10-14 12:05:29 +08:00
Qiu Jian
9f75f47017 fix: enable disabled select user for windows (especially for windows 10) 2021-10-14 00:38:12 +08:00
rainzm
c820ae6a04 fix(devtool): change agent install metadata key
The tag beginning with sys will be overwritten by the cloud
2021-10-13 11:45:13 +08:00
Zexi Li
f05d941ef1 Merge pull request #12393 from ioito/automated-cherry-pick-of-#12391-upstream-release-3.7
Automated cherry pick of #12391: fix(region): aliyun rds tags sync
2021-10-12 19:55:54 +08:00
Qu Xuan
3e17d5c913 fix(region): aliyun rds tags sync 2021-10-12 18:05:31 +08:00
Zexi Li
7388d5715c Merge pull request #12389 from zexi/automated-cherry-pick-of-#12226-upstream-release-3.7
Automated cherry pick of #12226: [WIP] fix(baremetal): avoid redfish resp nil cause panic
2021-10-12 11:46:54 +08:00
Zexi Li
207dce08cf fix(baremetal): avoid redfish resp nil cause panic 2021-10-12 11:39:57 +08:00
Zexi Li
3dd18d5661 Merge pull request #12386 from zexi/automated-cherry-pick-of-#12384-upstream-release-3.7
Automated cherry pick of #12384: fix(glance): s3 uploaded image removed
2021-10-11 15:02:56 +08:00
Zexi Li
907410d0e7 fix(glance): s3 uploaded image removed 2021-10-11 12:45:44 +08:00
Zexi Li
41d155b8e4 Merge pull request #12383 from rainzm/automated-cherry-pick-of-#12381-upstream-release-3.7
Automated cherry pick of #12381: fix(devtool): creates a forward using the specified address
2021-10-11 12:45:23 +08:00
rainzm
75191c8854 fix(devtool): creates a forward using the specified address 2021-10-11 10:56:16 +08:00
屈轩
c6ced971a5 fix(glance): remove image clean (#12377)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2021-10-10 12:04:10 +08:00
屈轩
aa6b334413 fix(host): show disk details error (#12374)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2021-10-10 12:03:28 +08:00
Zexi Li
cfa9ba80d7 Merge pull request #12380 from zexi/automated-cherry-pick-of-#12378-upstream-release-3.7
Automated cherry pick of #12378: fix(monitor): use swagger ignore comment out structs
2021-10-09 21:47:02 +08:00
Zexi Li
3b09bd72fd fix(monitor): use swagger ignore comment out structs 2021-10-09 21:15:38 +08:00
Zexi Li
3302a0dcba Merge pull request #12360 from tb365/automated-cherry-pick-of-#12359-upstream-release-3.7
Automated cherry pick of #12359: kvm lb update lb listener redirect code fix
2021-10-08 10:13:43 +08:00
tangbin
e3747c446a kvm lb update lb listener redirect code fix 2021-10-08 09:42:26 +08:00
yunion-ci-robot
8636f06460 Merge pull request #12357 from zexi/automated-cherry-pick-of-#12355-upstream-release-3.7
Automated cherry pick of #12355: fix(baremetal): change cat path
2021-10-06 20:53:42 +08:00
Zexi Li
a46e24d305 fix(baremetal): change cat path 2021-10-05 21:36:07 +08:00
tb365
7b6db1672a ctyun api updates 2021-09-30 15:43:09 +08:00
Zexi Li
16102bfb68 Merge pull request #12345 from ioito/automated-cherry-pick-of-#12343-upstream-release-3.7
Automated cherry pick of #12343: fix(host): show error for online resize
2021-09-30 09:49:07 +08:00
Qu Xuan
629f288960 fix(host): show error for online resize 2021-09-29 20:30:39 +08:00
Zexi Li
34f4c41791 Merge pull request #12337 from zexi/automated-cherry-pick-of-#12335-upstream-release-3.7
Automated cherry pick of #12335: fix(baremetal): adjust adaptec raid logical volume order
2021-09-29 17:36:09 +08:00
Zexi Li
dd5e8f68a6 fix(baremetal): adjust adaptec raid logical volume order 2021-09-29 12:18:57 +08:00
Zexi Li
2180698617 Merge pull request #12330 from ioito/automated-cherry-pick-of-#12328-upstream-release-3.7
Automated cherry pick of #12328: fix(region): optimized dns zone sync
2021-09-28 19:56:16 +08:00
Qu Xuan
8ed75bcd4e fix(region): optimized dns zone sync 2021-09-28 19:33:32 +08:00
tb365
33aeb77d41 guest start sync with cloud vm 2021-09-28 15:20:47 +08:00
Zexi Li
8a86d866e5 Merge pull request #12304 from ioito/automated-cherry-pick-of-#12302-upstream-release-3.7
Automated cherry pick of #12302: fix(region): aliyun rds billing type
2021-09-26 20:11:08 +08:00
yunion-ci-robot
b04ec3f897 Merge pull request #12299 from zexi/automated-cherry-pick-of-#12241-upstream-release-3.7
Automated cherry pick of #12241: feat(baremetal): adaptec raid driver
2021-09-26 17:21:35 +08:00
Qu Xuan
593d06cf40 fix(region): aliyun rds billing type 2021-09-26 15:56:45 +08:00
Zexi Li
8ad3d34689 feat(baremetal): adaptec raid driver 2021-09-26 11:45:31 +08:00
Zexi Li
7bff6d28c8 Merge pull request #12267 from ioito/automated-cherry-pick-of-#12259-upstream-release-3.7
Automated cherry pick of #12259: fix(region): optimized validate delete condition query
2021-09-26 10:03:29 +08:00
Zexi Li
aeee3e4412 Merge pull request #12297 from swordqiu/automated-cherry-pick-of-#12295-upstream-release-3.7
Automated cherry pick of #12295: fix: clean openvswitch config files when save images
2021-09-26 09:57:14 +08:00
Qiu Jian
e051f22adf fix: clean openvswitch config files when save images 2021-09-24 22:04:37 +08:00
Zexi Li
53e01c5af3 Merge pull request #12280 from ioito/automated-cherry-pick-of-#12278-upstream-release-3.7
Automated cherry pick of #12278: fix(region): google vm mac addr
2021-09-24 15:25:35 +08:00
Zexi Li
3e69ba6147 Merge pull request #12277 from ioito/automated-cherry-pick-of-#12275-upstream-release-3.7
Automated cherry pick of #12275: fix(region): sync aws rds mem size
2021-09-24 15:25:14 +08:00
Zexi Li
e739c7c9f5 Merge pull request #12283 from swordqiu/automated-cherry-pick-of-#12281-upstream-release-3.7
Automated cherry pick of #12281: fix: disable password expiration for cloudroot
2021-09-24 15:24:17 +08:00
Zexi Li
7687cb15d8 Merge pull request #12287 from ioito/automated-cherry-pick-of-#12285-upstream-release-3.7
Automated cherry pick of #12285: fix(region): export field duplicate vpc
2021-09-24 15:23:33 +08:00
Zexi Li
48ed803d39 Merge pull request #12273 from zhaoxiangchun/automated-cherry-pick-of-#12272-upstream-release-3.7
Automated cherry pick of #12272: fix(monitor): fix cloudaccount monitor query return field err
2021-09-24 10:27:31 +08:00
Qu Xuan
1f33d32597 fix(region): export field duplicate vpc 2021-09-24 10:00:55 +08:00
Qiu Jian
7baf896bea fix: disable password expiration for cloudroot 2021-09-24 01:27:53 +08:00
yunion-ci-robot
796cc7fd5e Merge pull request #12271 from zexi/automated-cherry-pick-of-#12268-upstream-release-3.7
Automated cherry pick of #12268: fix(host): disable usb-kbd for windows 10
2021-09-24 00:28:40 +08:00
Qu Xuan
e42a313f36 fix(region): google vm mac addr 2021-09-23 20:30:07 +08:00
Qu Xuan
43620cd366 fix(region): sync aws rds mem size 2021-09-23 20:07:04 +08:00
zhaoxiangchun
eef56df9b3 fix(monitor): fix cloudaccount monitor query return field err 2021-09-23 18:00:19 +08:00
Zexi Li
336b98fa52 fix(host): disable usb-kbd for windows 10 2021-09-23 15:12:51 +08:00
Qu Xuan
8081389a8b fix(region): optimized validate delete condition query 2021-09-23 10:01:22 +08:00
Zexi Li
32cb609296 Merge pull request #12261 from swordqiu/automated-cherry-pick-of-#12258-upstream-release-3.7
Automated cherry pick of #12258: fix: verify token with expired_at field instead of depending on options.TokenExpirationSeconds
2021-09-23 09:37:49 +08:00
Zexi Li
913e807edb Merge pull request #12265 from ioito/automated-cherry-pick-of-#12263-upstream-release-3.7
Automated cherry pick of #12263: fix(region): external project support domain sync
2021-09-23 09:36:23 +08:00
Qu Xuan
5a87ca7c90 fix(region): external project support domain sync 2021-09-22 23:11:54 +08:00
Qiu Jian
2479ada755 fix: verify token with expired_at field instead of options.TokenExpirationSeconds 2021-09-22 15:35:49 +08:00
Zexi Li
a24d7deaa2 Merge pull request #12245 from rainzm/automated-cherry-pick-of-#12243-upstream-release-3.7
Automated cherry pick of #12243: fix(region): consider the network of the entire VPC when merging networks
2021-09-22 11:57:40 +08:00
Zexi Li
d50f997a0d Merge pull request #12224 from zexi/automated-cherry-pick-of-#12222-upstream-release-3.7
Automated cherry pick of #12222: fix(scheduler): cpu arch match
2021-09-22 11:56:00 +08:00
Zexi Li
1e44933604 Merge pull request #12256 from ioito/automated-cherry-pick-of-#12253-upstream-release-3.7
Automated cherry pick of #12253: fix(region): optimzed network query
2021-09-22 11:30:02 +08:00
Zexi Li
5520ff5621 fix(scheduler): cpu arch match 2021-09-22 11:14:28 +08:00
Qu Xuan
69bd9883bd fix(region): optimzed network query 2021-09-18 19:00:39 +08:00
Zexi Li
55cf913ee6 Merge pull request #12249 from ioito/automated-cherry-pick-of-#12247-upstream-release-3.7
Automated cherry pick of #12247: fix(scheduler): openstack scheduler options
2021-09-17 16:34:47 +08:00
Qu Xuan
1c59148b19 fix(scheduler): openstack scheduler options 2021-09-17 16:09:02 +08:00
rainzm
f23fe60cf2 fix(region): consider the network of the entire VPC when merging networks 2021-09-17 14:54:56 +08:00
Zexi Li
87e91ccb40 Merge pull request #12239 from ioito/automated-cherry-pick-of-#12213-upstream-release-3.7
Automated cherry pick of #12213: fix(cloudmon): batch send data
2021-09-17 09:35:10 +08:00
Zexi Li
98942c5156 Merge pull request #12235 from zexi/automated-cherry-pick-of-#12227-upstream-release-3.7
Automated cherry pick of #12227: feat(climc): SSH login of a host by private key
2021-09-17 00:25:05 +08:00
Qu Xuan
ad23814be0 fix(cloudmon): batch send data 2021-09-16 19:47:43 +08:00
Stargic
9a1d302a57 feat(climc): SSH login of a host by private key 2021-09-16 15:13:28 +08:00
Zexi Li
db0dd15828 Merge pull request #12221 from ioito/automated-cherry-pick-of-#12219-upstream-release-3.7
Automated cherry pick of #12219: fix(region): disk choice master host with os arch
2021-09-15 22:32:41 +08:00
yunion-ci-robot
2d8f981eb3 Merge pull request #12232 from zexi/automated-cherry-pick-of-#12230-upstream-release-3.7
Automated cherry pick of #12230: fix(baremetal): parse mptsas duplicated devices
2021-09-15 21:57:34 +08:00
Zexi Li
e3b97f743a fix(baremetal): parse mptsas duplicated devices 2021-09-15 21:20:42 +08:00
Qu Xuan
4a19f29dce fix(region): disk choice master host with os arch 2021-09-15 12:18:04 +08:00
Zexi Li
ceae939490 Merge pull request #12216 from zhaoxiangchun/automated-cherry-pick-of-#12214-upstream-release-3.7
Automated cherry pick of #12214: fix(cloudmon): Azure metric pull support metric interval
2021-09-15 10:02:56 +08:00
Zexi Li
bbf1da4f92 Merge pull request #12217 from zexi/automated-cherry-pick-of-#12202-upstream-release-3.7
Automated cherry pick of #12202: feat(climc): SSH Login with cloudroot (add new parameter --use-cloudroot in server-ssh)
2021-09-15 09:41:50 +08:00
Zexi Li
58af0f757d Merge pull request #12208 from swordqiu/automated-cherry-pick-of-#12206-upstream-release-3.7
Automated cherry pick of #12206: fix: AWS asume role with optional name
2021-09-15 01:15:17 +08:00
Stargic
263b20963d feat(climc): SSH Login with cloudroot (add new parameter --use-cloudroot in server-ssh)
fix(climc): Fixed the code logic error of FOR loop in server-ssh
2021-09-15 01:13:41 +08:00
zhaoxiangchun
7fa1223a70 fix(cloudmon): Azure metric pull support metric interval 2021-09-14 19:39:41 +08:00
Zexi Li
02871e0b1d Merge pull request #12167 from rainzm/automated-cherry-pick-of-#12166-upstream-release-3.7
Automated cherry pick of #12166: feat(region): add cloudcache for dnszone and secgroup details
2021-09-14 16:19:52 +08:00
Zexi Li
de000cc228 Merge pull request #12201 from ioito/automated-cherry-pick-of-#12199-upstream-release-3.7
Automated cherry pick of #12199: fix(region): apsara metric data
2021-09-14 16:18:03 +08:00
Zexi Li
892a802363 Merge pull request #12210 from tb365/automated-cherry-pick-of-#12209-upstream-release-3.7
Automated cherry pick of #12209: fix(region): change aws disk iops
2021-09-14 16:16:37 +08:00
tb365
adb29c4568 fix(region): change aws disk iops 2021-09-14 16:02:53 +08:00
Qu Xuan
44fe215547 fix(region): apsara metric data 2021-09-14 11:36:35 +08:00
Qiu Jian
2a2e387a02 fix: AWS asume role with optional name 2021-09-14 01:03:23 +08:00
yunion-ci-robot
09c74bd866 Merge pull request #12205 from zexi/automated-cherry-pick-of-#12203-upstream-release-3.7
Automated cherry pick of #12203: feat(cloudmon): support classic vm metrics
2021-09-13 23:01:29 +08:00
Zexi Li
2747de8fb1 feat(cloudmon): support classic vm metrics 2021-09-13 22:34:24 +08:00
Zexi Li
f4b2245b37 Merge pull request #12197 from tb365/automated-cherry-pick-of-#12196-upstream-release-3.7
Automated cherry pick of #12196: pure hcso zone is not empty fix
2021-09-13 17:08:55 +08:00
Zexi Li
203d480e73 Merge pull request #12195 from ioito/automated-cherry-pick-of-#12193-upstream-release-3.7
Automated cherry pick of #12193: fix(region): apsara resource group
2021-09-13 17:05:35 +08:00
tb365
4500feb2f2 pure hcso zone is not empty fix 2021-09-13 14:27:11 +08:00
Qu Xuan
02201abea7 fix(region): apsara resource group 2021-09-13 10:15:45 +08:00
yunion-ci-robot
2ac0807805 Merge pull request #12186 from ioito/automated-cherry-pick-of-#12184-upstream-release-3.7
Automated cherry pick of #12184: fix(region): qcloud database sync
2021-09-10 19:17:26 +08:00
Zexi Li
a929c6a76e Merge pull request #12178 from ioito/automated-cherry-pick-of-#12176-upstream-release-3.7
Automated cherry pick of #12176: fix(region): huawei region id with project name
2021-09-10 19:09:01 +08:00
Zexi Li
1201e6cf8d Merge pull request #12183 from ioito/automated-cherry-pick-of-#12181-upstream-release-3.7
Automated cherry pick of #12181: Hotfix/qx apsara project
2021-09-10 19:08:14 +08:00
Qu Xuan
727cc2dcdb fix(region): qcloud database sync 2021-09-10 18:32:01 +08:00
Qu Xuan
054d3f91b1 fix(region): sync apsara project info 2021-09-10 18:03:51 +08:00
Qu Xuan
36e37958dc fix(region): support apsara project 2021-09-10 17:52:49 +08:00
Qu Xuan
0dc41ca794 fix(region): 不能通过华为云用户创建时间判断云账号注册时间 2021-09-10 17:18:22 +08:00
Qu Xuan
a093ab58d0 fix(region): huawei region id with project name 2021-09-10 17:18:22 +08:00
Zexi Li
54d4eab97c Merge pull request #12175 from zexi/automated-cherry-pick-of-#12125-upstream-release-3.7
Automated cherry pick of #12125: fix(climc): SSH terminal window changes with the change of local terminal
2021-09-10 14:47:43 +08:00
Stargic
b3932b0c7c fix(climc): SSH terminal window changes with the change of local terminal 2021-09-10 11:56:56 +08:00
Zexi Li
19e38acb07 Merge pull request #12173 from ioito/automated-cherry-pick-of-#12171-upstream-release-3.7
Automated cherry pick of #12171: fix(scheduler): options for openstack scheduler
2021-09-10 11:54:10 +08:00
Zexi Li
152f4db435 Merge pull request #12170 from ioito/automated-cherry-pick-of-#12168-upstream-release-3.7
Automated cherry pick of #12168: fix(region): optimized qcloud tag sync
2021-09-09 20:26:01 +08:00
Qu Xuan
fbdd5a5317 fix(scheduler): options for openstack scheduler 2021-09-09 17:55:30 +08:00
Qu Xuan
18aff683f9 fix(region): optimized qcloud tag sync 2021-09-09 17:40:34 +08:00
rainzm
f45dbbd1e6 feat(region): add cloudcache for dnszone and secgroup details 2021-09-09 16:43:10 +08:00
Zexi Li
1af88b6a56 Merge pull request #12164 from ioito/automated-cherry-pick-of-#12162-upstream-release-3.7
Automated cherry pick of #12162: fix(region): sync apsara region
2021-09-09 16:29:38 +08:00
Qu Xuan
51917559d3 fix(region): sync apsara region 2021-09-09 15:49:23 +08:00
Zexi Li
8b02a108cc Merge pull request #12159 from swordqiu/automated-cherry-pick-of-#12157-upstream-release-3.7
Automated cherry pick of #12157: fix: set disk driver and network driver for converting esxi to kvm
2021-09-08 23:06:37 +08:00
Zexi Li
b976c9a555 Merge pull request #12151 from zhaoxiangchun/automated-cherry-pick-of-#12149-upstream-release-3.7
Automated cherry pick of #12149: fix(monitor): add monitor resource details field
2021-09-08 22:52:29 +08:00
Zexi Li
2ebba2d0e8 Merge pull request #12156 from ioito/automated-cherry-pick-of-#12154-upstream-release-3.7
Automated cherry pick of #12154: fix(region): sync aliyun qcloud default project
2021-09-08 22:51:36 +08:00
Qiu Jian
f678eb97bf fix: set disk driver and network driver for converting esxi to kvm 2021-09-08 22:29:31 +08:00
Qu Xuan
7c71578ae0 fix(region): sync aliyun qcloud default project 2021-09-08 20:30:04 +08:00
zhaoxiangchun
9e9d72d3ca fix(monitor): add monitor resource details field 2021-09-08 17:39:37 +08:00
Zexi Li
601c76236a Merge pull request #12143 from rainzm/automated-cherry-pick-of-#12141-upstream-release-3.7
Automated cherry pick of #12141: fix(devtool): get tenant info via correct field
2021-09-08 16:25:32 +08:00
Zexi Li
88e8d3119b Merge pull request #12147 from ioito/automated-cherry-pick-of-#12145-upstream-release-3.7
Automated cherry pick of #12145: fix(region): resource apsara resource id not found error
2021-09-08 16:21:28 +08:00
Qu Xuan
c4ba8aa63f fix(region): resource apsara resource id not found error 2021-09-08 15:55:07 +08:00
Zexi Li
9c800297b7 Merge pull request #12139 from ioito/automated-cherry-pick-of-#12126-upstream-release-3.7
Automated cherry pick of #12126: fix(region): apsara default region
2021-09-08 15:54:35 +08:00
rainzm
dd5a0e93b8 fix(devtool): get tenant info via correct field 2021-09-08 15:34:58 +08:00
Qu Xuan
768560c4d7 fix(region): apsara default region 2021-09-08 14:27:36 +08:00
Zexi Li
d6920ce23c Merge pull request #12128 from ioito/automated-cherry-pick-of-#12126-upstream-release-3.7
Automated cherry pick of #12126: fix(region): apsara default region
2021-09-08 13:58:19 +08:00
Zexi Li
dc86c09e1f Merge pull request #12136 from swordqiu/automated-cherry-pick-of-#12134-upstream-release-3.7
Automated cherry pick of #12134: fix(region): change disk and network drivers for Esxi converted VM
2021-09-08 12:01:47 +08:00
Qiu Jian
056243e99a fix(region): change disk and network drivers for Esxi converted VM 2021-09-08 11:48:15 +08:00
Zexi Li
b0a5a95344 Merge pull request #12132 from tb365/automated-cherry-pick-of-#12130-upstream-release-3.7
Automated cherry pick of #12130: fix(region): hcso sync server fix
2021-09-08 10:47:28 +08:00
tb365
4a32b970bf fix(region): hcso sync server fix 2021-09-08 10:42:32 +08:00
Qu Xuan
85c052a6ee fix(region): apsara default region 2021-09-08 10:36:24 +08:00
Zexi Li
d10353a824 Merge pull request #12123 from ioito/automated-cherry-pick-of-#12121-upstream-release-3.7
Automated cherry pick of #12121: fix(region): apsara endpoint fix
2021-09-07 15:25:52 +08:00
Qu Xuan
679437989a fix(region): apsara endpoint fix 2021-09-07 14:29:38 +08:00
Zexi Li
545a466561 Merge pull request #12119 from rainzm/automated-cherry-pick-of-#12117-upstream-release-3.7
Automated cherry pick of #12117: fix(devtool): create serviceurl
2021-09-07 10:50:30 +08:00
rainzm
d8d330d3d5 fix(devtool): create serviceurl 2021-09-07 10:37:21 +08:00
Zexi Li
9bd95312d7 Merge pull request #12115 from tb365/automated-cherry-pick-of-#12114-upstream-release-3.7
Automated cherry pick of #12114: NetworkUsableZoneIds remove duplicate zone ids
2021-09-06 21:47:56 +08:00
tb365
50d8f10b4e NetworkUsableZoneIds remove duplicate zone ids 2021-09-06 14:43:32 +08:00
Zexi Li
6731704344 Merge pull request #12107 from rainzm/automated-cherry-pick-of-#12105-upstream-release-3.7
Automated cherry pick of #12105: feat(devtool): add sshinfo and serviceurl
2021-09-05 16:58:49 +08:00
rainzm
5151880ec5 feat(devtool): add sshinfo and serviceurl 2021-09-04 18:31:35 +08:00
Zexi Li
0d20002e6e fix(baremetal): reindex nic (#12088) 2021-09-03 02:39:26 +08:00
Zexi Li
68e7ce0325 Merge pull request #12092 from zexi/automated-cherry-pick-of-#12090-upstream-release-3.7
Automated cherry pick of #12090: fix(climc-base): update tag to 20210901
2021-09-02 23:15:00 +08:00
Zexi Li
39dd4b116e Merge pull request #12095 from tb365/automated-cherry-pick-of-#12094-upstream-release-3.7
Automated cherry pick of #12094: fix(region): lb list search address fix
2021-09-02 18:32:29 +08:00
Zexi Li
52dd82a46d Merge pull request #12099 from zhaoxiangchun/automated-cherry-pick-of-#12097-upstream-release-3.7
Automated cherry pick of #12097: fix(monitor): monitor resource apiHelper fix
2021-09-02 18:30:28 +08:00
zhaoxiangchun
9904a6c4e9 fix(monitor): monitor resource apiHelper fix
1. apiHeleper 中增加interface,对应的ModelSet可以指定资源过滤参数
2. monitor删除过期的资源
2021-09-02 14:39:42 +08:00
tb365
7416d71d7c fix(region): lb list search address fix 2021-09-02 14:16:15 +08:00
Zexi Li
4670e4c014 Merge pull request #12070 from rainzm/automated-cherry-pick-of-#12067-upstream-release-3.7
Automated cherry pick of #12067: feat(region): allow custom sshport when make sshable
2021-09-02 11:43:47 +08:00
Zexi Li
8f7de66cfb fix(climc-base): update tag to 20210901 2021-09-01 20:18:13 +08:00
Zexi Li
2b1d6c4ff6 Merge pull request #12082 from ioito/automated-cherry-pick-of-#12080-upstream-release-3.7
Automated cherry pick of #12080: fix(region): access group policy
2021-09-01 16:36:00 +08:00
Zexi Li
875a88046a Merge pull request #12078 from tb365/automated-cherry-pick-of-#12077-upstream-release-3.7
Automated cherry pick of #12077: lb list api support search elastic ip
2021-09-01 15:17:14 +08:00
Zexi Li
acfc20be7c Merge pull request #12085 from swordqiu/automated-cherry-pick-of-#12083-upstream-release-3.7
Automated cherry pick of #12083: fix: add ceph-common to climc image, so as to make rbcli work
2021-09-01 14:48:20 +08:00
Qiu Jian
e1e58ef110 fix: add ceph-common to climc image, so as to make rbcli work 2021-09-01 12:36:33 +08:00
rainzm
b56e56bcbf feat(region): allow custom sshport when make sshable 2021-09-01 11:49:16 +08:00
Qu Xuan
209b23044e fix(region): access group policy 2021-09-01 11:18:27 +08:00
tb365
68019186ab lb list api support search elastic ip 2021-09-01 11:11:49 +08:00
Zexi Li
73bc984bcc Merge pull request #12074 from swordqiu/automated-cherry-pick-of-#12072-upstream-release-3.7
Automated cherry pick of #12072: fix: do not lock system account user
2021-08-31 21:02:00 +08:00
Qiu Jian
e6fbedf770 fix: do not lock system account user 2021-08-31 17:45:09 +08:00
Zexi Li
647be15a78 Merge pull request #12044 from tb365/automated-cherry-pick-of-#12043-upstream-release-3.7
Automated cherry pick of #12043: count host fix
2021-08-31 16:25:10 +08:00
tb365
92b8720bb6 change host type to hcso 2021-08-31 15:49:42 +08:00
tb365
aeab880a64 count host fix 2021-08-31 15:49:42 +08:00
yunion-ci-robot
873e88e2b8 Merge pull request #12066 from zexi/climc-host-delete
fix(climc): host-delete use batch delete function
2021-08-31 15:24:08 +08:00
Zexi Li
8830f6188e Merge pull request #12063 from tb365/automated-cherry-pick-of-#12062-upstream-release-3.7
Automated cherry pick of #12062: Bugfix/tb bugfix 083101
2021-08-31 15:16:18 +08:00
Zexi Li
b3c3d1faf9 fix(climc): host-delete use batch delete function 2021-08-31 15:09:02 +08:00
Zexi Li
4f5dab3490 Merge pull request #12061 from ioito/automated-cherry-pick-of-#12059-upstream-release-3.7
Automated cherry pick of #12059: fix(region): eip project sync
2021-08-31 11:32:11 +08:00
tb365
72ba92c351 make fmt 2021-08-31 11:22:18 +08:00
tb365
28f381b602 rename huaweicloudstack to hcso 2021-08-31 11:16:21 +08:00
tb365
3b55b9882f syncRemoveCloudHost purge host 2021-08-31 11:13:43 +08:00
Qu Xuan
80d49a1e7f fix(region): eip project sync 2021-08-31 10:34:47 +08:00
Zexi Li
159ad9b558 Merge pull request #12042 from rainzm/automated-cherry-pick-of-#12040-upstream-release-3.7
Automated cherry pick of #12040: feat(region): add no_tags options to filter guests
2021-08-31 10:01:34 +08:00
Zexi Li
5010b61440 Merge pull request #12058 from rainzm/automated-cherry-pick-of-#12056-upstream-release-3.7
Automated cherry pick of #12056: fix(region): delete the wrong tag 'nullable:false'
2021-08-31 09:56:44 +08:00
rainzm
68d5efad0b fix(region): delete the wrong tag 'nullable:false' 2021-08-30 16:59:44 +08:00
rainzm
c2ff56a000 feat(region): add no_tags options to filter guests
no_tags filter the guests without `no_tags`
2021-08-30 16:47:26 +08:00
Zexi Li
00f3e9c1e3 Merge pull request #12055 from ioito/automated-cherry-pick-of-#12053-upstream-release-3.7
Automated cherry pick of #12053: fix(region): sync vm os type
2021-08-30 15:05:32 +08:00
Qu Xuan
92fc4f009b fix(region): sync vm os type 2021-08-30 14:20:36 +08:00
Zexi Li
d6dfd434af Merge pull request #12051 from zexi/automated-cherry-pick-of-#12050-upstream-release-3.7
Automated cherry pick of #12050: fix(glance): image fuzzy match by distro
2021-08-27 18:02:37 +08:00
Zexi Li
54dbd4b8ff fix(glance): image fuzzy match by distro 2021-08-27 18:01:39 +08:00
Zexi Li
f3c4eb8e6f Merge pull request #12047 from zhaoxiangchun/automated-cherry-pick-of-#9750-upstream-release-3.7
Automated cherry pick of #9750: feat(region): be compatible with changes in monitor api in scaling group
2021-08-27 16:58:08 +08:00
Zexi Li
0b748ea859 Merge pull request #12048 from zhaoxiangchun/automated-cherry-pick-of-#12038-upstream-release-3.7
Automated cherry pick of #12038: fix(monitor): monitor rds sync
2021-08-27 16:57:05 +08:00
zhaoxiangchun
c11ae1235b fea(monitor): monitor apiHelper add domain,project 2021-08-27 16:04:22 +08:00
Zexi Li
929359ac4d Merge pull request #12032 from zexi/automated-cherry-pick-of-#12030-upstream-release-3.7
Automated cherry pick of #12030: fix(keystone): appsrv listen multi port failed cause of race condition
2021-08-27 14:29:56 +08:00
rainzm
9c36154c30 feat(region): be compatible with changes in monitor api in scaling group 2021-08-27 12:06:21 +08:00
Zexi Li
2898d87dcb Merge pull request #12036 from ioito/automated-cherry-pick-of-#12034-upstream-release-3.7
Automated cherry pick of #12034: fix(region): sync aliyun classic network ip addr
2021-08-26 18:04:07 +08:00
Qu Xuan
4b90b74ffb fix(region): sync aliyun classic network ip addr 2021-08-26 17:16:59 +08:00
Zexi Li
00aa056e7d fix(keystone): appsrv listen multi port failed cause of race condition 2021-08-26 16:55:14 +08:00
Zexi Li
28561dbea1 Merge pull request #12026 from zhaoxiangchun/automated-cherry-pick-of-#12024-upstream-release-3.7
Automated cherry pick of #12024: feat(cloudmon): support HuaweiCloudStack rds metric
2021-08-26 12:34:49 +08:00
Zexi Li
1f56517f4d Merge pull request #12000 from tb365/automated-cherry-pick-of-#11999-upstream-release-3.7
Automated cherry pick of #11999: hcso support sync vm host
2021-08-26 12:23:09 +08:00
Zexi Li
0b8f28f216 Merge pull request #12029 from zexi/automated-cherry-pick-of-#12027-upstream-release-3.7
Automated cherry pick of #12027: fix(vendor): use creack/pty v1.1.11 to adapt go 1.15
2021-08-26 12:09:09 +08:00
Zexi Li
44ef03219e fix(vendor): use creack/pty v1.1.11 to adapt go 1.15 2021-08-26 11:51:59 +08:00
Zexi Li
7fd194ba22 Merge pull request #12008 from rainzm/automated-cherry-pick-of-#12006-upstream-release-3.7
Automated cherry pick of #12006: feat(region): add direct vpc options
2021-08-26 11:26:20 +08:00
zhaoxiangchun
b96c560915 feat(cloudmon): support HuaweiCloudStack rds metric 2021-08-26 11:21:43 +08:00
rainzm
59dc000c0e feat(region): add direct field for vpc
This field describes whether the VPC can be connected directly
2021-08-26 11:11:00 +08:00
Zexi Li
5392e6c9e9 Merge pull request #12005 from rainzm/automated-cherry-pick-of-#12003-upstream-release-3.7
Automated cherry pick of #12003: fix(region): check instancesnapshot in correct place when resize disk
2021-08-26 10:42:49 +08:00
Zexi Li
e82c77cce3 Merge pull request #12016 from zexi/automated-cherry-pick-of-#12014-upstream-release-3.7
Automated cherry pick of #12014: fix(cloudcommon): avoid service exit when etcd unreachable
2021-08-26 10:41:46 +08:00
Zexi Li
ed23e0d6ca Merge pull request #12022 from zexi/automated-cherry-pick-of-#12020-upstream-release-3.7
Automated cherry pick of #12020: feat(cloudcommon): move ignore_nonrunning_guests option to common
2021-08-26 10:39:13 +08:00
Zexi Li
b8c5d18ac1 feat(cloudcommon): move ignore_nonrunning_guests option to common 2021-08-25 21:05:01 +08:00
tb365
d57d2be977 hcso support sync vm host 2021-08-25 20:45:08 +08:00
Zexi Li
40500b7219 Merge pull request #12011 from ioito/automated-cherry-pick-of-#12009-upstream-release-3.7
Automated cherry pick of #12009: fix(region): aliyun rds network sync
2021-08-25 20:18:49 +08:00
Zexi Li
242d7eaa0f fix(cloudcommon): avoid service exit when etcd unreachable 2021-08-25 19:48:41 +08:00
Qu Xuan
a90dbebf54 fix(region): aliyun rds network sync 2021-08-25 18:55:43 +08:00
Zexi Li
5d6cc519f3 Merge pull request #11996 from zhaoxiangchun/automated-cherry-pick-of-#11995-upstream-release-3.7
Automated cherry pick of #11995: fix(monitor):fix monitor query top 5
2021-08-25 18:18:46 +08:00
rainzm
27aa38040d fix(region): check instancesnapshot in correct place when resize disk 2021-08-25 17:16:12 +08:00
zhaoxiangchun
43d87e83eb fix(monitor):fix monitor query top 5 2021-08-25 10:14:17 +08:00
Zexi Li
fe397ac8a1 Merge pull request #11985 from ioito/automated-cherry-pick-of-#11983-upstream-release-3.7
Automated cherry pick of #11983: fix(region): enable zstack allocate ip by itself
2021-08-24 22:56:32 +08:00
Zexi Li
3489be83a9 Merge pull request #11990 from ioito/automated-cherry-pick-of-#11988-upstream-release-3.7
Automated cherry pick of #11988: fix(cloudid): hcso custom role
2021-08-24 22:55:11 +08:00
Qu Xuan
7416933ac1 fix(cloudid): hcso custom role 2021-08-24 21:11:00 +08:00
Qu Xuan
f60d419d9b fix(region): enable zstack allocate ip by itself 2021-08-24 16:08:40 +08:00
Zexi Li
c122017e45 Merge pull request #11976 from ioito/automated-cherry-pick-of-#11975-upstream-release-3.7
Automated cherry pick of #11975: fix(region): resource count for cachedimages
2021-08-23 19:59:19 +08:00
Zexi Li
25bba90b9c Merge pull request #11980 from zexi/automated-cherry-pick-of-#11979-upstream-release-3.7
Automated cherry pick of #11979: feat(glance): image support filter by os_type and distribution
2021-08-23 16:19:23 +08:00
Zexi Li
7409e8cb19 feat(glance): image support filter by os_type and distribution 2021-08-23 15:54:04 +08:00
Qu Xuan
d8e2f448b9 fix(region): resource count for cachedimages 2021-08-23 14:23:21 +08:00
Zexi Li
4f2aa13bbb Merge pull request #11972 from zhaoxiangchun/automated-cherry-pick-of-#11971-upstream-release-3.7
Automated cherry pick of #11971: fix(monitor): update apiHelper field and log
2021-08-23 12:16:55 +08:00
yunion-ci-robot
9d9973ae35 Merge pull request #11973 from zexi/automated-cherry-pick-of-#11970-upstream-release-3.7
Automated cherry pick of #11970: fix(region): allow guest network zero bandwidth limit
2021-08-23 12:14:12 +08:00
Zexi Li
ae809ca533 fix(region): allow guest network zero bandwidth limit 2021-08-23 11:55:50 +08:00
zhaoxiangchun
d8c1b49bdb fix(monitor): update apiHelper field and log 2021-08-23 10:24:23 +08:00
Zexi Li
73a209b049 Merge pull request #11969 from zhaoxiangchun/automated-cherry-pick-of-#11958-upstream-release-3.7
fix(monitor): fix monitor slow query
2021-08-23 10:04:16 +08:00
zhaoxiangchun
a0fc7d493d fix(monitor): fix monitor slow query
1. 使用apihelper 增量查询监控数据
2. 通过apihelper中set进行对应的资源过滤
2021-08-20 22:27:31 +08:00
Zexi Li
5d890449d0 Merge pull request #11965 from ioito/automated-cherry-pick-of-#11964-upstream-release-3.7
Automated cherry pick of #11964: fix(cloudid): hcso enable multi tenant saml provider
2021-08-20 17:05:45 +08:00
Qu Xuan
b7ccd35039 fix(cloudid): hcso enable multi tenant saml provider 2021-08-20 16:09:27 +08:00
Zexi Li
ee47ac3298 Merge pull request #11961 from rainzm/automated-cherry-pick-of-#11960-upstream-release-3.7
Automated cherry pick of #11960: fix(region): adjust the query range corresponding to the alarm strategy
2021-08-20 11:35:13 +08:00
rainzm
70864334d9 fix(region): adjust the query range corresponding to the alarm strategy
The data in the cycle range may not be available yet, and the data in the last hour can be queried fixedly
2021-08-20 11:11:36 +08:00
Zexi Li
3b0c73a550 Merge pull request #11955 from ioito/automated-cherry-pick-of-#11954-upstream-release-3.7
Automated cherry pick of #11954: fix(region): sync with multi worker
2021-08-19 16:11:59 +08:00
Qu Xuan
54bfc14038 fix(region): sync with multi worker 2021-08-19 15:16:23 +08:00
Zexi Li
7b5a573445 Merge pull request #11952 from zexi/automated-cherry-pick-of-#11951-upstream-release-3.7
Automated cherry pick of #11951: fix(host-deployer): XFS uuid冲突 无法 mount
2021-08-19 14:49:38 +08:00
panda
38ac153d69 fix(host-deployer): XFS uuid冲突 无法 mount
pkg/hostman/diskutils/fsutils/fsutils.go

1. ResizeFs 操作中 ResizePartitionFs 未对 xfs uuid 加锁
     导致挂载相同uuid 磁盘异异常
 - dmesg 显示
[86653.888361] XFS (nbd2p1): Filesystem has duplicate UUID f4553201-609a-4657-87aa-994cc6339f50 - can't mount

 - 批量创建虚拟机, 虚拟机磁盘为xfs, 多台虚拟机调度到同一宿主机时
   DeployGuestFs 无法 chroot password root
2021-08-19 14:46:03 +08:00
Zexi Li
bbd3988c2f Merge pull request #11949 from tb365/automated-cherry-pick-of-#11948-upstream-release-3.7
Automated cherry pick of #11948: huawei cloud getInstanceByIP add ip filter
2021-08-19 14:26:42 +08:00
tb365
7c026aa8d8 huawei cloud getInstanceByIP add ip filter 2021-08-19 11:21:25 +08:00
Zexi Li
0bcfe82417 Merge pull request #11926 from zhaoxiangchun/feature/zxc-cloudmon-3.7
fix(cloudmon): update ReportOptions field
2021-08-18 20:50:14 +08:00
Zexi Li
c75c8e2797 Merge pull request #11928 from tb365/automated-cherry-pick-of-#11927-upstream-release-3.7
Automated cherry pick of #11927: zone list timeout fix
2021-08-18 20:48:17 +08:00
Zexi Li
97aa7da982 Merge pull request #11940 from ioito/automated-cherry-pick-of-#11939-upstream-release-3.7
Automated cherry pick of #11939: fix(region): lb resource count
2021-08-18 20:47:21 +08:00
Zexi Li
039ab1a528 Merge pull request #11813 from rainzm/automated-cherry-pick-of-#11812-upstream-release-3.7
Automated cherry pick of #11812: feat(devtool): support batch applying for virtual machines
2021-08-18 18:14:34 +08:00
tb365
87503be372 zone list timeout fix 2021-08-18 15:34:57 +08:00
Qu Xuan
5b2dd8027e fix(region): lb resource count 2021-08-18 15:30:06 +08:00
Zexi Li
152b21bc2b Merge pull request #11933 from ioito/automated-cherry-pick-of-#11932-upstream-release-3.7
Automated cherry pick of #11932: fix(region): empty aliyun resource tag
2021-08-18 10:06:31 +08:00
Zexi Li
fa80920db1 Merge pull request #11937 from swordqiu/automated-cherry-pick-of-#11936-upstream-release-3.7
Automated cherry pick of #11936: fix: dhcp classless route encoding error
2021-08-18 10:03:23 +08:00
yunion-ci-robot
f50281cefc Merge pull request #11935 from zexi/automated-cherry-pick-of-#11934-upstream-release-3.7
Automated cherry pick of #11934: feat(misc): update build and service base image to use go v1.15.15
2021-08-17 23:31:46 +08:00
Qiu Jian
a865e922d4 fix: dhcp classless route encoding error 2021-08-17 23:28:54 +08:00
zhaoxiangchun
e0b6acb6ac fix(cloudmon): update ReportOptions field 2021-08-17 20:24:13 +08:00
Zexi Li
0549d821f9 feat(misc): update build and service base image to use go v1.15.15 2021-08-17 20:11:38 +08:00
Qu Xuan
28891dfbed fix(region): empty aliyun resource tag 2021-08-17 19:24:06 +08:00
Zexi Li
f89a67ee97 Merge pull request #11922 from ioito/automated-cherry-pick-of-#11921-upstream-release-3.7
Automated cherry pick of #11921: fix(cloudid): azure attach enabled subscription policy
2021-08-16 21:43:04 +08:00
Qu Xuan
6135e4a7b6 fix(cloudid): avoid sync clouduser twice 2021-08-16 15:12:30 +08:00
Qu Xuan
5fe7e3e3b3 fix(cloudid): azure attach enabled subscription policy 2021-08-16 15:12:30 +08:00
Zexi Li
981fad82a7 Merge pull request #11920 from zhaoxiangchun/automated-cherry-pick-of-#11915-upstream-release-3.7
Automated cherry pick of #11915: feat(monitor): 处理编排mysql,redis,rabbitmq 相关监控
2021-08-15 18:29:34 +08:00
zhaoxiangchun
83c216a41a feat(monitor): 处理编排mysql,redis,rabbitmq 相关监控 2021-08-15 18:13:53 +08:00
yunion-ci-robot
23f40319b8 Merge pull request #11919 from tb365/automated-cherry-pick-of-#11918-upstream-release-3.7
Automated cherry pick of #11918: ProviderFactory add method IsMultiTenant
2021-08-15 17:39:23 +08:00
tb365
85fafb47a0 ProviderFactory add method IsMultiTenant 2021-08-15 17:28:53 +08:00
Zexi Li
8cb7863c4e Merge pull request #11912 from tb365/automated-cherry-pick-of-#11911-upstream-release-3.7
Automated cherry pick of #11911: add default dns for subnet
2021-08-15 16:36:32 +08:00
Zexi Li
cb664e9f46 Merge pull request #11914 from ioito/automated-cherry-pick-of-#11913-upstream-release-3.7
Automated cherry pick of #11913: fix(cloudevent): hcso resource name
2021-08-15 16:35:20 +08:00
yunion-ci-robot
4863632b47 Merge pull request #11854 from zexi/automated-cherry-pick-of-#11853-upstream-release-3.7
Automated cherry pick of #11853: Fix bms reuse ipaddr
2021-08-15 16:26:23 +08:00
Qu Xuan
37c05a19e1 fix(cloudevent): hcso resource name 2021-08-15 16:24:27 +08:00
tb365
5aeaaa8e65 add default dns for subnet 2021-08-15 16:15:56 +08:00
Zexi Li
1f2324a3c8 Merge pull request #11910 from tb365/automated-cherry-pick-of-#11909-upstream-release-3.7
Automated cherry pick of #11909: fix(region): huawei cloud sync vm os arch
2021-08-15 14:05:14 +08:00
tb365
ee28e8903b fix(region): huawei cloud sync vm os arch 2021-08-15 13:53:33 +08:00
Zexi Li
f0dfe268c7 Merge pull request #11901 from zhaoxiangchun/automated-cherry-pick-of-#11900-upstream-release-3.7
Automated cherry pick of #11900: feat(monitor): add ext mysql,rabbitmq,redis metric
2021-08-15 11:01:08 +08:00
Zexi Li
d18b241986 Merge pull request #11908 from zexi/automated-cherry-pick-of-#11907-upstream-release-3.7
Automated cherry pick of #11907: feat(build): update glance and torrent base image
2021-08-15 02:17:49 +08:00
Zexi Li
fe673fcb60 feat(build): update glance and torrent base image 2021-08-15 02:15:44 +08:00
Zexi Li
0b4a72d4e4 Merge pull request #11906 from ioito/automated-cherry-pick-of-#11905-release-3.7
Automated cherry pick of #11905: fix(cloudevent): hcso event fix
2021-08-15 00:14:25 +08:00
Qu Xuan
89ad3778cd fix(cloudevent): hcso event fix 2021-08-15 00:08:16 +08:00
yunion-ci-robot
2901a41603 Merge pull request #11903 from zexi/automated-cherry-pick-of-#11902-upstream-release-3.7
Automated cherry pick of #11902: feat(mcclient): add k8s cluster monitor component disable option
2021-08-14 00:25:22 +08:00
Zexi Li
e74768ba22 Merge pull request #11898 from ioito/automated-cherry-pick-of-#11895-upstream-release-3.7
Automated cherry pick of #11895: fix(region): return region sql error
2021-08-13 21:16:07 +08:00
Zexi Li
1d3fcea400 feat(mcclient): add k8s cluster monitor component disable option 2021-08-13 21:14:36 +08:00
zhaoxiangchun
218ee0a462 feat(monitor): add ext mysql,rabbitmq,redis metric 2021-08-13 20:05:11 +08:00
Qu Xuan
5b8209d60f fix(region): return region sql error 2021-08-13 18:38:27 +08:00
Zexi Li
004be9b0f6 Merge pull request #11888 from swordqiu/automated-cherry-pick-of-#11887-upstream-release-3.7
Automated cherry pick of #11887: fix: routes to private prefixes should be distributed on private nic
2021-08-13 14:30:47 +08:00
Zexi Li
8d90cd13bb Merge pull request #11893 from ioito/automated-cherry-pick-of-#11892-upstream-release-3.7
Automated cherry pick of #11892: fix(region): hcso regional eip
2021-08-13 14:29:16 +08:00
Qu Xuan
5528a163ac fix(region): hcso regional eip 2021-08-13 11:02:59 +08:00
Qiu Jian
9c0f99d46f fix: routes to private prefixes should be distributed on private nic 2021-08-12 23:00:56 +08:00
Zexi Li
05f4b1beae Merge pull request #11884 from ioito/automated-cherry-pick-of-#11883-upstream-release-3.7
Automated cherry pick of #11883: fix(region): azure vm disk size
2021-08-12 21:04:11 +08:00
Zexi Li
b09812128e Merge pull request #11871 from zhaoxiangchun/automated-cherry-pick-of-#11870-upstream-release-3.7
Automated cherry pick of #11870: feat(cloudmon): support huaweistack monitor metric
2021-08-12 21:03:01 +08:00
Qu Xuan
30b112545d fix(region): azure vm disk size 2021-08-12 20:38:09 +08:00
Zexi Li
2f0e6887b7 Merge pull request #11880 from zexi/automated-cherry-pick-of-#11875-upstream-release-3.7
Automated cherry pick of #11875: Monitor temperature
2021-08-12 18:21:40 +08:00
Zexi Li
aee73f38ea Merge pull request #11881 from ioito/automated-cherry-pick-of-#11879-upstream-release-3.7
Automated cherry pick of #11879: add: hcso iam
2021-08-12 17:06:41 +08:00
Qu Xuan
6296264589 add: hcso iam 2021-08-12 16:51:50 +08:00
Zexi Li
2877d8fc7a feat(ansibleserver): update file-repo to v0.3.3 and use telegraf 1.19.2 2021-08-12 16:30:51 +08:00
Zexi Li
8ee769f312 feat(monitor): support temperature metrics 2021-08-12 16:26:52 +08:00
Zexi Li
395b04ace6 Merge pull request #11878 from tb365/automated-cherry-pick-of-#11877-upstream-release-3.7
Automated cherry pick of #11877: huawei cloud stack client fix
2021-08-12 15:43:25 +08:00
tb365
ed9396e717 goimports fix 2021-08-12 15:12:12 +08:00
tb365
3d6789e8fc huawei cloud stack client fix 2021-08-12 14:36:29 +08:00
Zexi Li
2e15f8d608 Merge pull request #11873 from ioito/automated-cherry-pick-of-#11872-upstream-release-3.7
Automated cherry pick of #11872: fix(region): delete dirty network
2021-08-12 10:55:52 +08:00
Qu Xuan
92e3b7ab4b fix(region): delete dirty network 2021-08-11 20:19:14 +08:00
zhaoxiangchun
449b9d85a7 feat(cloudmon): support huaweistack monitor metric 2021-08-11 20:09:29 +08:00
Zexi Li
2986334e8d Merge pull request #11868 from ioito/automated-cherry-pick-of-#11867-upstream-release-3.7
Automated cherry pick of #11867: fix(region): return sql error
2021-08-11 20:03:51 +08:00
Qu Xuan
1500639f01 fix(region): return sql error 2021-08-11 19:38:02 +08:00
Zexi Li
b47946b562 Merge pull request #11865 from swordqiu/automated-cherry-pick-of-#11864-upstream-release-3.7
Automated cherry pick of #11864: fix: resolve permission issues for samlusers and quotas
2021-08-11 17:50:57 +08:00
Qiu Jian
bed1c36fdb fix: resolve permission issues for samlusers and quotas 2021-08-11 17:23:32 +08:00
Zexi Li
b9bbe4df8d Merge pull request #11861 from ioito/automated-cherry-pick-of-#11860-upstream-release-3.7
Automated cherry pick of #11860: feat: hcso sku sync
2021-08-11 11:29:51 +08:00
Qu Xuan
b064162f9c feat: hcso sku sync 2021-08-11 10:53:48 +08:00
Zexi Li
bf4dabacef Merge pull request #11859 from tb365/automated-cherry-pick-of-#11847-upstream-release-3.7
Automated cherry pick of #11847: fix(region): update huawei cloud stack update credential
2021-08-10 17:01:11 +08:00
tb365
1587eba9e8 fix(region): update huawei cloud stack update credential 2021-08-10 16:51:41 +08:00
Zexi Li
9aa3362734 Merge pull request #11857 from tb365/automated-cherry-pick-of-#11843-upstream-release-3.7
Automated cherry pick of #11843: huawei client update
2021-08-10 16:49:27 +08:00
tb365
b51d6ee925 goimports fix 2021-08-10 16:34:07 +08:00
tb365
fc6806ad1b conflict fix 2021-08-10 16:32:57 +08:00
tb365
9e09a75918 fix(region): goimport fix 2021-08-10 16:30:29 +08:00
tb365
2996dfcd7a huawei client update 2021-08-10 16:28:31 +08:00
Zexi Li
b35e9d7a9a Merge pull request #11856 from zexi/automated-cherry-pick-of-#11848-upstream-release-3.7
Automated cherry pick of #11848: feat(climc): add SSH through EIP in server-ssh
2021-08-10 16:09:51 +08:00
Stargic
306e807fd9 feat(climc): add SSH through EIP in server-ssh 2021-08-10 15:55:48 +08:00
Zexi Li
524182fa25 fix(region): baremetal server reuse ip address condition 2021-08-10 10:44:29 +08:00
Zexi Li
12e07d8e16 Merge pull request #11850 from swordqiu/automated-cherry-pick-of-#11849-upstream-release-3.7
Automated cherry pick of #11849: fix: inter-vm traffic limited by eip bandwidth limit
2021-08-10 10:07:20 +08:00
yunion-ci-robot
f5a995a21d Merge pull request #11841 from zexi/automated-cherry-pick-of-#11840-upstream-release-3.7
Automated cherry pick of #11840: fix(region): not set baremetal is_maintenance when action is start
2021-08-10 00:19:01 +08:00
yunion-ci-robot
a94ca63498 Merge pull request #11846 from zexi/automated-cherry-pick-of-#11844-upstream-release-3.7
Automated cherry pick of #11844: fix(baremetal): increase ipmitool reboot sleep wait time
2021-08-10 00:18:00 +08:00
Qiu Jian
a212d77ded fix: inter-vm traffic limited by eip bandwidth limit 2021-08-10 00:15:03 +08:00
Zexi Li
16ed81e1da fix(baremetal): increase ipmitool reboot sleep wait time 2021-08-09 16:51:51 +08:00
Zexi Li
49dd563c62 fix(region): not set baremetal is_maintenance when action is start 2021-08-09 15:25:01 +08:00
Zexi Li
d7149b0fa0 Merge pull request #11834 from ioito/automated-cherry-pick-of-#11832-upstream-release-3.7
Automated cherry pick of #11832: fix(region): sync openstack multi zone storages
2021-08-07 14:29:38 +08:00
Zexi Li
e4899bd130 Merge pull request #11838 from rainzm/automated-cherry-pick-of-#11833-upstream-release-3.7
Automated cherry pick of #11833: Filter wires and networks from host_type of host
2021-08-07 14:29:01 +08:00
rainzm
374be49275 feat(region): add host_type filter for listing network
Also fixed the previous problem of using host to filter the network of yunioncloud
2021-08-06 19:03:53 +08:00
rainzm
2b9c4be9ec feat(region): add host_type filter for listing wires 2021-08-06 19:03:53 +08:00
Qu Xuan
81341af535 fix(region): sync openstack multi zone storages 2021-08-06 16:12:29 +08:00
Zexi Li
f5f3d2600c Merge pull request #11831 from tb365/automated-cherry-pick-of-#11830-upstream-release-3.7
Automated cherry pick of #11830: fix(apigateway): totp passcode verify error code fix
2021-08-06 11:24:18 +08:00
tb365
c4e41a412f fix(apigateway): totp passcode verify error code fix 2021-08-06 10:58:03 +08:00
Zexi Li
2daada9376 Merge pull request #11821 from ioito/automated-cherry-pick-of-#11820-upstream-release-3.7
Automated cherry pick of #11820: fix(region): support nas tags
2021-08-06 10:23:12 +08:00
Zexi Li
839eb9ccbd Merge pull request #11824 from rainzm/automated-cherry-pick-of-#11823-upstream-release-3.7
Automated cherry pick of #11823: fix(region): prohibit resizing the disk of a esxi vm with instance snapshots
2021-08-06 10:21:36 +08:00
Zexi Li
55270ba14f Merge pull request #11827 from ioito/automated-cherry-pick-of-#11826-upstream-release-3.7
Automated cherry pick of #11826: fix(region): add resource statistics filter params
2021-08-06 10:03:22 +08:00
Zexi Li
71ba486208 Merge pull request #11829 from ioito/automated-cherry-pick-of-#11828-upstream-release-3.7
Automated cherry pick of #11828: fix(webconsole): add jdcloud vnc
2021-08-06 00:40:33 +08:00
Qu Xuan
d0908d992e fix(webconsole): add jdcloud vnc 2021-08-05 20:40:57 +08:00
Qu Xuan
1e7dce8c3d fix(region): add resource statistics filter params 2021-08-05 19:43:31 +08:00
rainzm
e01cdbb27d fix(region): prohibit resizing the disk of a esxi vm with instance snapshots 2021-08-05 19:03:10 +08:00
Zexi Li
55e1bb709f Merge pull request #11819 from zhaoxiangchun/automated-cherry-pick-of-#11443-upstream-release-3.7
Automated cherry pick of #11443: fix(monitor): fix agent monitor query
2021-08-05 17:48:22 +08:00
Qu Xuan
5ad118518a fix(region): support nas tags 2021-08-05 17:29:55 +08:00
Zexi Li
9db1fe7b0d Merge pull request #11809 from ioito/automated-cherry-pick-of-#11808-upstream-release-3.7
Automated cherry pick of #11808: fix(region): avoid get openstack hostid panic
2021-08-05 17:18:32 +08:00
zhaoxiangchun
f9bf35fed1 fix(monitor): fix agent monitor query
1.修复agent监控查询图表显示id的问题
2021-08-05 17:17:56 +08:00
Zexi Li
8968c73562 Merge pull request #11816 from rainzm/automated-cherry-pick-of-#11815-upstream-release-3.7
Automated cherry pick of #11815: feat(region): check whether the esxi host is ip or domain name
2021-08-05 17:17:55 +08:00
Zexi Li
d61a5198ce Merge pull request #11818 from zhaoxiangchun/automated-cherry-pick-of-#10978-upstream-release-3.7
Automated cherry pick of #10978: feat(monitor): add agent monitor metric
2021-08-05 17:16:14 +08:00
zhaoxiangchun
c6082abae2 feat(monitor): add agent monitor metric
1.增加对agent采集数据的翻译
2021-08-05 16:55:17 +08:00
rainzm
0267b9a8be feat(region): check whether the esxi host is ip or domain name 2021-08-05 16:10:41 +08:00
rainzm
0395b51463 feat(devtool): support batch applying for virtual machines 2021-08-05 15:01:08 +08:00
Qu Xuan
fcba57f1c2 fix(region): avoid get openstack hostid panic 2021-08-05 14:19:06 +08:00
yunion-ci-robot
10576a300d Merge pull request #11804 from zexi/automated-cherry-pick-of-#11803-upstream-release-3.7
Automated cherry pick of #11803: fix(baremetal): inject mac when admin nic found
2021-08-04 20:10:57 +08:00
Zexi Li
4dbecc4500 fix(baremetal): inject mac when admin nic found 2021-08-04 18:53:53 +08:00
Zexi Li
066d0c6a87 Merge pull request #11801 from rainzm/automated-cherry-pick-of-#11796-upstream-release-3.7
Automated cherry pick of #11796: fix(esxiagetn): keep compatible with the lower version vcenter when copying the disk
2021-08-04 16:14:51 +08:00
rainzm
8ce51213fe fix(esxiagetn): keep compatible with the lower version vcenter when copying the disk 2021-08-04 15:29:04 +08:00
Zexi Li
3bae895ca1 Merge pull request #11793 from swordqiu/automated-cherry-pick-of-#11792-upstream-release-3.7
Automated cherry pick of #11792: fix: add purge split log commands for cloudevent and cloudlog
2021-08-04 10:23:22 +08:00
yunion-ci-robot
31c36f00c4 Merge pull request #11790 from zexi/automated-cherry-pick-of-#11788-upstream-release-3.7
Automated cherry pick of #11788: fix(region): baremetal server resued address nic count should be subtracted
2021-08-03 23:54:56 +08:00
Zexi Li
dbddb80087 Merge pull request #11795 from swordqiu/automated-cherry-pick-of-#11794-upstream-release-3.7
Automated cherry pick of #11794: fix: server migrate network to a vlan network
2021-08-03 20:05:23 +08:00
Zexi Li
571c94b7a5 Merge pull request #11787 from zexi/automated-cherry-pick-of-#11768-upstream-release-3.7
Automated cherry pick of #11768: feat(climc): add Port-Forward SSH  in server-ssh
2021-08-03 20:03:51 +08:00
yunion-ci-robot
61a39145dd Merge pull request #11785 from zexi/automated-cherry-pick-of-#11784-upstream-release-3.7
Automated cherry pick of #11784: fix(baremetal): inject mac to cmdline
2021-08-03 18:59:56 +08:00
Qiu Jian
b70e158516 fix: server migrate network to a vlan network 2021-08-03 18:07:14 +08:00
Qiu Jian
3423a9105c fix: add purge split log commands for cloudevent and cloudlog 2021-08-03 17:20:56 +08:00
Zexi Li
0d6fe4f4e7 fix(region): baremetal server resued address nic count should be subtracted 2021-08-03 15:40:33 +08:00
Stargic
344804b0f2 fix(climc): modify the code logic of starting "Port-Forward SSH" 2021-08-03 14:32:56 +08:00
Stargic
1355d9e384 feat(climc): add Port-Forward SSH in server-ssh 2021-08-03 14:32:56 +08:00
Zexi Li
c222e532ae fix(baremetal): inject mac to cmdline 2021-08-03 12:28:22 +08:00
Zexi Li
fa8bd78b56 Merge pull request #11778 from zhaoxiangchun/automated-cherry-pick-of-#11777-upstream-release-3.7
Automated cherry pick of #11777: fix(monitor): fix resource details can't show monitor metric
2021-08-02 19:57:32 +08:00
Zexi Li
ee1baa4e8f Merge pull request #11775 from rainzm/automated-cherry-pick-of-#11774-upstream-release-3.7
Automated cherry pick of #11774: fix(scheduler): make option EnableQuotaCheck work
2021-08-02 18:00:42 +08:00
zhaoxiangchun
b8f7eca40b fix(monitor): fix resource details can't show monitor metric 2021-08-02 17:34:40 +08:00
rainzm
e84aee02a3 fix(scheduler): make option EnableQuotaCheck work 2021-08-02 14:32:03 +08:00
Zexi Li
d5dc1af89b Merge pull request #11771 from zexi/automated-cherry-pick-of-#11770-upstream-release-3.7
Automated cherry pick of #11770: add host type count api
2021-08-02 11:57:43 +08:00
tb365
1bc51e386b add host type count api 2021-08-02 11:35:50 +08:00
Zexi Li
42845c1b19 Merge pull request #11757 from zhaoxiangchun/automated-cherry-pick-of-#11672-upstream-release-3.7
Automated cherry pick of #11672: fix(monitor): fix monitor bug
2021-07-31 11:45:10 +08:00
Zexi Li
f06d75d15d Merge pull request #11762 from rainzm/automated-cherry-pick-of-#11761-upstream-release-3.7
Automated cherry pick of #11761: fix: avoid double counting when compute networks nic count
2021-07-31 11:38:32 +08:00
yunion-ci-robot
b3bff7e9f7 Merge pull request #11759 from zexi/automated-cherry-pick-of-#11758-upstream-release-3.7
Automated cherry pick of #11758: fix(region): baremetal spec condition
2021-07-31 01:47:36 +08:00
rainzm
597f2b149d fix: avoid double counting when compute networks nic count 2021-07-30 20:05:11 +08:00
Zexi Li
ef7ae54d21 fix(region): baremetal spec condition 2021-07-30 17:09:11 +08:00
zhaoxiangchun
bd82868c98 fix(monitor): fix monitor bug
1.支持修改默认报警策略:查询周期、连续周期和静默期
2.监控总览-图表中过滤已删除机器信息
2021-07-30 10:16:47 +08:00
Zexi Li
c2bb195f83 Merge pull request #11756 from zhaoxiangchun/feature/zxc-cloudmon-3.7
feat(cloudmon): 3.7 add cloudmon component
2021-07-29 21:23:01 +08:00
zhaoxiangchun
8aea54e84d feat(cloudmon): 3.7 add cloudmon component 2021-07-29 20:59:01 +08:00
Zexi Li
08d648a3aa Merge pull request #11755 from zexi/automated-cherry-pick-of-#11754-upstream-release-3.7
Automated cherry pick of #11754: feat(build): update ansibleserver dockerfile
2021-07-29 20:12:30 +08:00
Zexi Li
c7c8765256 Merge pull request #11753 from zexi/automated-cherry-pick-of-#11752-upstream-release-3.7
Automated cherry pick of #11752: fix(host,region): disable health checker by default
2021-07-29 19:23:57 +08:00
Zexi Li
19124cb9ef feat(build): update ansibleserver dockerfile 2021-07-29 19:22:14 +08:00
Zexi Li
36e6dddd81 fix(host,region): disable health checker by default 2021-07-29 19:08:50 +08:00
Zexi Li
fe7937fd35 Merge pull request #11749 from zexi/automated-cherry-pick-of-#11748-upstream-release-3.7
Automated cherry pick of #11748: feat(ansibleserver): record running cmd to debug
2021-07-29 16:40:13 +08:00
Zexi Li
c310a1898f Merge pull request #11737 from zexi/automated-cherry-pick-of-#11736-upstream-release-3.7
Automated cherry pick of #11736: fix(region): raise GetNamedNetworkConfiguration error
2021-07-29 16:39:17 +08:00
Zexi Li
5ed3eec537 Merge pull request #11742 from rainzm/automated-cherry-pick-of-#11741-upstream-release-3.7
Automated cherry pick of #11741: fix(region): prevent the creation of redundant network segments when managing vmware
2021-07-29 16:38:48 +08:00
Zexi Li
286dd1e4ff Merge pull request #11750 from zexi/automated-cherry-pick-of-#11746-upstream-release-3.7
Automated cherry pick of #11746: fix: purge splitable logs for cloudevents and logger
2021-07-29 15:39:48 +08:00
Qiu Jian
feb19332a6 fix: purge splitable logs for cloudevents and logger 2021-07-29 12:05:53 +08:00
Zexi Li
7147922973 feat(ansibleserver): record running cmd to debug 2021-07-29 12:03:59 +08:00
rainzm
c128ad3a89 fix(region): prevent the creation of redundant network segments when managing vmware 2021-07-28 17:43:50 +08:00
Zexi Li
ebf519bd63 fix(region): raise GetNamedNetworkConfiguration error 2021-07-28 17:25:41 +08:00
1180 changed files with 48009 additions and 21971 deletions

View File

@@ -268,7 +268,8 @@ dep:
@$(MAKE) mod
mod:
go get -d $(patsubst %,%@master,$(shell GO111MODULE=on go mod edit -print | sed -n -e 's|.*\(yunion.io/x/[a-z].*\) v.*|\1|p'))
go get -d $(patsubst %,%@master,$(shell GO111MODULE=on go mod edit -print | sed -n -e 's|.*\(yunion.io/x/[a-z].*\) v.*|\1|p' | grep -v sqlchemy))
go get -d yunion.io/x/sqlchemy@v1.0.0
go mod tidy
go mod vendor -v
@@ -330,7 +331,7 @@ image:
.PHONY: image
image-telegraf-raid-plugin:
VERSION=release-1.6.1 ARCH=all make image telegraf-raid-plugin
VERSION=release-1.6.3 ARCH=all make image telegraf-raid-plugin
%:
@:

View File

@@ -7,8 +7,8 @@ endif
ModBaseName:=$(notdir $(ModName))
DockerImageRegistry?=registry.cn-beijing.aliyuncs.com
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:1.0-5
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:1.1-4
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:1.1-5
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:1.1-5
EnvIf=$(if $($(1)),$(1)=$($(1)))

View File

@@ -1,7 +1,7 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.0.3
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.0.5
# install playbook and telegraf install pkg
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.2.1 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.2.1 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.3.4 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.3.4 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
ADD ./_output/alpine-build/bin/ansibleserver /opt/yunion/bin/ansibleserver

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/apigateway /opt/yunion/bin/apigateway
ADD ./_output/alpine-build/bin/apigateway /opt/yunion/bin/apigateway

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.1
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.3
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"

View File

@@ -1,7 +1,8 @@
FROM --platform=linux/amd64 registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21060506.x86_64.rpm
RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
#RUN yum install -y http://192.168.23.50:8083/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Yaoqi Wan <wanyaoqi@yunionyun.com>"

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:20210701
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:20210901
ADD ./build/climc/root/opt /opt

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
@@ -8,7 +8,7 @@ RUN mkdir -p /opt/yunion/bin
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
RUN apk add --no-cache bash bash-completion tzdata ca-certificates vim ipmitool kubectl && \
RUN apk add --no-cache bash bash-completion tzdata ca-certificates vim ipmitool kubectl ceph-common && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/cloudevent /opt/yunion/bin/cloudevent
ADD ./_output/alpine-build/bin/cloudevent /opt/yunion/bin/cloudevent

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
COPY ./build/cloudid/root/opt/ /opt/
ADD ./_output/alpine-build/bin/cloudid /opt/yunion/bin/cloudid

View File

@@ -0,0 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
RUN mkdir -p /etc/yunion/data/
ADD ./_output/alpine-build/bin/cloudmon \
/opt/yunion/bin/

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/cloudnet /opt/yunion/bin/cloudnet
ADD ./_output/alpine-build/bin/cloudnet /opt/yunion/bin/cloudnet

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/cloudproxy /opt/yunion/bin/cloudproxy

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/devtool /opt/yunion/bin/devtool
ADD ./_output/alpine-build/bin/devtool /opt/yunion/bin/devtool

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
COPY ./build/esxi-agent/root/opt/ /opt/

View File

@@ -11,10 +11,10 @@ RUN set -x \
# install default playbook and install pkg
Run mkdir -p /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf-1.5.0~yn-1.aarch64.rpm -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf-1.5.0~yn-1.x86_64.rpm -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf_1.5.0~yn-1_amd64.deb -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf_1.5.0~yn-1_arm64.deb -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf-1.19.2-yn~fe11a96b-0.aarch64.rpm -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf-1.19.2-yn~fe11a96b-0.x86_64.rpm -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf_1.19.2-yn~fe11a96b-0_amd64.deb -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf_1.19.2-yn~fe11a96b-0_arm64.deb -P /opt/yunion/ansible-install-pkg
Run mkdir -p /opt/yunion/playbook
Run mkdir /opt/yunion/playbook/monitor-agent

View File

@@ -1,7 +1,7 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:20200820
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:20210815.0
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
RUN apk add --no-cache s3fs-fuse --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/glance /opt/yunion/bin/glance
ADD ./_output/alpine-build/bin/glance /opt/yunion/bin/glance

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/keystone /opt/yunion/bin/keystone
ADD ./_output/alpine-build/bin/keystone /opt/yunion/bin/keystone

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/logger /opt/yunion/bin/logger

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
COPY ./build/monitor/root/opt/ /opt/
ADD ./_output/alpine-build/bin/monitor /opt/yunion/bin/monitor
ADD ./_output/alpine-build/bin/monitor /opt/yunion/bin/monitor

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
COPY ./build/notify/root/opt/ /opt/
ADD ./_output/alpine-build/bin/notify /opt/yunion/bin/notify

View File

@@ -1,4 +1,5 @@
FROM alpine:3.11
# TODO: use 3.14 will lead 'apk add qemu-img fail on arm64'
FROM alpine:3.13.5
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
COPY ./build/region/root/opt/ /opt/
ADD ./_output/alpine-build/bin/region /opt/yunion/bin/region

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/region-dns /opt/yunion/bin/region-dns

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/s3gateway /opt/yunion/bin/s3gateway
ADD ./_output/alpine-build/bin/s3gateway /opt/yunion/bin/s3gateway

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/scheduler /opt/yunion/bin/scheduler
ADD ./_output/alpine-build/bin/scheduler /opt/yunion/bin/scheduler

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunion-rootfs:v1.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunion-rootfs:v1.1
ADD ./_output/centos-build/bin/telegraf-raid-plugin /opt/yunion/bin/telegraf-raid-plugin

View File

@@ -1,15 +1,15 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Yaoqi Wan <wanyaoqi@yunionyun.com>"
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
# HACK: use v3.14 alpine mirror to upgrade qemu-img
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
RUN apk update && \
apk add --no-cache tzdata ca-certificates qemu-img && \
apk add --no-cache qemu-img && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV TZ Asia/Shanghai
# add executable file torrent
# make cmd/torrent
RUN mkdir -p /opt/yunion/bin

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
ADD ./_output/alpine-build/bin/yunionconf /opt/yunion/bin/yunionconf

View File

@@ -7,14 +7,29 @@ debian10-base:
docker buildx build --platform linux/arm64,linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0 -f ./Dockerfile.debian-base .
CLIMC_BASE_VERSION = 20210701
ONECLOUD_BASE_VERSION = v0.3.5
onecloud-base:
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION) -f ./Dockerfile.onecloud-base .
ANSIBLESERVER_BASE = v1.0.5
ansibleserver-base:
$(DOCKER_BUILDX)/ansibleserver-base:$(ANSIBLESERVER_BASE) -f ./Dockerfile.ansibleserver-base .
CLIMC_BASE_VERSION = 20210901
climc-base:
docker buildx build --platform linux/arm64,linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/climc-base:$(CLIMC_BASE_VERSION) -f ./Dockerfile.climc-base .
BAREMETAL_BASE_VERSION = v0.3.1
BAREMETAL_BASE_VERSION = v0.3.3
baremetal-base:
$(DOCKER_BUILDX)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base .
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
FILE_REPO_VERSION = v0.3.3
file-repo:
$(DOCKER_BUILDX)/file-repo:$(FILE_REPO_VERSION) -f ./Dockerfile.file-repo .

View File

@@ -1,24 +1,24 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:1.0-5 as build
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN mkdir -p /root/go/src/yunion.io/x/onecloud
COPY . /root/go/src/yunion.io/x/onecloud
RUN cd /root/go/src/yunion.io/x/onecloud && make cmd/torrent
WORKDIR /root/go/src/yunion.io/x/onecloud
RUN make cmd/torrent
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
MAINTAINER "Yaoqi Wan <wanyaoqi@yunionyun.com>"
# HACK: use v3.14 alpine mirror to upgrade qemu-img
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
RUN apk update && \
apk add --no-cache tzdata ca-certificates qemu-img && \
apk add --no-cache qemu-img && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV TZ Asia/Shanghai
# TAG=20210815.0
# add executable file torrent
# make cmd/torrent
RUN mkdir -p /opt/yunion/bin

View File

@@ -0,0 +1,2 @@
_output/alpine-build/_cache

View File

@@ -40,4 +40,18 @@ func init() {
printList(result, modules.Cloudevents.GetColumns(s))
return nil
})
type CloudeventLogsPurgeOptions struct {
}
R(&CloudeventLogsPurgeOptions{}, "cloud-event-purge", "Purge obsolete cloud event logs", func(s *mcclient.ClientSession, opts *CloudeventLogsPurgeOptions) error {
_, err := modules.Cloudevents.PerformClassAction(s, "purge-splitable", nil)
if err != nil {
return err
}
_, err = modules.CloudeventLogs.PerformClassAction(s, "purge-splitable", nil)
if err != nil {
return err
}
return nil
})
}

View File

@@ -28,4 +28,5 @@ func init() {
cmd.List(&options.ProxyAgentListOptions{})
cmd.Show(&options.ProxyAgentShowOptions{})
cmd.Delete(&options.ProxyAgentDeleteOptions{})
cmd.Perform("purge-forwards", &options.ProxyAgentPurgeForwardsOptions{})
}

View File

@@ -37,6 +37,7 @@ func init() {
cmd.CreateWithKeyword("create-aws", &options.SAWSCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-openstack", &options.SOpenStackCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-huawei", &options.SHuaweiCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-hcso", &options.SHCSOAccountCreateOptions{})
cmd.CreateWithKeyword("create-ucloud", &options.SUcloudCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-zstack", &options.SZStackCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-s3", &options.SS3CloudAccountCreateOptions{})
@@ -54,6 +55,7 @@ func init() {
cmd.UpdateWithKeyword("update-aws", &options.SAWSCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-openstack", &options.SOpenStackCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-huawei", &options.SHuaweiCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-hcso", &options.SHCSOAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-ucloud", &options.SUcloudCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-zstack", &options.SZStackCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-s3", &options.SS3CloudAccountUpdateOptions{})
@@ -69,6 +71,7 @@ func init() {
cmd.PerformWithKeyword("update-credential-aws", "update-credential", &options.SAWSCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-openstack", "update-credential", &options.SOpenStackCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-huawei", "update-credential", &options.SHuaweiCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-hcso", "update-credential", &options.SHCSOAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-ucloud", "update-credential", &options.SUcloudCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-zstack", "update-credential", &options.SZStackCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-s3", "update-credential", &options.SS3CloudAccountUpdateCredentialOptions{})

View File

@@ -15,10 +15,12 @@
package compute
import (
"context"
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -26,6 +28,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/httputils"
"yunion.io/x/onecloud/pkg/util/ssh"
)
@@ -43,7 +46,7 @@ func init() {
cmd.Perform("start", &options.BaseIdOptions{})
cmd.Perform("stop", &options.BaseIdOptions{})
cmd.Perform("reset", &options.BaseIdOptions{})
cmd.Perform("delete", &options.BaseIdOptions{})
cmd.BatchDelete(&options.BaseIdsOptions{})
cmd.Perform("remove-all-netifs", &options.BaseIdOptions{})
cmd.BatchPerform("enable", &options.BaseIdsOptions{})
@@ -523,9 +526,36 @@ func init() {
return e
}
i, e := modules.Hosts.GetLoginInfo(s, srvid, nil)
privateKey := ""
if e != nil {
return e
if httputils.ErrorCode(e) == 404 {
var err error
privateKey, err = modules.Sshkeypairs.FetchPrivateKeyBySession(context.Background(), s)
if err != nil {
return errors.Wrap(err, "fetch private key")
}
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(string(args.ID)), "ID")
ret, err := modules.Hosts.Get(s, args.ID, params)
if err != nil {
return errors.Wrap(err, "get host by ID")
}
ip, err := ret.GetString("access_ip")
if err != nil {
return errors.Wrap(err, "get the ip of the host")
}
jsonItem := jsonutils.NewDict()
jsonItem.Add(jsonutils.NewString(ip), "ip")
jsonItem.Add(jsonutils.NewString("root"), "username")
jsonItem.Add(jsonutils.NewString(""), "password")
jsonItem.Add(jsonutils.NewInt(22), "port")
i = jsonItem
} else {
return e
}
}
host, err := i.GetString("ip")
if err != nil {
return err
@@ -542,7 +572,7 @@ func init() {
if args.Port != 22 {
port = args.Port
}
sshCli, err := ssh.NewClient(host, port, user, passwd, "")
sshCli, err := ssh.NewClient(host, port, user, passwd, privateKey)
if err != nil {
return err
}

View File

@@ -15,7 +15,11 @@
package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
@@ -26,3 +30,63 @@ func init() {
cmd.Perform("close-forward", &options.ServerCloseForwardOptions{})
cmd.Perform("list-forward", &options.ServerListForwardOptions{})
}
type forwardInfo struct {
ProxyAddr string `json:"proxy_addr"`
ProxyPort int `json:"proxy_port"`
}
func dump(input jsonutils.JSONObject) (*forwardInfo, error) {
ret := new(forwardInfo)
if err := input.Unmarshal(ret); err != nil {
return nil, errors.Wrap(err, "JSONObject unmarshal failed")
}
if ret.ProxyAddr == "" {
return nil, errors.Errorf("proxy_addr is empty")
}
if ret.ProxyPort <= 0 {
return nil, errors.Errorf("invalid proxy_port %d", ret.ProxyPort)
}
return ret, nil
}
func openForward(session *mcclient.ClientSession, srvid string) (*forwardInfo, error) {
opt := &options.ServerOpenForwardOptions{
ServerIdOptions: options.ServerIdOptions{
ID: srvid,
},
Proto: "tcp",
Port: 22,
}
params, err := opt.Params()
if err != nil {
return nil, errors.Wrap(err, "get open forward params")
}
jsonItem, err := modules.Servers.PerformAction(session, opt.ID, "open-forward", params)
if err != nil {
return nil, err
}
return dump(jsonItem)
}
func closeForward(session *mcclient.ClientSession, srvid string, fItem *forwardInfo) (jsonutils.JSONObject, error) {
opt := &options.ServerCloseForwardOptions{
ServerIdOptions: options.ServerIdOptions{
ID: srvid,
},
Proto: "tcp",
ProxyAddr: fItem.ProxyAddr,
ProxyPort: fItem.ProxyPort,
}
params, err := opt.Params()
if err != nil {
return nil, errors.Wrap(err, "close forward params")
}
return modules.Servers.PerformAction(session, opt.ID, "close-forward", params)
}

View File

@@ -15,6 +15,7 @@
package compute
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
@@ -88,6 +89,8 @@ func init() {
cmd.Perform("create-eip", &options.ServerCreateEipOptions{})
cmd.Perform("make-sshable", &options.ServerMakeSshableOptions{})
cmd.Perform("migrate-network", &options.ServerMigrateNetworkOptions{})
cmd.Perform("set-sshport", &options.ServerSetSshportOptions{})
cmd.Perform("have-agent", &options.ServerHaveAgentOptions{})
cmd.Get("vnc", new(options.ServerIdOptions))
cmd.Get("desc", new(options.ServerIdOptions))
@@ -98,6 +101,8 @@ func init() {
cmd.Get("make-sshable-cmd", new(options.ServerIdOptions))
cmd.Get("change-owner-candidate-domains", new(options.ServerChangeOwnerCandidateDomainsOptions))
cmd.Get("change-owner-candidate-domains", new(options.ServerChangeOwnerCandidateDomainsOptions))
cmd.Get("sshport", new(options.ServerIdOptions))
cmd.GetProperty(&options.ServerStatusStatisticsOptions{})
type ServerTaskShowOptions struct {
@@ -793,6 +798,16 @@ func init() {
return err
}
eip, err := srv.GetString("eip")
if err != nil && err.Error() != "Get: key not found" {
return err
}
vpcid, err := srv.GetString("vpc_id")
if err != nil {
return err
}
address := make([]string, 0)
nics, err := srv.GetArray("nics")
if err != nil {
@@ -807,13 +822,15 @@ func init() {
return fmt.Errorf("Not found ip address from server %s", opts.ID)
}
privateKey := ""
params := jsonutils.NewDict()
if len(opts.Key) > 0 {
privateKey, e := ioutil.ReadFile(opts.Key)
key, e := ioutil.ReadFile(opts.Key)
if e != nil {
return e
}
params.Add(jsonutils.NewString(string(privateKey)), "private_key")
params.Add(jsonutils.NewString(string(key)), "private_key")
privateKey = string(key)
}
i, e := modules.Servers.GetLoginInfo(s, srvid, params)
@@ -821,37 +838,88 @@ func init() {
return e
}
passwd, err := i.GetString("password")
if err != nil {
if err != nil && !opts.UseCloudroot {
return err
}
if opts.Password != "" {
passwd = opts.Password
}
user, err := i.GetString("username")
if err != nil {
if err != nil && !opts.UseCloudroot {
return err
}
if opts.User != "" {
user = opts.User
}
host := address[0]
if opts.Host != "" {
host = opts.Host
}
port := 22
if opts.Port != 22 {
port = opts.Port
}
sshCli, err := ssh.NewClient(host, port, user, passwd, "")
if err != nil {
return err
var forwardItem *forwardInfo = nil
host := address[0]
if opts.Host != "" {
host = opts.Host
} else {
if eip != "" {
host = eip
} else {
if vpcid != "default" {
forwardItem, err = openForward(s, srvid)
if err != nil {
return err
}
host = forwardItem.ProxyAddr
port = forwardItem.ProxyPort
}
}
}
if opts.UseCloudroot {
var err error
privateKey, err = modules.Sshkeypairs.FetchPrivateKeyBySession(context.Background(), s)
if err != nil {
return err
}
passwd = ""
user = "cloudroot"
}
var sshCli *ssh.Client
err = nil
for ; sshCli == nil; sshCli, err = ssh.NewClient(host, port, user, passwd, privateKey) {
if err == nil {
continue
}
if opts.Host != "" {
return err
}
if forwardItem != nil {
closeForward(s, srvid, forwardItem)
return err
} else {
if vpcid != "default" {
forwardItem, e = openForward(s, srvid)
if e != nil {
return e
}
host = forwardItem.ProxyAddr
port = forwardItem.ProxyPort
}
}
}
log.Infof("ssh %s:%d", host, port)
if err := sshCli.RunTerminal(); err != nil {
if forwardItem != nil {
closeForward(s, srvid, forwardItem)
}
return err
}
if forwardItem != nil {
closeForward(s, srvid, forwardItem)
}
return nil
})

View File

@@ -24,6 +24,7 @@ func init() {
cmd := shell.NewResourceCmd(&modules.DevToolScripts).WithKeyword("devtool-script")
cmd.List(new(options.ScriptListOptions))
cmd.Perform("apply", new(options.ScriptApplyOptions))
cmd.Perform("batch-apply", new(options.ScriptBatchApplyOptions))
cmd1 := shell.NewResourceCmd(&modules.DevToolScriptApplyRecords).WithKeyword("devtool-script-record")
cmd1.List(new(options.ScriptApplyRecordListOptions))
}

View File

@@ -0,0 +1,29 @@
// 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 devtool
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
options "yunion.io/x/onecloud/pkg/mcclient/options/devtool"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DevToolServiceUrls).WithKeyword("devtool-serviceurl")
cmd.List(new(options.ServiceUrlListOptions))
cmd.Create(new(options.ServiceUrlCreateOptions))
cmd.Show(new(options.ServiceUrlOptions))
cmd.Delete(new(options.ServiceUrlOptions))
}

View File

@@ -0,0 +1,29 @@
// 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 devtool
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
options "yunion.io/x/onecloud/pkg/mcclient/options/devtool"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DevToolSshInfos).WithKeyword("devtool-sshinfo")
cmd.List(new(options.SshInfoListOptions))
cmd.Create(new(options.SshInfoCreateOptions))
cmd.Show(new(options.SshInfoOptions))
cmd.Delete(new(options.SshInfoOptions))
}

View File

@@ -24,7 +24,7 @@ import (
func init() {
type EventSplitableOptions struct {
Service string `help:"service" choices:"compute|identity|image" default:"compute"`
Service string `help:"service" choices:"compute|identity|image|log|cloudevent" default:"compute"`
}
R(&EventSplitableOptions{}, "logs-splitable", "Show splitable info of event table", func(s *mcclient.ClientSession, args *EventSplitableOptions) error {
var results jsonutils.JSONObject
@@ -34,6 +34,10 @@ func init() {
results, err = modules.IdentityLogs.Get(s, "splitable", nil)
case "image":
results, err = modules.ImageLogs.Get(s, "splitable", nil)
case "log":
results, err = modules.Actions.Get(s, "splitable", nil)
case "cloudevent":
results, err = modules.Cloudevents.Get(s, "splitable", nil)
default:
results, err = modules.Logs.Get(s, "splitable", nil)
}
@@ -58,6 +62,10 @@ func init() {
results, err = modules.IdentityLogs.PerformClassAction(s, "purge-splitable", nil)
case "image":
results, err = modules.ImageLogs.PerformClassAction(s, "purge-splitable", nil)
case "log":
results, err = modules.Actions.PerformClassAction(s, "purge-splitable", nil)
case "cloudevent":
results, err = modules.Cloudevents.PerformClassAction(s, "purge-splitable", nil)
default:
results, err = modules.Logs.PerformClassAction(s, "purge-splitable", nil)
}

View File

@@ -142,13 +142,15 @@ func init() {
type ImageListOptions struct {
options.BaseListOptions
IsPublic string `help:"filter images public or not(True, False or None)" choices:"true|false"`
IsStandard string `help:"filter images standard or non-standard" choices:"true|false"`
Protected string `help:"filter images by protected" choices:"true|false"`
IsUefi bool `help:"list uefi image"`
Format []string `help:"Disk formats"`
SubFormats []string `help:"Sub formats"`
Name string `help:"Name filter"`
IsPublic string `help:"filter images public or not(True, False or None)" choices:"true|false"`
IsStandard string `help:"filter images standard or non-standard" choices:"true|false"`
Protected string `help:"filter images by protected" choices:"true|false"`
IsUefi bool `help:"list uefi image"`
Format []string `help:"Disk formats"`
SubFormats []string `help:"Sub formats"`
Name string `help:"Name filter"`
OsType []string `help:"Type of OS filter e.g. 'Windows, Linux, Freebsd, Android, macOS, VMWare'"`
Distribution []string `help:"Distribution filter, e.g. 'CentOS, Ubuntu, Debian, Windows'"`
}
R(&ImageListOptions{}, "image-list", "List images", func(s *mcclient.ClientSession, args *ImageListOptions) error {
params, err := args.Params()
@@ -187,6 +189,12 @@ func init() {
if len(args.SubFormats) > 0 {
params.Add(jsonutils.Marshal(args.SubFormats), "sub_formats")
}
if len(args.OsType) > 0 {
params.Add(jsonutils.NewStringArray(args.OsType), "os_types")
}
if len(args.Distribution) > 0 {
params.Add(jsonutils.NewStringArray(args.Distribution), "distributions")
}
result, err := modules.Images.List(s, params)
if err != nil {
return err

View File

@@ -15,6 +15,12 @@
package misc
import (
"bytes"
"io"
"mime/multipart"
"net/http"
"os"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
@@ -40,6 +46,40 @@ func init() {
return nil
})
type LicenseUploadOptions struct {
FILE string
}
R(&LicenseUploadOptions{}, "license-upload", "Upload license", func(s *mcclient.ClientSession, args *LicenseUploadOptions) error {
bodyBuf := &bytes.Buffer{}
bodyWriter := multipart.NewWriter(bodyBuf)
fileWriter, err := bodyWriter.CreateFormFile("license", args.FILE)
if err != nil {
return err
}
fh, err := os.Open(args.FILE)
if err != nil {
return err
}
defer fh.Close()
_, err = io.Copy(fileWriter, fh)
if err != nil {
return err
}
contentType := bodyWriter.FormDataContentType()
bodyWriter.Close()
header := http.Header{}
header.Set("Content-Type", contentType)
lic, err := modules.License.Upload(s, header, bodyBuf)
if err != nil {
return err
}
printObject(lic)
return nil
})
type LicenseShowOptions struct {
SERVICE string `help:"service name" choices:"compute|service_tree"`
}

View File

@@ -1,3 +1,17 @@
// 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 monitor
import (

155
cmd/cloudmon/main.go Normal file
View File

@@ -0,0 +1,155 @@
package main
import (
"context"
"fmt"
"os"
"path"
"time"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/util/version"
_ "yunion.io/x/onecloud/pkg/cloudmon/collectors"
"yunion.io/x/onecloud/pkg/cloudmon/collectors/common"
"yunion.io/x/onecloud/pkg/cloudmon/options"
"yunion.io/x/onecloud/pkg/mcclient"
)
func showErrorAndExit(e error) {
fmt.Fprintf(os.Stderr, "%s", e)
fmt.Fprintln(os.Stderr)
os.Exit(1)
}
func newClientSession(options *options.CloudMonOptions) (*mcclient.ClientSession, error) {
if len(options.AuthURL) == 0 {
return nil, errors.Error("empty auth_url")
}
if len(options.AdminUser) == 0 {
return nil, errors.Error("empty admin_user")
}
if len(options.AdminPassword) == 0 {
return nil, errors.Error("empty admin_password")
}
if len(options.AdminProject) == 0 {
return nil, errors.Error("empty admin_project")
}
client := mcclient.NewClient(
options.AuthURL,
options.Timeout,
options.Debug,
options.Insecure,
options.CertFile,
options.KeyFile,
)
token, err := client.AuthenticateWithSource(
options.AdminUser,
options.AdminPassword,
options.AdminDomain,
options.AdminProject,
options.AdminProjectDomain,
mcclient.AuthSourceAPI)
if err != nil {
return nil, err
}
session := client.NewSession(
context.Background(),
options.Region,
"",
options.EndpointType,
token,
options.ApiVersion)
return session, nil
}
func main() {
parser, err := options.GetArgumentParser()
if err != nil {
showErrorAndExit(err)
}
err = parser.ParseArgs2(os.Args[1:], false, false)
opts := parser.Options().(*options.CloudMonOptions)
if opts.Help {
fmt.Println(parser.HelpString())
os.Exit(0)
}
if opts.Version {
fmt.Println(version.GetJsonString())
os.Exit(0)
}
if len(opts.Config) == 0 {
for _, p := range []string{"./etc", "/etc/yunion"} {
confTmp := path.Join(p, "cloudmon.conf")
if _, err := os.Stat(confTmp); err == nil {
opts.Config = confTmp
break
}
}
}
if len(opts.Config) > 0 {
err := parser.ParseFile(opts.Config)
if err != nil {
showErrorAndExit(err)
}
}
if err != nil {
showErrorAndExit(err)
}
parser.SetDefault()
subcmd := parser.GetSubcommand()
subparser := subcmd.GetSubParser()
if err != nil {
if subparser != nil {
fmt.Print(subparser.Usage())
} else {
fmt.Print(parser.Usage())
}
showErrorAndExit(err)
}
suboptions := subparser.Options()
if opts.SUBCOMMAND == "help" {
err = subcmd.Invoke(suboptions)
} else {
timout := suboptions.(*common.ReportOptions).Timeout
endChan := make(chan int, 1)
go func() {
ticker := time.NewTicker(time.Duration(timout) * time.Second)
for {
select {
case <-ticker.C:
log.Errorf("cmd: %s,provider: %v,end due to timeout: %ds", opts.SUBCOMMAND,
suboptions.(*common.ReportOptions).Provider, suboptions.(*common.ReportOptions).Timeout)
os.Exit(3)
case <-endChan:
}
}
}()
var session *mcclient.ClientSession
session, err = newClientSession(opts)
if err != nil {
showErrorAndExit(err)
}
err = subcmd.Invoke(session, suboptions)
endChan <- 1
}
if err != nil {
showErrorAndExit(err)
}
}

View File

@@ -16,7 +16,6 @@ package shell
import (
"fmt"
"time"
"yunion.io/x/pkg/util/timeutils"
@@ -110,7 +109,7 @@ func init() {
}
fmt.Println("primary key hash:", fm.PrimaryKeyHash())
ret := fm.Decrypt([]byte(args.MSG), time.Hour*-1)
ret := fm.Decrypt([]byte(args.MSG))
if len(ret) == 0 {
return fmt.Errorf("invalid message")
}

147
cmd/hcsocli/main.go Normal file
View File

@@ -0,0 +1,147 @@
// 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 main
import (
"fmt"
"os"
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/cloudprovider"
huawei "yunion.io/x/onecloud/pkg/multicloud/hcso"
_ "yunion.io/x/onecloud/pkg/multicloud/hcso/shell"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
type BaseOptions struct {
cloudprovider.SHCSOEndpoints
Help bool `help:"Show help" default:"false"`
Debug bool `help:"Show debug" default:"false"`
AccessKey string `help:"Access key" default:"$HUAWEI_ACCESS_KEY" metavar:"HUAWEI_ACCESS_KEY"`
Secret string `help:"Secret" default:"$HUAWEI_SECRET" metavar:"HUAWEI_SECRET"`
RegionId string `help:"RegionId" default:"$HUAWEI_REGION" metavar:"HUAWEI_REGION"`
ProjectId string `help:"ProjectId" default:"$HUAWEI_PROJECT" metavar:"HUAWEI_PROJECT"`
SUBCOMMAND string `help:"huaweicli subcommand" subcommand:"true"`
}
func getSubcommandParser() (*structarg.ArgumentParser, error) {
parse, e := structarg.NewArgumentParser(&BaseOptions{},
"huaweicli",
"Command-line interface to huawei API.",
`See "huaweicli help COMMAND" for help on a specific command.`)
if e != nil {
return nil, e
}
subcmd := parse.GetSubcommand()
if subcmd == nil {
return nil, fmt.Errorf("No subcommand argument.")
}
type HelpOptions struct {
SUBCOMMAND string `help:"sub-command name"`
}
shellutils.R(&HelpOptions{}, "help", "Show help of a subcommand", func(args *HelpOptions) error {
helpstr, e := subcmd.SubHelpString(args.SUBCOMMAND)
if e != nil {
return e
} else {
fmt.Print(helpstr)
return nil
}
})
for _, v := range shellutils.CommandTable {
_, e := subcmd.AddSubParser(v.Options, v.Command, v.Desc, v.Callback)
if e != nil {
return nil, e
}
}
return parse, nil
}
func showErrorAndExit(e error) {
fmt.Fprintf(os.Stderr, "%s", e)
fmt.Fprintln(os.Stderr)
os.Exit(1)
}
func newClient(options *BaseOptions) (*huawei.SRegion, error) {
if len(options.AccessKey) == 0 {
return nil, fmt.Errorf("Missing accessKey")
}
if len(options.Secret) == 0 {
return nil, fmt.Errorf("Missing secret")
}
cli, err := huawei.NewHuaweiClient(
huawei.NewHuaweiClientConfig(
options.AccessKey,
options.Secret,
options.ProjectId,
&options.SHCSOEndpoints,
).Debug(options.Debug),
)
if err != nil {
return nil, err
}
region := cli.GetRegion(options.RegionId)
if region == nil {
return nil, fmt.Errorf("No such region %s", options.RegionId)
}
return region, nil
}
func main() {
parser, e := getSubcommandParser()
if e != nil {
showErrorAndExit(e)
}
e = parser.ParseArgs(os.Args[1:], false)
options := parser.Options().(*BaseOptions)
if options.Help {
fmt.Print(parser.HelpString())
} else {
subcmd := parser.GetSubcommand()
subparser := subcmd.GetSubParser()
if e != nil {
if subparser != nil {
fmt.Print(subparser.Usage())
} else {
fmt.Print(parser.Usage())
}
showErrorAndExit(e)
} else {
suboptions := subparser.Options()
if options.SUBCOMMAND == "help" {
e = subcmd.Invoke(suboptions)
} else {
var region *huawei.SRegion
region, e = newClient(options)
if e != nil {
showErrorAndExit(e)
}
e = subcmd.Invoke(region, suboptions)
}
if e != nil {
showErrorAndExit(e)
}
}
}
}

View File

@@ -19,6 +19,7 @@ import (
"yunion.io/x/onecloud/pkg/baremetal/utils/raid/drivers"
"yunion.io/x/onecloud/pkg/compute/baremetal"
"yunion.io/x/onecloud/pkg/util/httputils"
"yunion.io/x/onecloud/pkg/util/procutils"
)
const (
@@ -128,6 +129,7 @@ func (c *RaidInfoCollector) CollectReportData() string {
}
func (c *RaidInfoCollector) Start() {
go procutils.WaitZombieLoop(context.TODO())
for {
c.runMain()
time.Sleep(time.Second * 1)

12
go.mod
View File

@@ -40,6 +40,7 @@ require (
github.com/coredns/coredns v1.3.0
github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/creack/pty v1.1.11
github.com/dnaeon/go-vcr v1.1.0 // indirect
github.com/dnstap/golang-dnstap v0.0.0-20170829151710-2cf77a2b5e11 // indirect
github.com/eapache/go-resiliency v1.1.0 // indirect
@@ -54,7 +55,6 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/gin-gonic/gin v1.5.0
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect
github.com/go-ini/ini v1.62.0 // indirect
github.com/go-logfmt/logfmt v0.4.0 // indirect
github.com/go-ole/go-ole v1.2.2 // indirect
github.com/go-sql-driver/mysql v1.5.0
@@ -77,7 +77,6 @@ require (
github.com/imdario/mergo v0.3.6 // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/koding/websocketproxy v0.0.0-20181220232114-7ed82d81a28c
github.com/kr/pty v1.1.5
github.com/lestrrat-go/jwx v1.0.2
github.com/lestrrat/go-jwx v0.0.0-20180221005942-b7d4802280ae
github.com/lestrrat/go-pdebug v0.0.0-20180220043741-569c97477ae8 // indirect
@@ -113,6 +112,7 @@ require (
github.com/smartystreets/goconvey v1.6.4
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible
github.com/tencentyun/cos-go-sdk-v5 v0.7.24
github.com/tinylib/msgp v1.1.0 // indirect
@@ -146,13 +146,13 @@ require (
k8s.io/apimachinery v0.19.3
k8s.io/client-go v0.19.3
k8s.io/cluster-bootstrap v0.19.3
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656
yunion.io/x/jsonutils v0.0.0-20211105163012-d846c05a3c9a
yunion.io/x/log v0.0.0-20201210064738-43181789dc74
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
yunion.io/x/pkg v0.0.0-20210721081124-55078288ca4c
yunion.io/x/pkg v0.0.0-20211116020154-6a76ba2f7e97
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20210401131841-cdb9ab689824
yunion.io/x/sqlchemy v1.0.0
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)

35
go.sum
View File

@@ -2,14 +2,12 @@ bazil.org/fuse v0.0.0-20180421153158-65cc252bf669 h1:FNCRpXiquG1aoyqcIWVFmpTSKVc
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
cloud.google.com/go v0.50.0 h1:0E3eE8MX426vUOs7aHfI7aN1BrIzzzf4ccKCSfSjGmc=
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM=
cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=
@@ -32,16 +30,12 @@ github.com/Azure/azure-sdk-for-go v36.1.0+incompatible h1:smHlbChr/JDmsyUqELZXLs
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest v0.9.3 h1:OZEIaBbMdUE/Js+BQKlpO81XlISgipr6yDJ+PSwsgi4=
github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0=
github.com/Azure/go-autorest/autorest v0.9.6 h1:5YWtOnckcudzIw8lPPBcWOnmIFWMtHci1ZWAZulMSx0=
github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk=
github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0=
github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
@@ -49,12 +43,10 @@ github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwp
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw=
github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
@@ -180,6 +172,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -241,8 +235,6 @@ github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493 h1:OTanQnFt0bi5
github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-ini/ini v1.62.0 h1:7VJT/ZXjzqSrvtraFp4ONq80hTcRQth1c9ZnQ3uNQvU=
github.com/go-ini/ini v1.62.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA=
@@ -405,8 +397,6 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8=
@@ -586,6 +576,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/syncthing/syncthing v0.14.48-rc.4/go.mod h1:nw3siZwHPA6M8iSfjDCWQ402eqvEIasMQOE8nFOxy7M=
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e h1:nt2877sKfojlHCTOBXbpWjBkuWKritFaGIfgQwbQUls=
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e/go.mod h1:B4+Kq1u5FlULTjFSM707Q6e/cOHFv0z/6QRoxubDIQ8=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible h1:QIMoFqKCmNp4HPLiTR+couZbHsIZfoOllncHYvtqse8=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
github.com/tencentyun/cos-go-sdk-v5 v0.7.24 h1:ZsZij764lOaPsj7mEAlyxXvslGt6/m312Tzqj/zeRpo=
@@ -701,10 +693,8 @@ golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20191003171128-d98b1b443823/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
@@ -750,7 +740,6 @@ golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8=
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -910,11 +899,11 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e h1:uGmKmmHm4zeLXhc/MEbAFtEDtGtyEYhC0OaBRGFi+fQ=
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656 h1:0zlZD5uhZoIHgLVAWCz2aHaYk2ZrNsACCYD7R6EIBII=
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769 h1:LIQ4hhLGQuQK+XxlV+8JrKBuL37WUT+5ZTVxBwHOTD4=
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
yunion.io/x/jsonutils v0.0.0-20211105163012-d846c05a3c9a h1:X/ucfLNcYsCfc4GFEX7R7GNWiDPr3vopLdnE4PuU46U=
yunion.io/x/jsonutils v0.0.0-20211105163012-d846c05a3c9a/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/log v0.0.0-20201210064738-43181789dc74 h1:7D+sQ/XaUTUEm+NCrKXOhXBKlzEd0RyS2qZ4vBGjx2o=
@@ -924,11 +913,11 @@ yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7/go.mod h1:0vLkNEhlmA64HViPB
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20210721081124-55078288ca4c h1:/ejlt78/0xod4bdkEThUuYsQ7vLajd48wpL2GMMSaXs=
yunion.io/x/pkg v0.0.0-20210721081124-55078288ca4c/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20211116020154-6a76ba2f7e97 h1:lY+5NlWwO2aIkfNnVOGKHmZvMt6m4ZuGtarIjwNfUsg=
yunion.io/x/pkg v0.0.0-20211116020154-6a76ba2f7e97/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20210401131841-cdb9ab689824 h1:3/VcCiO+vr3+zZFLNvre41ARF2xE6NVq6Ue7JPFuJvU=
yunion.io/x/sqlchemy v0.0.0-20210401131841-cdb9ab689824/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/sqlchemy v1.0.0 h1:fRtWxe1xxMR+NDVKYNuI89m2HGSl6aad2DZ+Bn/mZ4Q=
yunion.io/x/sqlchemy v1.0.0/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

View File

@@ -121,7 +121,7 @@ func (man *SAnsiblePlaybookManager) InitializeData() error {
return nil
}
func (apb *SAnsiblePlaybook) ValidateDeleteCondition(ctx context.Context) error {
func (apb *SAnsiblePlaybook) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error {
if apb.Status == api.AnsiblePlaybookStatusRunning {
return httperrors.NewConflictError("playbook is in running state")
}

View File

@@ -43,7 +43,7 @@ type SAnsiblePlaybookV2 struct {
Playbook string `length:"text" nullable:"false" create:"required" get:"user"`
Inventory string `length:"text" nullable:"false" create:"required" get:"user"`
Requirements string `length:"test" nullable:"false" create:"optional" get:"user"`
Requirements string `length:"text" nullable:"false" create:"optional" get:"user"`
Files string `length:"text" nullable:"false" create:"optional" get:"user"`
Output string `length:"medium" get:"user"`
StartTime time.Time `list:"user"`
@@ -118,7 +118,7 @@ func (man *SAnsiblePlaybookV2Manager) InitializeData() error {
return nil
}
func (apb *SAnsiblePlaybookV2) ValidateDeleteCondition(ctx context.Context) error {
func (apb *SAnsiblePlaybookV2) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error {
if apb.Status == api.AnsiblePlaybookStatusRunning {
return httperrors.NewConflictError("playbook is in running state")
}

View File

@@ -275,7 +275,7 @@ func (t *SAuthToken) VerifyTotpPasscode(s *mcclient.ClientSession, uid, passcode
}
t.updateRetryCount()
return errors.Wrap(httperrors.ErrInvalidCredential, "invalid passcode")
return errors.Wrap(httperrors.ErrInputParameter, "invalid passcode")
}
func SignJWT(t jwt.Token) (string, error) {

View File

@@ -185,7 +185,22 @@ func (h *AuthHandlers) GetRegionsResponse(ctx context.Context, w http.ResponseWr
resp.Add(jsonutils.NewArray(retIdps...), "idps")
resp.Add(jsonutils.NewString(options.Options.ApiServer), "api_server")
// in case api_server changed but not synchronized from Keystone
// fetch this option directly from Keystone
var apiSrv string
commonCfg, err := modules.ServicesV3.GetSpecific(s, "common", "config", nil)
if err != nil {
log.Errorf("fetch common config error: %s", err)
} else {
apiSrv, err = commonCfg.GetString("config", "default", "api_server")
if err != nil {
log.Errorf("fetch api_server fail: %s (cfg: %s)", err, commonCfg)
}
}
if len(apiSrv) == 0 {
apiSrv = options.Options.ApiServer
}
resp.Add(jsonutils.NewString(apiSrv), "api_server")
return resp, nil
}
@@ -1183,16 +1198,27 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
return
}
oldPwd, _ := body.GetString("password_old")
newPwd, _ := body.GetString("password_new")
confirmPwd, _ := body.GetString("password_confirm")
passcode, _ := body.GetString("passcode")
input := struct {
PasswordOld string
PasswordNew string
PasswordConfirm string
Passcode string
}{}
body.Unmarshal(&input)
if newPwd != confirmPwd {
if input.PasswordNew != input.PasswordConfirm {
httperrors.InputParameterError(ctx, w, "new password mismatch")
return
}
if decPasswd, err := base64.StdEncoding.DecodeString(input.PasswordOld); err == nil && stringutils2.IsPrintableAsciiString(string(decPasswd)) {
input.PasswordOld = string(decPasswd)
}
if decPasswd, err := base64.StdEncoding.DecodeString(input.PasswordNew); err == nil && stringutils2.IsPrintableAsciiString(string(decPasswd)) {
input.PasswordNew = string(decPasswd)
}
// 1.验证原密码正确且idp_driver为空
if isIdpUser(user) {
httperrors.ForbiddenError(ctx, w, "not support reset user password")
@@ -1200,7 +1226,7 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
}
cliIp := netutils2.GetHttpRequestIp(req)
_, err = auth.Client().AuthenticateWeb(t.GetUserName(), oldPwd, t.GetDomainName(), "", "", cliIp)
_, err = auth.Client().AuthenticateWeb(t.GetUserName(), input.PasswordOld, t.GetDomainName(), "", "", cliIp)
if err != nil {
switch httperr := err.(type) {
case *httputils.JSONClientError:
@@ -1216,7 +1242,7 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
s := auth.GetAdminSession(ctx, FetchRegion(req), "")
// 2.如果已开启MFA验证 随机密码正确
if isMfaEnabled(user) {
err = authToken.VerifyTotpPasscode(s, t.GetUserId(), passcode)
err = authToken.VerifyTotpPasscode(s, t.GetUserId(), input.Passcode)
if err != nil {
httperrors.InputParameterError(ctx, w, "invalid passcode")
return
@@ -1225,7 +1251,7 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
// 3.重置密码,
params := jsonutils.NewDict()
params.Set("password", jsonutils.NewString(newPwd))
params.Set("password", jsonutils.NewString(input.PasswordNew))
_, err = modules.UsersV3.Patch(s, t.GetUserId(), params)
if err != nil {
httperrors.GeneralServerError(ctx, w, err)

View File

@@ -260,7 +260,7 @@ func validatePasscodeHandler(ctx context.Context, w http.ResponseWriter, req *ht
if err != nil {
log.Warningf("VerifyTotpPasscode %s", err.Error())
httperrors.InvalidCredentialError(ctx, w, "invalid passcode: %v", err)
httperrors.InputParameterError(ctx, w, "invalid passcode: %v", err)
return
}

View File

@@ -19,6 +19,7 @@ import (
"fmt"
"net/http"
"path"
"time"
"yunion.io/x/onecloud/pkg/appsrv"
)
@@ -51,7 +52,17 @@ func (h SHandler) Bind(app *appsrv.Application) {
if h.MiddlewareFunc != nil {
f = h.MiddlewareFunc(f)
}
app.AddHandler(h.Method, h.Prefix, f)
segs := appsrv.SplitPath(h.Prefix)
hi := appsrv.NewHandlerInfo(h.Method, segs, f, nil, "", nil)
if h.Method == "GET" {
hi.SetProcessTimeoutCallback(func(hdr *appsrv.SHandlerInfo, r *http.Request) time.Duration {
if len(r.URL.Query().Get("export_keys")) > 0 {
return time.Hour * 2
}
return -time.Second
})
}
app.AddHandler3(hi)
}
func NewMethodHandlerFactory(method string, mf appsrv.MiddlewareFunc, prefix string) func(handleFunc, ...string) SHandler {

View File

@@ -100,6 +100,7 @@ func handleOIDCAuth(ctx context.Context, w http.ResponseWriter, req *http.Reques
qs.Set("code", jsonutils.NewString(code))
qs.Set("state", jsonutils.NewString(auth.State))
redirUrl := addQuery(auth.RedirectUri, qs)
appsrv.DisableClientCache(w)
appsrv.SendRedirect(w, redirUrl)
}

View File

@@ -101,7 +101,7 @@ func (h *APIHelper) doSync(ctx context.Context) (changed bool, err error) {
s := h.adminClientSession(ctx)
mss := h.modelSets.Copy()
r, err := SyncModelSets(mss, s, h.opts.ListBatchSize)
r, err := SyncModelSets(mss, s, h.opts)
if err != nil {
return false, err
}
@@ -118,7 +118,7 @@ func (h *APIHelper) adminClientSession(ctx context.Context) *mcclient.ClientSess
if s != nil {
token := s.GetToken()
expires := token.GetExpires()
if time.Now().Add(time.Hour).After(expires) {
if time.Now().Add(time.Hour).Before(expires) {
return s
}
}

View File

@@ -15,6 +15,8 @@
package apihelper
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/cloudcommon/db"
mcclient "yunion.io/x/onecloud/pkg/mcclient"
mcclient_modulebase "yunion.io/x/onecloud/pkg/mcclient/modulebase"
@@ -44,7 +46,15 @@ type IModelSetEmulatedIncluder interface {
IncludeEmulated() bool
}
func SyncModelSets(mssOld IModelSets, s *mcclient.ClientSession, batchSize int) (r ModelSetsUpdateResult, err error) {
type IModelSetFilter interface {
ModelFilter() []string
}
type IModelListParam interface {
ModelParamFilter() jsonutils.JSONObject
}
func SyncModelSets(mssOld IModelSets, s *mcclient.ClientSession, opt *Options) (r ModelSetsUpdateResult, err error) {
mss := mssOld.ModelSetList()
mssNews := mssOld.NewEmpty()
for i, msNew := range mssNews.ModelSetList() {
@@ -60,10 +70,11 @@ func SyncModelSets(mssOld IModelSets, s *mcclient.ClientSession, batchSize int)
ModelManager: msNew.ModelManager(),
MinUpdatedAt: minUpdatedAt,
ModelSet: msNew,
BatchListSize: batchSize,
BatchListSize: opt.ListBatchSize,
IncludeDetails: false,
IncludeEmulated: includeEmulated,
IncludeDetails: opt.IncludeDetails,
IncludeEmulated: includeEmulated,
InCludeOtherCloudEnv: opt.IncludeOtherCloudEnv,
})
if err != nil {
return

View File

@@ -21,6 +21,8 @@ import (
type Options struct {
common_options.CommonOptions
SyncInterval int
ListBatchSize int
SyncInterval int
ListBatchSize int
IncludeDetails bool
IncludeOtherCloudEnv bool
}

View File

@@ -38,10 +38,11 @@ type GetModelsOptions struct {
ModelManager mcclient_modulebase.IBaseManager
ModelSet IModelSet
BatchListSize int
MinUpdatedAt time.Time
IncludeDetails bool
IncludeEmulated bool
BatchListSize int
MinUpdatedAt time.Time
IncludeDetails bool
IncludeEmulated bool
InCludeOtherCloudEnv bool
}
func GetModels(opts *GetModelsOptions) error {
@@ -102,19 +103,28 @@ func GetModels(opts *GetModelsOptions) error {
listOptions := options.BaseListOptions{
Admin: options.Bool(true),
Scope: "system",
Details: options.Bool(opts.IncludeDetails),
ShowEmulated: options.Bool(opts.IncludeEmulated),
Filter: []string{
minUpdatedAtFilter(minUpdatedAt), // order matters, filter.0
"manager_id.isnullorempty()", // len(manager_id) > 0 is for pubcloud objects
"external_id.isnullorempty()", // len(external_id) > 0 is for pubcloud objects
"cloud_env=onpremise",
},
OrderBy: []string{"updated_at"},
Order: "asc",
Limit: options.Int(opts.BatchListSize),
Offset: options.Int(0),
}
if !opts.InCludeOtherCloudEnv {
listOptions.Filter = append(listOptions.Filter,
"manager_id.isnullorempty()", // len(manager_id) > 0 is for pubcloud objects
"external_id.isnullorempty()", // len(external_id) > 0 is for pubcloud objects
"cloud_env=onpremise",
)
}
if inter, ok := opts.ModelSet.(IModelSetFilter); ok {
filter := inter.ModelFilter()
listOptions.Filter = append(listOptions.Filter, filter...)
}
if !minUpdatedAt.Equal(PseudoZeroTime) {
// Only fetching pending deletes when we are doing incremental fetch
listOptions.PendingDeleteAll = options.Bool(true)
@@ -124,6 +134,10 @@ func GetModels(opts *GetModelsOptions) error {
if err != nil {
return fmt.Errorf("%s: making list params: %s", manKeyPlural, err)
}
if inter, ok := opts.ModelSet.(IModelListParam); ok {
filter := inter.ModelParamFilter()
params.Update(filter)
}
//XXX
//params.Set(api.LBAGENT_QUERY_ORIG_KEY, jsonutils.NewString(api.LBAGENT_QUERY_ORIG_VAL))

View File

@@ -396,6 +396,10 @@ type ServerCreateInput struct {
// emulate: BIOS, UEFI
Bios string `json:"bios"`
// Machine类型
// emulate: pc, q35
Machine string `json:"machine"`
// 启动顺序
// c: cdrome
// d: disk

View File

@@ -29,12 +29,13 @@ const (
DEFAULT_DISK_TYPE = DISK_TYPE_ROTATE
DISK_DRIVER_MEGARAID = "MegaRaid"
DISK_DRIVER_LINUX = "Linux"
DISK_DRIVER_HPSARAID = "HPSARaid"
DISK_DRIVER_MPT2SAS = "Mpt2SAS"
DISK_DRIVER_MARVELRAID = "MarvelRaid"
DISK_DRIVER_PCIE = "PCIE"
DISK_DRIVER_MEGARAID = "MegaRaid"
DISK_DRIVER_LINUX = "Linux"
DISK_DRIVER_HPSARAID = "HPSARaid"
DISK_DRIVER_MPT2SAS = "Mpt2SAS"
DISK_DRIVER_MARVELRAID = "MarvelRaid"
DISK_DRIVER_ADAPTECRAID = "AdaptecRaid"
DISK_DRIVER_PCIE = "PCIE"
HDD_DISK_SPEC_TYPE = "HDD"
SSD_DISK_SPEC_TYPE = "SSD"
@@ -60,6 +61,7 @@ var (
DISK_DRIVER_HPSARAID,
DISK_DRIVER_MPT2SAS,
DISK_DRIVER_MARVELRAID,
DISK_DRIVER_ADAPTECRAID,
)
DISK_DRIVERS = sets.NewString(

View File

@@ -44,6 +44,7 @@ const (
CLOUD_PROVIDER_AZURE = "Azure"
CLOUD_PROVIDER_AWS = "Aws"
CLOUD_PROVIDER_HUAWEI = "Huawei"
CLOUD_PROVIDER_HCSO = "HCSO"
CLOUD_PROVIDER_OPENSTACK = "OpenStack"
CLOUD_PROVIDER_UCLOUD = "Ucloud"
CLOUD_PROVIDER_ZSTACK = "ZStack"
@@ -94,7 +95,7 @@ const (
var (
CLOUD_PROVIDER_VALID_STATUS = []string{CLOUD_PROVIDER_CONNECTED}
CLOUD_PROVIDER_VALID_HEALTH_STATUS = []string{CLOUD_PROVIDER_HEALTH_NORMAL, CLOUD_PROVIDER_HEALTH_NO_PERMISSION}
PRIVATE_CLOUD_PROVIDERS = []string{CLOUD_PROVIDER_ZSTACK, CLOUD_PROVIDER_OPENSTACK, CLOUD_PROVIDER_APSARA}
PRIVATE_CLOUD_PROVIDERS = []string{CLOUD_PROVIDER_ZSTACK, CLOUD_PROVIDER_OPENSTACK, CLOUD_PROVIDER_APSARA, CLOUD_PROVIDER_HCSO}
CLOUD_PROVIDERS = []string{
CLOUD_PROVIDER_ONECLOUD,
@@ -105,6 +106,7 @@ var (
CLOUD_PROVIDER_AZURE,
CLOUD_PROVIDER_AWS,
CLOUD_PROVIDER_HUAWEI,
CLOUD_PROVIDER_HCSO,
CLOUD_PROVIDER_OPENSTACK,
CLOUD_PROVIDER_UCLOUD,
CLOUD_PROVIDER_ZSTACK,
@@ -140,6 +142,9 @@ var (
CLOUD_PROVIDER_HUAWEI: []string{
HOST_TYPE_HUAWEI,
},
CLOUD_PROVIDER_HCSO: {
HOST_TYPE_HCSO,
},
CLOUD_PROVIDER_OPENSTACK: []string{
HOST_TYPE_OPENSTACK,
},

View File

@@ -125,7 +125,7 @@ type DnsZoneDetails struct {
// 关联vpc数量
VpcCount int `json:"vpc_count"`
// Cache info
CloudCaches []DnsZoneCacheDetails `json:"cloud_caches"`
CloudCaches []jsonutils.JSONObject `json:"cloud_caches"`
}
type DnsZoneListInput struct {
@@ -141,7 +141,8 @@ type DnsZoneListInput struct {
ZoneType string `json:"zone_type"`
// Filter dns zone By vpc
VpcId string `json:"vpc_id"`
VpcId string `json:"vpc_id"`
WithCache bool `json:"with_cache"`
}
type DnsZoneSyncStatusInput struct {

View File

@@ -36,6 +36,9 @@ const (
// 删除中
NAS_STATUS_DELETING = "deleting"
NAS_STATUS_DELETE_FAILED = "delete_failed"
NAS_UPDATE_TAGS = "update_tags"
NAS_UPDATE_TAGS_FAILED = "update_tags_fail"
)
type FileSystemListInput struct {
@@ -104,3 +107,8 @@ type FileSystemDetails struct {
Network string
Zone string
}
type FileSystemRemoteUpdateInput struct {
// 是否覆盖替换所有标签
ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

View File

@@ -159,6 +159,7 @@ const (
HYPERVISOR_AZURE = "azure"
HYPERVISOR_AWS = "aws"
HYPERVISOR_HUAWEI = "huawei"
HYPERVISOR_HCSO = "hcso"
HYPERVISOR_OPENSTACK = "openstack"
HYPERVISOR_UCLOUD = "ucloud"
HYPERVISOR_ZSTACK = "zstack"
@@ -175,6 +176,11 @@ const (
CPU_MODE_HOST = "host"
)
const (
VM_MACHINE_TYPE_PC = "pc"
VM_MACHINE_TYPE_Q35 = "q35"
)
var VM_RUNNING_STATUS = []string{VM_START_START, VM_STARTING, VM_RUNNING, VM_BLOCK_STREAM, VM_BLOCK_STREAM_FAIL}
var VM_CREATING_STATUS = []string{VM_CREATE_NETWORK, VM_CREATE_DISK, VM_START_DEPLOY, VM_DEPLOYING}
@@ -189,6 +195,7 @@ var HYPERVISORS = []string{
HYPERVISOR_AWS,
HYPERVISOR_QCLOUD,
HYPERVISOR_HUAWEI,
HYPERVISOR_HCSO,
HYPERVISOR_OPENSTACK,
HYPERVISOR_UCLOUD,
HYPERVISOR_ZSTACK,
@@ -219,6 +226,7 @@ var PRIVATE_CLOUD_HYPERVISORS = []string{
HYPERVISOR_ZSTACK,
HYPERVISOR_OPENSTACK,
HYPERVISOR_APSARA,
HYPERVISOR_HCSO,
}
// var HYPERVISORS = []string{HYPERVISOR_ALIYUN}
@@ -234,6 +242,7 @@ var HYPERVISOR_HOSTTYPE = map[string]string{
HYPERVISOR_AWS: HOST_TYPE_AWS,
HYPERVISOR_QCLOUD: HOST_TYPE_QCLOUD,
HYPERVISOR_HUAWEI: HOST_TYPE_HUAWEI,
HYPERVISOR_HCSO: HOST_TYPE_HCSO,
HYPERVISOR_OPENSTACK: HOST_TYPE_OPENSTACK,
HYPERVISOR_UCLOUD: HOST_TYPE_UCLOUD,
HYPERVISOR_ZSTACK: HOST_TYPE_ZSTACK,
@@ -253,6 +262,7 @@ var HOSTTYPE_HYPERVISOR = map[string]string{
HOST_TYPE_AWS: HYPERVISOR_AWS,
HOST_TYPE_QCLOUD: HYPERVISOR_QCLOUD,
HOST_TYPE_HUAWEI: HYPERVISOR_HUAWEI,
HOST_TYPE_HCSO: HYPERVISOR_HCSO,
HOST_TYPE_OPENSTACK: HYPERVISOR_OPENSTACK,
HOST_TYPE_UCLOUD: HYPERVISOR_UCLOUD,
HOST_TYPE_ZSTACK: HYPERVISOR_ZSTACK,
@@ -288,3 +298,7 @@ func Hypervisors2HostTypes(hypervisors []string) []string {
}
return hostTypes
}
// windows allow a maximal length of 15
// http://support.microsoft.com/kb/909264
const MAX_WINDOWS_COMPUTER_NAME_LENGTH = 15

View File

@@ -4,6 +4,8 @@ const (
MIRROR_JOB = "__mirror_job_status"
MIRROR_JOB_READY = "ready"
MIRROR_JOB_FAILED = "failed"
SSH_PORT = "__ssh_port"
)
const BASE_INSTANCE_SNAPSHOT_ID = "__base_instance_snapshot_id"

View File

@@ -44,10 +44,18 @@ type GuestSshableOutput struct {
MethodTried []GuestSshableMethodData
}
type GuestHaveAgentInput struct {
}
type GuestHaveAgentOutput struct {
Have bool
}
type GuestMakeSshableInput struct {
User string
PrivateKey string
Password string
Port int
}
type GuestMakeSshableOutput struct {
@@ -57,3 +65,11 @@ type GuestMakeSshableOutput struct {
type GuestMakeSshableCmdOutput struct {
ShellCmd string
}
type GuestSetSshportInput struct {
Port int
}
type GuestSshportOutput struct {
Port int
}

View File

@@ -29,6 +29,7 @@ const (
HOST_TYPE_QCLOUD = "qcloud"
HOST_TYPE_AZURE = "azure"
HOST_TYPE_HUAWEI = "huawei"
HOST_TYPE_HCSO = "hcso"
HOST_TYPE_OPENSTACK = "openstack"
HOST_TYPE_UCLOUD = "ucloud"
HOST_TYPE_ZSTACK = "zstack"
@@ -109,6 +110,7 @@ var HOST_TYPES = []string{
HOST_TYPE_AWS,
HOST_TYPE_QCLOUD,
HOST_TYPE_HUAWEI,
HOST_TYPE_HCSO,
HOST_TYPE_OPENSTACK,
HOST_TYPE_UCLOUD,
HOST_TYPE_ZSTACK,

View File

@@ -16,6 +16,8 @@ package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/apis"
)
type HoststorageDetails struct {
@@ -58,3 +60,10 @@ type HoststorageListInput struct {
StorageFilterListInput
}
type HostStorageCreateInput struct {
apis.JoinResourceBaseCreateInput
StorageId string `json:"storage_id"`
HostId string `json:"host_id"`
MountPoint string `json:"mount_point"`
}

View File

@@ -126,6 +126,8 @@ type NetworkListInput struct {
// filter by BGP types
BgpType []string `json:"bgp_type"`
HostType string `json:"host_type"`
}
type NetworkResourceInfoBase struct {
@@ -207,22 +209,11 @@ type NetworkCreateInput struct {
BgpType string `json:"bgp_type"`
}
type NetworkDetails struct {
apis.SharableVirtualResourceDetails
WireResourceInfo
SNetwork
// 是否是内网
Exit bool `json:"exit"`
// 端口数量
Ports int `json:"ports"`
// 已使用端口数量
PortsUsed int `json:"ports_used"`
// 网卡数量
type SNetworkNics struct {
// 虚拟机网卡数量
Vnics int `json:"vnics"`
// 裸金属网卡数量
BmVnics int `json:"bm_nics"`
BmVnics int `json:"bm_vnics"`
// 负载均衡网卡数量
LbVnics int `json:"lb_vnics"`
// 浮动Ip网卡数量
@@ -231,6 +222,48 @@ type NetworkDetails struct {
// 预留IP数量
ReserveVnics int `json:"reserve_vnics"`
// RDS网卡数量
RdsVnics int `json:"rds_vnics"`
// NAT网关网卡数量
NatVnics int `json:"nat_vnics"`
BmReusedVnics int `json:"bm_reused_vnics"`
// 弹性网卡数量
NetworkinterfaceVnics int `json:"networkinterface_vnics"`
// 已使用端口数量
PortsUsed int `json:"ports_used"`
Total int `json:"total"`
}
func (self *SNetworkNics) SumTotal() {
self.Total = self.Vnics +
self.BmVnics +
self.LbVnics +
self.LbVnics +
self.EipVnics +
self.GroupVnics +
self.ReserveVnics +
self.RdsVnics +
self.NetworkinterfaceVnics +
self.NatVnics -
self.BmReusedVnics
self.PortsUsed = self.Total
}
type NetworkDetails struct {
apis.SharableVirtualResourceDetails
WireResourceInfo
SNetwork
SNetworkNics
// 是否是内网
Exit bool `json:"exit"`
// 端口数量
Ports int `json:"ports"`
// 路由信息
Routes [][]string `json:"routes"`
Schedtags []SchedtagShortDescDetails `json:"schedtags"`

View File

@@ -59,6 +59,7 @@ var (
REGIONAL_NETWORK_PROVIDERS = []string{
CLOUD_PROVIDER_HUAWEI,
CLOUD_PROVIDER_HCSO,
CLOUD_PROVIDER_CTYUN,
CLOUD_PROVIDER_UCLOUD,
CLOUD_PROVIDER_GOOGLE,

View File

@@ -70,4 +70,7 @@ type RouteTableRouteSetListInput struct {
apis.StatusStandaloneResourceListInput
apis.ExternalizedResourceBaseListInput
RouteTableFilterList
Type string `json:"type"`
NextHopType string `json:"next_hop_type"`
NextHopId string `json:"next_hop_id"`
}

View File

@@ -17,6 +17,7 @@ package compute
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/util/regutils"
"yunion.io/x/pkg/util/secrules"
@@ -181,6 +182,7 @@ type SecgroupListInput struct {
RegionalFilterListInput
ManagedResourceListInput
WithCache bool `json:"witch_cache"`
}
type SecurityGroupCacheListInput struct {
@@ -252,6 +254,8 @@ type SecgroupDetails struct {
InRules []SecgroupRuleDetails `json:"in_rules"`
// 出方向规则信息
OutRules []SecgroupRuleDetails `json:"out_rules"`
CloudCaches []jsonutils.JSONObject `json:"cloud_caches"`
}
type SecurityGroupResourceInfo struct {

View File

@@ -68,6 +68,7 @@ const (
STORAGE_HUAWEI_SAS = "SAS" // 高IO云硬盘
STORAGE_HUAWEI_SATA = "SATA" // 普通IO云硬盘
STORAGE_HUAWEI_GPSSD = "GPSSD" // 通用型SSD
STORAGE_HUAWEI_ESSD = "ESSD" // 急速型SSD
// openstack
STORAGE_OPENSTACK_ISCSI = "iscsi"

View File

@@ -90,7 +90,8 @@ type WireListInput struct {
HostResourceInput
Bandwidth *int `json:"bandwidth"`
Bandwidth *int `json:"bandwidth"`
HostType string `json:"host_type"`
}
type WireMergeInput struct {

View File

@@ -74,10 +74,20 @@ const (
OS_ARCH_AARCH64 = "aarch64"
)
func IsARM(osArch string) bool {
return utils.IsInStringArray(osArch, []string{
var (
ARCH_X86 = []string{
OS_ARCH_X86,
OS_ARCH_I386,
OS_ARCH_X86_32,
OS_ARCH_X86_64,
}
ARCH_ARM = []string{
OS_ARCH_ARM,
OS_ARCH_AARCH32,
OS_ARCH_AARCH64,
})
}
)
func IsARM(osArch string) bool {
return utils.IsInStringArray(osArch, ARCH_ARM)
}

View File

@@ -29,6 +29,21 @@ type ScriptApplyOutput struct {
ScriptApplyId string
}
type ScriptBatchApplyInput struct {
ServerIds []string
}
type ScriptBatchApplyOutput struct {
Results []ScriptBatchApplyResult
}
type ScriptBatchApplyResult struct {
ServerId string
Succeed bool
Reason string
ScriptApplyId string
}
type ScriptApplyRecoredListInput struct {
apis.StatusStandaloneResourceListInput
// description: Id of Script
@@ -72,3 +87,12 @@ type SApplyInfo struct {
ServerId string
TryTimes int
}
type DevtoolManagerServiceUrlInput struct {
ServiceName string
ServerId string
}
type DevtoolManagerServiceUrlOutput struct {
ServiceUrl string
}

View File

@@ -0,0 +1,23 @@
// 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 devtool
const (
SERVICEURL_STATUS_CREATING = "creating"
SERVICEURL_STATUS_READY = "ready"
SERVICEURL_STATUS_DELETING = "deleting"
SERVICEURL_STATUS_CREATE_FAILED = "create_failed"
SERVICEURL_STATUS_DELETE_FAILED = "delete_failed"
)

View File

@@ -0,0 +1,23 @@
// 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 devtool
const (
SSHINFO_STATUS_CREATING = "creating"
SSHINFO_STATUS_READY = "ready"
SSHINFO_STATUS_DELETING = "deleting"
SSHINFO_STATUS_CREATE_FAILED = "create_failed"
SSHINFO_STATUS_DELETE_FAILED = "delete_failed"
)

View File

@@ -109,6 +109,7 @@ var (
"customized_private_prefixes",
"global_http_proxy",
"global_https_proxy",
"ignore_nonrunning_guests",
},
}

View File

@@ -41,6 +41,9 @@ const (
LocalFilePrefix = "file://"
S3Prefix = "s3://"
IMAGE_STORAGE_DRIVER_LOCAL = "local"
IMAGE_STORAGE_DRIVER_S3 = "s3"
// image properties
IMAGE_OS_ARCH = "os_arch"
IMAGE_OS_DISTRO = "os_distribution"

View File

@@ -26,8 +26,6 @@ type GuestImageDetails struct {
apis.SharableVirtualResourceDetails
SGuestImage
ImageIds []string `json:"image_ids"`
//Status string `json:"status"`
Size int64 `json:"size"`
MinRamMb int32 `json:"min_ram_mb"`

View File

@@ -43,6 +43,12 @@ type ImageListInput struct {
// 是否为数据盘
IsData *bool `json:"is_data"`
// 操作系统类型,可能值为: Linux, Windows, FreeBSD 等
OsTypes []string `json:"os_types"`
// 发行版本,可能值为: CentOS, Ubuntu, Debian, ArchLinux, OpenEuler 等
Distributions []string `json:"distributions"`
}
type GuestImageListInput struct {

View File

@@ -195,10 +195,13 @@ type STag struct {
}
type MetadataResourceListInput struct {
// 通过标签过滤
// 通过标签过滤(包含这些标签)
Tags []STag `json:"tags"`
// 通过标签过滤
// 通过标签过滤(不包含这些标签)
NoTags []STag `json:"no_tags"`
// 通过标签排序
OrderByTag string `json:"order_by_tag"`
// deprecated

View File

@@ -1,6 +1,28 @@
package monitor
var (
UnionTags = []string{
"host",
"host_id",
"id",
"ips",
"name",
"zone",
"zone_id",
"zone_ext_id",
"os_type",
"status",
"cloudregion",
"cloudregion_id",
"region_ext_id",
"tenant",
"tenant_id",
"brand",
"vm_scaling_group_id",
"domain_id",
"project_domain",
}
ServerTags = map[string]string{
"host": "host",
"host_id": "host_id",

View File

@@ -2,6 +2,8 @@ package monitor
import "yunion.io/x/onecloud/pkg/apis"
const EXT_PREFIX = "ext"
const (
METRIC_RES_TYPE_GUEST = "guest"
METRIC_RES_TYPE_HOST = "host"
@@ -9,10 +11,15 @@ const (
METRIC_RES_TYPE_OSS = "oss"
METRIC_RES_TYPE_RDS = "rds"
METRIC_RES_TYPE_CLOUDACCOUNT = "cloudaccount"
METRIC_RES_TYPE_AGENT = "agent"
METRIC_RES_TYPE_TENANT = "tenant"
METRIC_RES_TYPE_DOMAIN = "domain"
METRIC_RES_TYPE_STORAGE = "storage"
METRIC_RES_TYPE_JENKINS = "jenkins"
//ext is prefix
METRIC_RES_TYPE_JENKINS = "ext_jenkins"
METRIC_RES_TYPE_EXT_MYSQL = "ext_mysql"
METRIC_RES_TYPE_EXT_REDIS = "ext_redis"
METRIC_RES_TYPE_EXT_RABBITMQ = "ext_rabbitmq"
METRIC_UNIT_PERCENT = "%"
METRIC_UNIT_BPS = "bps"
@@ -21,6 +28,7 @@ const (
METRIC_UNIT_CPS = "cps"
METRIC_UNIT_COUNT = "count"
METRIC_UNIT_MS = "ms"
METRIC_UNIT_SEC = "s"
METRIC_UNIT_BYTE = "byte"
METRIC_UNIT_RMB = "RMB"
METRIC_UNIT_MB = "Mb"
@@ -34,8 +42,9 @@ var (
METRIC_RES_TYPE_RDS, METRIC_RES_TYPE_CLOUDACCOUNT}
MetricUnit = []string{METRIC_UNIT_PERCENT, METRIC_UNIT_BPS, METRIC_UNIT_MBPS, METRIC_UNIT_BYTEPS, "count/s",
METRIC_UNIT_COUNT, METRIC_UNIT_MS, METRIC_UNIT_BYTE, METRIC_UNIT_RMB}
ResTypeScoreMap = map[string]int{
ResTypeScoreMap = map[string]float64{
METRIC_RES_TYPE_GUEST: 1,
METRIC_RES_TYPE_AGENT: 1.1,
METRIC_RES_TYPE_HOST: 2,
METRIC_RES_TYPE_OSS: 3,
METRIC_RES_TYPE_RDS: 4,

View File

@@ -33,6 +33,9 @@ type MonitorResourceListInput struct {
type MonitorResourceDetails struct {
apis.VirtualResourceDetails
compute.CloudregionResourceInfo
compute.CloudaccountResourceInfo
Ips string `json:"ips"`
AccessIp string `json:"access_ip"`
AttachAlertCount int64 `json:"attach_alert_count"`
}

View File

@@ -20,10 +20,12 @@ var (
METRIC_RES_TYPE_OSS: "oss_name",
METRIC_RES_TYPE_CLOUDACCOUNT: "cloudaccount_name",
METRIC_RES_TYPE_STORAGE: "storage_name",
METRIC_RES_TYPE_AGENT: "vm_name",
}
MEASUREMENT_TAG_ID = map[string]string{
METRIC_RES_TYPE_HOST: "host_id",
METRIC_RES_TYPE_GUEST: "vm_id",
METRIC_RES_TYPE_AGENT: "vm_id",
METRIC_RES_TYPE_REDIS: "redis_id",
METRIC_RES_TYPE_RDS: "rds_id",
METRIC_RES_TYPE_OSS: "oss_id",
@@ -53,9 +55,11 @@ type MetricFunc struct {
}
type MetricInputQuery struct {
From string `json:"from"`
To string `json:"to"`
Scope string `json:"scope"`
From string `json:"from"`
To string `json:"to"`
Scope string `json:"scope"`
Slimit string `json:"slimit"`
Soffset string `json:"soffset"`
//default group by
Unit bool `json:"unit"`
Interval string `json:"interval"`

View File

@@ -40,7 +40,7 @@ type ModelBaseDetails struct {
CanUpdate bool `json:"can_update"`
// 资源不能更新的原因
UpdateFailReason string `json:"update_fail_reason"`
UpdateFailReason httperrors.Error `json:"update_fail_reason"`
}
type ModelBaseShortDescDetail struct {

View File

@@ -31,4 +31,5 @@ const (
CTYUN = "ctyun"
HUAWEI = "huawei"
APSARA = "apsara"
JDCLOUD = "jdcloud"
)

View File

@@ -65,6 +65,7 @@ type Application struct {
isExiting bool
idleConnsClosed chan struct{}
httpServer *http.Server
slaveHttpServer *http.Server
}
const (
@@ -464,15 +465,16 @@ func (app *Application) ListenAndServeWithoutCleanup(addr, certFile, keyFile str
}
func (app *Application) ListenAndServeTLSWithCleanup2(addr string, certFile, keyFile string, onStop func(), isMaster bool) {
httpSrv := app.initServer(addr)
if isMaster {
app.addDefaultHandlers()
AddPProfHandler(app)
}
app.httpServer = app.initServer(addr)
if isMaster {
app.httpServer = httpSrv
app.registerCleanShutdown(app.httpServer, onStop)
} else {
app.slaveHttpServer = httpSrv
}
app.listenAndServeInternal(app.httpServer, certFile, keyFile)
app.listenAndServeInternal(httpSrv, certFile, keyFile)
if isMaster {
app.waitCleanShutdown()
}

View File

@@ -83,6 +83,10 @@ func (this *SHandlerInfo) GetTags() map[string]string {
return this.tags
}
func NewHandlerInfo(method string, path []string, handler func(context.Context, http.ResponseWriter, *http.Request), metadata map[string]interface{}, name string, tags map[string]string) *SHandlerInfo {
return newHandlerInfo(method, path, handler, metadata, name, tags)
}
func newHandlerInfo(method string, path []string, handler func(context.Context, http.ResponseWriter, *http.Request), metadata map[string]interface{}, name string, tags map[string]string) *SHandlerInfo {
hand := SHandlerInfo{method: method, path: path,
handler: handler,

View File

@@ -185,6 +185,7 @@ func (m *SBaremetalManager) CleanBaremetal(bmId string) {
func (m *SBaremetalManager) updateBaremetal(session *mcclient.ClientSession, bmId string) (jsonutils.JSONObject, error) {
params := jsonutils.NewDict()
params.Add(jsonutils.JSONTrue, "is_baremetal")
params.Add(jsonutils.JSONTrue, "not_sync_config")
obj, err := modules.Hosts.Put(session, bmId, params)
if err != nil {
return nil, err
@@ -1102,10 +1103,12 @@ LABEL start
bootmode := api.BOOT_MODE_PXE
if !isTftp {
adminNic := b.GetAdminNic()
var mac string
var addr string
var mask string
var gateway string
if adminNic != nil {
mac = adminNic.GetMac().String()
addr = adminNic.IpAddr
mask = adminNic.GetNetMask()
gateway = adminNic.Gateway
@@ -1119,6 +1122,7 @@ LABEL start
}
}
serverIP, _ := b.manager.Agent.GetDHCPServerIP()
args = append(args, fmt.Sprintf("mac=%s", mac))
args = append(args, fmt.Sprintf("dest=%s", serverIP))
args = append(args, fmt.Sprintf("gateway=%s", gateway))
args = append(args, fmt.Sprintf("addr=%s", addr))
@@ -1325,6 +1329,11 @@ func (b *SBaremetalInstance) GetAccessIp() string {
return accessIp
}
func (b *SBaremetalInstance) GetAccessMac() string {
accessMac, _ := b.desc.GetString("access_mac")
return accessMac
}
func (b *SBaremetalInstance) GetServer() baremetaltypes.IBaremetalServer {
b.serverLock.Lock()
defer b.serverLock.Unlock()
@@ -2440,9 +2449,7 @@ func (s *SBaremetalServer) DoDiskConfig(term *ssh.Client) error {
}
}
tool := disktool.NewSSHPartitionTool(term)
tool.FetchDiskConfs(baremetal.GetDiskConfigurations(layouts))
err = tool.RetrieveDiskInfo()
tool, err := disktool.NewSSHPartitionTool(term, layouts)
if err != nil {
return err
}
@@ -2450,6 +2457,7 @@ func (s *SBaremetalServer) DoDiskConfig(term *ssh.Client) error {
for tried := 0; !tool.IsAllDisksReady() && tried < maxTries; tried++ {
time.Sleep(5 * time.Second)
tool.RetrieveDiskInfo()
log.Warningf("disktool not ready string: %s", tool.DebugString())
}
if !tool.IsAllDisksReady() {
@@ -2520,11 +2528,9 @@ func (s *SBaremetalServer) DoPartitionDisk(term *ssh.Client) ([]*disktool.Partit
return nil, errors.Wrapf(err, "CalculateLayout")
}
tool := disktool.NewSSHPartitionTool(term)
tool.FetchDiskConfs(baremetal.GetDiskConfigurations(layouts))
err = tool.RetrieveDiskInfo()
tool, err := disktool.NewSSHPartitionTool(term, layouts)
if err != nil {
return nil, errors.Wrapf(err, "RetrieveDiskInfo")
return nil, errors.Wrapf(err, "NewSSHPartitionTool")
}
disks, _ := s.desc.GetArray("disks")
@@ -2597,9 +2603,7 @@ func (s *SBaremetalServer) DoRebuildRootDisk(term *ssh.Client) ([]*disktool.Part
return nil, err
}
tool := disktool.NewSSHPartitionTool(term)
tool.FetchDiskConfs(baremetal.GetDiskConfigurations(layouts))
err = tool.RetrieveDiskInfo()
tool, err := disktool.NewSSHPartitionTool(term, layouts)
if err != nil {
return nil, err
}
@@ -2655,7 +2659,13 @@ func (s *SBaremetalServer) DoRebuildRootDisk(term *ssh.Client) ([]*disktool.Part
func (s *SBaremetalServer) SyncPartitionSize(term *ssh.Client, parts []*disktool.Partition) ([]jsonutils.JSONObject, error) {
disks, _ := s.desc.GetArray("disks")
// calculate root partitions count
rootPartsCnt := len(parts) - len(disks) + 1
if len(parts) < len(disks) {
// HACK: rebuild root disk
rootPartsCnt = len(parts)
}
rootParts := parts[0:rootPartsCnt]
dataParts := parts[rootPartsCnt:]
idx := 0
@@ -2714,7 +2724,58 @@ func (s *SBaremetalServer) deployFs(term *ssh.Client, deployInfo *deployapi.Depl
if strings.ToLower(rootfs.GetOs()) == "windows" {
return nil, fmt.Errorf("Unsupported OS: %s", rootfs.GetOs())
}
return guestfs.DeployGuestFs(rootfs, s.desc, deployInfo)
desc, err := deployapi.GuestDescToDeployDesc(s.desc)
if err != nil {
return nil, errors.Wrap(err, "To deploy desc fail")
}
desc, err = s.reIndexDescNics(term, desc)
if err != nil {
return nil, errors.Wrap(err, "reIndexDescNics")
}
return guestfs.DeployGuestFs(rootfs, desc, deployInfo)
}
func (s *SBaremetalServer) reIndexDescNics(term *ssh.Client, desc *deployapi.GuestDesc) (*deployapi.GuestDesc, error) {
rNics, err := tasks.GetNicsInfo(term)
if err != nil {
return nil, errors.Wrapf(err, "Get server %s remote nics", s.GetName())
}
findRemoteNic := func(mac string) (int, *types.SNicDevInfo) {
for idx, nic := range rNics {
if nic.Mac.String() == mac {
return idx, rNics[idx]
}
}
return -1, nil
}
reIndexNics := func(nics []*deployapi.Nic) ([]*deployapi.Nic, error) {
for idx, nic := range nics {
if nic.GetNicType() == api.NIC_TYPE_IPMI {
continue
}
rIdx, rNic := findRemoteNic(nic.GetMac())
if rNic == nil {
return nil, errors.Errorf("Not found remote nic by mac %q", nic.GetMac())
}
if nics[idx].Index != int32(rIdx) {
log.Infof("Reindex nic %s index %d to %d", nics[idx].GetMac(), nics[idx].Index, rIdx)
nics[idx].Index = int32(rIdx)
}
}
return nics, nil
}
nics, err := reIndexNics(desc.Nics)
if err != nil {
return nil, errors.Wrap(err, "Reindex nics")
}
desc.Nics = nics
sNics, err := reIndexNics(desc.NicsStandby)
if err != nil {
return nil, errors.Wrap(err, "Reindex standby nics")
}
desc.NicsStandby = sNics
return desc, nil
}
func (s *SBaremetalServer) GetNics() []types.SServerNic {

View File

@@ -36,6 +36,7 @@ type BaremetalOptions struct {
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"`
TaskWorkerCount int `default:"32" help:"Parallel worker count for tasks"`
DefaultIpmiPassword string `help:"Default IPMI passowrd"`
DefaultStrongIpmiPassword string `help:"Default strong IPMI passowrd"`

View File

@@ -79,6 +79,7 @@ func (h *DHCPHandler) ServeDHCP(pkt dhcp.Packet, _ *net.UDPAddr, _ *net.Interfac
if req.RelayAddr.String() == "0.0.0.0" {
return nil, nil, fmt.Errorf("Request not from a DHCP relay, ignore mac: %s", req.ClientMac)
}
log.Infof("[DHCP] from relay %s packet, mac: %s", req.RelayAddr, req.ClientMac)
conf, targets, err := req.fetchConfig(h.baremetalManager.GetClientSession())
if err != nil {
return nil, nil, err
@@ -188,7 +189,7 @@ func (req *dhcpRequest) fetchConfig(session *mcclient.ClientSession) (*dhcp.Resp
if len(netConf.GuestDhcp) > 0 {
dhcpAddrList = strings.Split(netConf.GuestDhcp, ",")
}
log.Debugf("dhcpAddrList %s", dhcpAddrList)
log.Debugf("find network config %#v, dhcpAddrList %s", netConf, dhcpAddrList)
// TODO: set cache for netConf
if req.isPXERequest() {
@@ -227,6 +228,7 @@ func (req *dhcpRequest) fetchConfig(session *mcclient.ClientSession) (*dhcp.Resp
// from guestdhcp import GuestDHCPHelperTask
// task = GuestDHCPHelperTask(self)
// task.start()
log.Infof("Not found baremetal by mac: %s", req.ClientMac)
return nil, nil, nil
}
req.baremetalInstance = bmInstance

View File

@@ -670,6 +670,10 @@ func getDMIMemInfo(cli *ssh.Client) (*types.SDMIMemInfo, error) {
return sysutils.ParseDMIMemInfo(ret), nil
}
func GetNicsInfo(cli *ssh.Client) ([]*types.SNicDevInfo, error) {
return getNicsInfo(cli)
}
func getNicsInfo(cli *ssh.Client) ([]*types.SNicDevInfo, error) {
ret, err := cli.Run("/lib/mos/lsnic")
if err != nil {

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