Compare commits

...

382 Commits

Author SHA1 Message Date
屈轩
bd01cc9c95 fix(glance): add notify for image create (#23554) 2025-10-16 14:30:54 +08:00
wanyaoqi
6f5feb6a7f fix(webconsole): baremteasl ipmi sol instance_name hide password (#23549) 2025-10-16 00:01:59 +08:00
屈轩
23a8fefbd0 fix(region): valid essd pl0 disk resize (#23548) 2025-10-15 17:25:23 +08:00
屈轩
e04fe21a5c fix(region): vendor update (#23542) 2025-10-15 10:58:02 +08:00
屈轩
272e32c0b9 fix(region): support change storage type (#23532) 2025-10-14 19:06:24 +08:00
屈轩
bed77085c2 fix(region): healt status (#23527) 2025-10-13 18:51:19 +08:00
屈轩
c9f3c9578d fix(keystone): distribute permissions when the organization changes (#23504) 2025-10-13 18:50:01 +08:00
屈轩
8deaead935 fix(region): private zone create status (#23523) 2025-10-13 18:05:39 +08:00
wanyaoqi
87e65dab12 fix(host): ensure host wire marshal nil value (#23506) 2025-10-12 11:04:22 +08:00
屈轩
671e24b01e fix(region): server sku create with region id (#23511) 2025-10-11 16:55:15 +08:00
wanyaoqi
3d8ea72139 fix(region,glance,host-deployer): guest image support bios boot mode detect (#23380) 2025-10-11 10:21:21 +08:00
Zexi Li
70f29b481c fix(baremetal): ensure the execution of the BaremetalServerDestroyTask (#23496) 2025-10-09 17:07:18 +08:00
Jian Qiu
35cb610755 fix: ignore e2fsck errors if retcode < 4 (#23488)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-09 16:31:26 +08:00
wanyaoqi
62f44a77ff fix(host): disk resize error input params (#23492) 2025-10-09 13:27:13 +08:00
Jian Qiu
2ba9f0b887 fix: network manager supports ipv4 static routes for 3.11 (#23485)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-08 13:17:43 +08:00
Jian Qiu
1e676fb2e8 fix: default cloud region init error (#23471)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-03 06:33:12 +08:00
Jian Qiu
cfc6d56361 fix: support network manager connection profiles (#23466)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-03 00:19:17 +08:00
屈轩
f50929bc60 fix(region): vendor update (#23465) 2025-09-30 19:09:48 +08:00
屈轩
2ebbfb4dd9 fix(cloudmon): metric sync (#23464) 2025-09-30 16:53:10 +08:00
屈轩
feb6a1981f fix(region): vendor update (#23461) 2025-09-30 15:13:34 +08:00
屈轩
ded669c7a2 fix(region): host order by virt cpu (#23456) 2025-09-30 13:19:11 +08:00
Jian Qiu
2241f34b9b fix: update vendor 20250930 3.11.12 (#23454)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-30 13:17:08 +08:00
Jian Qiu
59ad7f73e8 fix: hostman master nic may be nil (#23449)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-30 11:17:49 +08:00
Jian Qiu
2b08c946ff fix: s3 common options (#23442)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-29 18:15:44 +08:00
Jian Qiu
4f0ca33bf9 fix: disable password history unique check by default (#23437)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-29 15:48:14 +08:00
屈轩
340d246ee5 fix(region): vendor update (#23418) 2025-09-28 18:04:20 +08:00
wanyaoqi
ae0920476b fix(host-deployer): update host-deployer-base to 1.4.11 (#23411) 2025-09-28 17:25:40 +08:00
屈轩
2ffa2cf4ca fix(region): vendor update (#23407) 2025-09-28 14:59:10 +08:00
wanyaoqi
cc4fdf189a Automated cherry pick of #23374: fix(region,host): guest add vnc screen dump support (#23379)
* fix(host): update nic confs inside vm on qga delete nics

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

* fix(region,host): guest add vnc screen dump support

---------

Signed-off-by: wanyaoqi <wanyaoqi@yunion.cn>
2025-09-27 12:03:35 +08:00
wanyaoqi
5ab6e57d73 fix(host-deployer): allow growpart on primary partition (#23386)
* fix(host): init cgroup ignore disable cgroup option

* fix(host-deployer): allow growpart on primary partition
2025-09-27 12:01:32 +08:00
屈轩
0ec0162857 fix(region): vendor update (#23400) 2025-09-26 18:05:35 +08:00
屈轩
f00099e29f fix(region): vendor update (#23385) 2025-09-26 13:53:52 +08:00
屈轩
0bbc92e46d fix(region): vendor update (#23369) 2025-09-24 17:22:57 +08:00
Jian Qiu
4c3186f4a1 Automated cherry pick of #23363: fix: network filter by ip error for dameng (#23366)
* fix: network filter by ip error for dameng

* fix: update vendor 20250923

---------

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-23 23:23:00 +08:00
屈轩
6722c43868 fix(region): add expired release notify hour options (#23350) 2025-09-22 10:58:08 +08:00
Jian Qiu
e4391b9cce fix: linux sshd_config support (#23336)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-20 00:39:04 +08:00
Zexi Li
70887c8d58 fix(scheduler): watch serversku (#23327) 2025-09-19 23:49:56 +08:00
屈轩
66840c2c16 fix(region): rds backup sync (#23307) 2025-09-19 23:47:16 +08:00
wanyaoqi
34b417c60b fix(host,host-deployer): support lvm disk resize (#23333)
- add resize lvm disk support
- support qga online resize disk partitions and filesystems
2025-09-19 23:45:47 +08:00
Jian Qiu
b96abf5af6 fix: check os_arch when server rebuilding root (#23337)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-19 23:44:20 +08:00
屈轩
433747ff99 fix(notify): optimized workwx access token expired time (#23324) 2025-09-18 14:55:28 +08:00
Zexi Li
614b13cd13 fix(monitor): diffTagKeys are empty when only one series in results (#23310) 2025-09-18 07:49:04 +08:00
屈轩
d7f0a6f065 fix(region): remove debug sql (#23319) 2025-09-17 16:54:29 +08:00
屈轩
160b6e3faf fix(cloudmon): alert metric with tenant id (#23316) 2025-09-17 16:34:51 +08:00
wanyaoqi
7a82d04f70 feat(host): cgroupv2 support (#23304) 2025-09-16 23:20:18 +08:00
屈轩
104c927e74 fix(climc): sku create params (#23300) 2025-09-15 15:33:30 +08:00
屈轩
2d795063dd fix(region): support gcp shared vpc and image (#23297) 2025-09-12 23:03:39 +08:00
屈轩
e0ed7e80df fix(monitor): history alert report (#23279) 2025-09-12 15:27:12 +08:00
Zexi Li
c880ee5940 fix(monitor): fetch total alert resources from monitor_resource_alert (#23274) 2025-09-10 19:17:20 +08:00
屈轩
88f61e6be2 fix(region): update cloudprovider external id (#23273) 2025-09-10 18:59:58 +08:00
Jian Qiu
0777418c63 fix: image self check status (#23252)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-10 18:57:53 +08:00
屈轩
3ddd2603f8 fix(region): support hyperdisk for gcp (#23270) 2025-09-10 15:34:24 +08:00
Zexi Li
1a4a0fe647 fix(climc): monitor-alertrecords-total-alert command (#23265) 2025-09-10 14:17:41 +08:00
屈轩
0c090d08f2 fix(region): snapshot policy unbind disks (#23240) 2025-09-04 16:57:38 +08:00
屈轩
c37b15a3d0 fix(region): sync prepaid disk expired time (#23237) 2025-09-04 16:47:18 +08:00
屈轩
0eb0f9d99c fix(region): add disk change billing type log (#23233) 2025-09-03 20:16:44 +08:00
屈轩
620fd06d87 fix(region): add kafka and mongodb capability (#23230) 2025-09-03 19:44:40 +08:00
屈轩
944267af35 fix(region): support more scheme keypair (#23211) 2025-09-03 11:01:00 +08:00
Jian Qiu
f40095bd46 fix: fail to delete cas idp due to readonly domain (#23216)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-03 05:48:27 +08:00
Jian Qiu
4781f552e2 fix: network filter by ipv6 address (#23226)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-03 05:46:31 +08:00
Zexi Li
8eb11e7865 feat(host): add SdnFetchDataFromComputeService option (#23205) 2025-09-01 23:15:22 +08:00
屈轩
523653e755 fix(region): avoid change to the same config sku not effective (#23204) 2025-09-01 11:50:23 +08:00
Jian Qiu
84dea5ace9 fix: too many recursive locks when batch create (#23197)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-29 23:07:50 +08:00
屈轩
07912a9f8c fix(region): add cloud_env filter for cachedimages (#23192) 2025-08-27 18:34:46 +08:00
Jian Qiu
bd72a48ecb fix: guest ipv6 vip (#23181)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-27 18:07:55 +08:00
Jian Qiu
4377da3aff fix: force NetworkManager unmanged physical netinterface (#23069)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-26 15:38:55 +08:00
屈轩
140fda72e6 fix(keystone): show ldap url (#23175) 2025-08-26 14:28:47 +08:00
屈轩
521bc94749 fix(keystone): upgrade ldap version (#23167) 2025-08-26 13:28:47 +08:00
Jian Qiu
78850c6d03 fix: deploy gai.conf if both v4 and v6 present (#23164)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-25 18:20:09 +08:00
屈轩
32b85c1b28 fix(region): optimized cached image list (#23156) 2025-08-22 15:45:04 +08:00
wanyaoqi
ea65acf6ed fix(scheduler): add session usage timeout options (#23142) 2025-08-21 18:10:39 +08:00
屈轩
f09e9f081d fix(region): avoid update guest disable_delete attribute error when host id is empty (#23136) 2025-08-20 16:21:44 +08:00
Zexi Li
78eaa50af1 fix(baremetal): update the grub auto configuration to fix the aarch64 disk boot (#23127) 2025-08-20 15:11:14 +08:00
屈轩
d9e8c89711 fix(region): sync lb eip (#23126) 2025-08-20 14:14:07 +08:00
Zexi Li
3b34ac8dba feat(region): fix ISO size display (#23130)
SGuestcdrom.Size is Byte, not MB

Co-authored-by: happygame <happygame1024@gmail.com>
2025-08-20 12:08:43 +08:00
Zexi Li
b93d913948 fix(baremetal-agent): error occurred when removing logical volumes on the arm64 host (#23120) 2025-08-20 12:00:00 +08:00
屈轩
7d2bcd2828 fix(region): sync eip associate resource (#23113) 2025-08-19 14:54:55 +08:00
屈轩
76d798044e fix(region): add storage filter for snapshot (#23107) 2025-08-18 14:57:48 +08:00
wanyaoqi
382d51e18c fix(host): run ifdown script on guest delete (#23100) 2025-08-16 14:49:27 +08:00
Jian Qiu
a316053a4f fix: webconsole skip refererer check by default (#23093)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-16 14:46:16 +08:00
wanyaoqi
634058a832 fix(vpcagent): dhcp enable default gateway on default network (#23096) 2025-08-16 14:44:28 +08:00
屈轩
4c2ba4a9c9 fix(scheduledtask): force sync account (#23086) 2025-08-14 19:36:19 +08:00
屈轩
e244be79b1 fix(region): server snapshot policy (#23079) 2025-08-14 19:21:22 +08:00
屈轩
6615224f93 fix(region): dns record policy type (#23077) 2025-08-13 17:48:39 +08:00
wanyaoqi
555d77f9d0 fix(host): lvm guest reload disk before delete snapshot (#23048) 2025-08-11 10:32:50 +08:00
wanyaoqi
c15d5ba838 fix(baremetal): agent storagecache input params error (#23044) 2025-08-08 18:25:14 +08:00
Jian Qiu
5fce56f5e6 fix: filter guest by multiple ips with exact match (#23040)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-08 17:56:20 +08:00
屈轩
9a5b906d10 fix(region): disk update tag (#23026) 2025-08-06 15:52:17 +08:00
Jian Qiu
4d45708d11 fix: always update hostname for rhel-like os (#23019)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-06 01:07:38 +08:00
Jian Qiu
1f39911996 fix: inconsist checksum between image and its same format subimage (#22989)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-30 01:44:47 +08:00
wanyaoqi
d3154a0cde fix(host,glance): only target qcow2 set cluster size on image convert (#22976) 2025-07-30 00:42:30 +08:00
Jian Qiu
a5e4471e1f fix: glance converts all queued subimages, regardless of format (#22970)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-29 10:25:55 +08:00
wanyaoqi
c00c81f23b fix(host): set qemuimg convert cluster_size 64k on compat image (#22964) 2025-07-29 00:00:57 +08:00
Jian Qiu
061988edea fix: set default worker parameter (#22960)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-28 14:12:39 +08:00
wanyaoqi
7d453caff6 fix(region): iso boot do not check boot mode (#22948) 2025-07-26 02:26:40 +08:00
屈轩
c231b0bc66 fix(apigateway): 移除不必要查询,避免用户登录时间过长 (#22954) 2025-07-25 20:36:44 +08:00
wanyaoqi
d83fd7490a fix(host): host init no numa node (#22947) 2025-07-25 00:33:16 +08:00
屈轩
1d7b27e5e3 fix(region): add guest billing type for disk (#22937) 2025-07-23 18:53:56 +08:00
屈轩
1f083d2490 fix(region): host order (#22928) 2025-07-22 15:20:06 +08:00
屈轩
e7227612ea fix(region): vendor update (#22921) 2025-07-21 17:33:40 +08:00
Jian Qiu
e304c99316 fix: updte vendor 3.11.11 20250718 (#22915)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-18 13:26:50 +08:00
Zexi Li
6c4c73c79e fix(scheduler): netinterface cache is not informed (#22898) 2025-07-15 19:58:11 +08:00
wanyaoqi
ba9457df30 fix(host): check storage id is correct on src migrate prepare (#22891)
correct disk storage id on dest migrate prepare
2025-07-15 16:12:00 +08:00
屈轩
5027e6bbde fix(region): add sort for host (#22878) 2025-07-11 19:09:04 +08:00
wanyaoqi
13060902a0 fix(region): do not set guest to resuce status on guest running (#22864) 2025-07-10 22:10:07 +08:00
屈轩
6c726c7211 fix(region): 修复本地到期释放功能和资源同步冲突 (#22862) 2025-07-10 19:38:09 +08:00
wanyaoqi
1b6f13738a fix(host): add check mem dev is null on guest setup (#22846) 2025-07-09 14:15:40 +08:00
屈轩
4455aa2f6d fix(region): 避免删除虚拟机时,未能正常删除后挂载的磁盘 (#22844) 2025-07-07 14:46:23 +08:00
屈轩
345de4a5c3 fix(region): create disk with tags (#22835) 2025-07-04 17:08:12 +08:00
屈轩
944953957e fix(region): vendor update (#22831) 2025-07-03 15:17:01 +08:00
屈轩
8775daf05f fix(region): vendor update for sync mongodb ip addr (#22819) 2025-07-03 05:32:46 +08:00
wanyaoqi
7e7e6c1b45 fix(region): host calculate set mem_cmt_bound 1 on host enable hugepage (#22812) 2025-07-03 05:29:49 +08:00
wanyaoqi
8ac7f8242a fix(host): qemuimg convert add cluster_size (#22791) 2025-07-03 05:27:13 +08:00
屈轩
a1a5f23fc9 fix(region): vendor update (#22808) 2025-07-02 21:01:23 +08:00
屈轩
c5871a0d2f fix(notify): support dingtalk robot sign (#22768) 2025-06-23 16:59:44 +08:00
屈轩
7bae678b01 fix(cloudmon): cloudpods collect metric interval (#22765) 2025-06-23 16:17:28 +08:00
屈轩
4444a0f69c fix(region): sync remove backend group (#22760) 2025-06-20 19:38:33 +08:00
屈轩
4360870e5f fix(region): support skip sync server by tag value (#22755) 2025-06-20 19:26:52 +08:00
屈轩
5f56de3c5d fix(region): vendor update (#22751) 2025-06-20 18:12:48 +08:00
Jian Qiu
ace1efdb51 fix: use goid to identify differnt goroutine (#22741)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-19 14:50:31 +08:00
Zexi Li
831a3044df Automated cherry pick of #22729: Monitor worker alert (#22736)
* fix(monitor): GetMetricMeasurement 接口只查询过去30m的数据

避免数据过多导致 victoria-metrics 报错

* fix(monitor): wildchar of alert group by field
2025-06-18 15:27:35 +08:00
屈轩
e93e9a0a8a fix(region): lb listener rule associate backend group (#22735) 2025-06-18 14:15:05 +08:00
Zexi Li
1aa70f504a fix: panic when there is no secondary IP on the host. (#22728)
Co-authored-by: glzjin <glzjin2015@gmail.com>
2025-06-17 11:15:22 +08:00
wanyaoqi
2325bc601c fix(region,host): add auto merge snapshots options, preallocation options (#22712) 2025-06-13 15:19:40 +08:00
屈轩
4f68617ea6 fix(region): vendor update (#22699) 2025-06-06 19:22:39 +08:00
屈轩
6d8ebbb369 fix(region): enable cloud dns record (#22696) 2025-06-06 18:32:06 +08:00
wanyaoqi
d9d93eb921 fix(host): pass decoded userdata to host-deployer (#22680) 2025-06-05 23:50:37 +08:00
屈轩
74b79a6231 fix(region): vendor update (#22679) 2025-06-05 19:28:06 +08:00
Zexi Li
1e5d035fd9 fix(scheduler): wrong sort order of instance group selection (#22665) 2025-06-04 14:27:07 +08:00
Jian Qiu
93f5a49260 fix: update vendor to fix keystone user join project not found (#22646)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-31 18:47:42 +08:00
wanyaoqi
a8d7758c83 feat(host-deployer): deploy vlan subinterface on baremetal hypervisor (#22630)
- host-deployer add deploy vlan subinterface on baremetal hypervisor
- fix baremetal-agent cache image parse input data
2025-05-30 10:32:10 +08:00
wanyaoqi
cf71a29b67 feat(region,host): qga deploy network config on attach nics (#22547) 2025-05-30 10:29:38 +08:00
屈轩
a9eb3872e4 fix(region): vendor update (#22625) 2025-05-29 11:23:14 +08:00
屈轩
8e7b136c4b fix(region): secgroup rule filter (#22620) 2025-05-28 18:38:48 +08:00
wanyaoqi
13197c19a4 fix(host): qemu extra params format (#22608) 2025-05-27 13:34:04 +08:00
屈轩
66b052741b fix(region): update qcloud storage type (#22614) 2025-05-27 12:44:07 +08:00
wanyaoqi
b020507894 fix(host): check min_free_kbytes size is enough (#22593) 2025-05-24 01:11:24 +08:00
屈轩
050932287f fix(cloudmon): add vm_ip metric for vm (#22587) 2025-05-22 10:54:03 +08:00
屈轩
eff18d4808 fix(cloudmon): vm metrics with ips (#22584) 2025-05-22 10:41:23 +08:00
屈轩
0bfc818173 fix(region): add filter for secgroup rule (#22579) 2025-05-21 19:27:11 +08:00
屈轩
acc6f28e27 fix(region): add account info for sec rules (#22576) 2025-05-21 18:40:14 +08:00
屈轩
8f786c2337 fix(region): allow create public server sku (#22570) 2025-05-21 14:43:21 +08:00
屈轩
15db145c2d fix(region): init aliyun storage medium type (#22565) 2025-05-20 21:48:39 +08:00
wanyaoqi
2f6ebb265a fix error when create vm with ceph disk (#22562)
Co-authored-by: liangkaijun <liangkaijun52013@gmail.com>
2025-05-20 21:27:22 +08:00
屈轩
cd5fb77c59 fix(region): user sync with ctx (#22556) 2025-05-19 18:09:31 +08:00
wanyaoqi
ad21f56e1f fix: vendor update 2505013 (#22519) 2025-05-19 01:50:07 +08:00
屈轩
4795331a8b fix(region): vendor update (#22545) 2025-05-16 11:19:55 +08:00
屈轩
cd44f8e218 fix(region): guest disk iops (#22541) 2025-05-15 15:46:08 +08:00
屈轩
2a3d2cb725 fix(region): change disk billing type (#22534) 2025-05-15 13:22:07 +08:00
屈轩
aa447b1d3f fix(region): show correct disk iops (#22537) 2025-05-15 12:48:34 +08:00
屈轩
78903516ed fix(common): avoid empty context (#22510) 2025-05-12 16:21:22 +08:00
屈轩
6bfc2da7e7 fix(notify): support notify with robotids (#22504) 2025-05-09 21:23:11 +08:00
屈轩
4930e191dc fix(region): vendor update (#22499) 2025-05-09 14:56:13 +08:00
屈轩
ae7d4f7d22 fix(common): obj id cache (#22496) 2025-05-09 14:50:37 +08:00
屈轩
927e74d42c fix(region): vendor update (#22490) 2025-05-08 18:36:28 +08:00
屈轩
3bd3e1204f fix(common): policy tag filter cache (#22486) 2025-05-08 15:57:15 +08:00
屈轩
f54bfdc5d6 fix(notify): add task_run const (#22483) 2025-05-07 20:15:28 +08:00
屈轩
10cb69326a fix(region): vendor update (#22468) 2025-04-27 16:13:15 +08:00
屈轩
e7d453409b fix(region): optimized policy query (#22457) 2025-04-27 11:56:32 +08:00
屈轩
958c8deb86 fix(region): vendor update (#22454) 2025-04-23 14:12:19 +08:00
Jian Qiu
eca32b85a2 fix: optimize filterByOwner query speed (#22445)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-04-20 18:16:54 +08:00
Jian Qiu
de40f28b18 fix: start sync status (#22443)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-04-20 18:16:39 +08:00
wanyaoqi
909c01b734 fix(host): lvm disk create from esxi (#22425) 2025-04-20 18:05:50 +08:00
Jian Qiu
9cfe1c2509 fix: webconsole referer whitelist (#22421)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-04-20 18:04:01 +08:00
Zexi Li
c2195b97ac fix(monitor): remove host type query filter (#22439) 2025-04-18 12:15:33 +08:00
wanyaoqi
8c817acf2a fix(monitor): telegraf config add host_ip tag (#22405) 2025-04-17 22:35:31 +08:00
Zexi Li
0dfed10e90 fix(monitor): getTagValues no data (#22434) 2025-04-17 11:09:26 +08:00
Zexi Li
280eb700a6 fix(scheduler): unused prometheus pkg (#22430) 2025-04-16 10:40:25 +08:00
Zexi Li
a9d8445603 fix(scheduler): disable prometheus metrics handler (#22428) 2025-04-16 10:35:03 +08:00
屈轩
ce77468604 fix(region): vendor update (#22424) 2025-04-15 19:39:14 +08:00
Jian Qiu
fa321a7a1d fix(host-health): check etcd client is reconnecting (#22420)
Co-authored-by: wanyaoqi <d3lx.yq@gmail.com>
2025-04-15 18:25:18 +08:00
Zexi Li
7b689a7de6 fix(monitor): support victoria metrics bottom query (#22417) 2025-04-15 15:17:03 +08:00
屈轩
3df60efa85 fix(climc): keystone pprof profile (#22407) 2025-04-14 15:28:32 +08:00
屈轩
acabecbb61 fix(keystone): password history check default 1 (#22411) 2025-04-14 15:27:44 +08:00
wanyaoqi
f0966a0296 fix(host): ignore errors on reconfigure vfio nic bandwidth (#22370) 2025-04-13 09:57:14 +08:00
屈轩
b02ef75216 fix(region): add custom total count (#22398)
Co-authored-by: fourhu <fourhu@foxmail.com>
2025-04-10 16:07:17 +08:00
屈轩
2a0ac9d196 fix(webconsole): require rdp input password (#22397) 2025-04-10 11:23:16 +08:00
屈轩
1fa3e39b4b fix(ansibleserver): show pretty error for ansible playbook (#22395) 2025-04-10 10:52:37 +08:00
屈轩
ae9647a060 fix(region): export metadata (#22393) 2025-04-09 18:44:44 +08:00
屈轩
3964086aae fix: update file repo docker script (#22389) 2025-04-09 17:27:14 +08:00
屈轩
3e564eefac fix(region): update gpu used usage (#22391) 2025-04-09 17:26:26 +08:00
屈轩
3cbecfb8ce fix(ansbileserver): update docker file (#22382) 2025-04-09 10:54:32 +08:00
屈轩
1cdcf58d2a fix(host-deployer): add tencentos support (#22383) 2025-04-09 09:48:49 +08:00
屈轩
6df5b9168b fix(region): add gpu unused usage (#22373) 2025-04-08 11:40:57 +08:00
Zexi Li
f28519bbbf fix(monitor): check measurement field (#22376) 2025-04-07 18:40:56 +08:00
Jian Qiu
1021d39c15 fix: hide image location (#22364)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-04-04 08:17:41 +08:00
Jian Qiu
54c4e78470 fix: set db connection keepalive options (#22357)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-04-03 19:52:29 +08:00
wanyaoqi
4edc483209 fix(region): guestdisk list add auto reset column (#22346) 2025-03-26 15:07:13 +08:00
wanyaoqi
2ff5f9331f fix(monitor): vm_net add bytes and packages measurements (#22342) 2025-03-26 15:06:13 +08:00
Jian Qiu
bcfb906879 fix: update vendor 20250325 (#22338)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-03-25 23:53:41 +08:00
Zexi Li
883a6c38e7 fix(scheduler,monitor): tls 3des (#22337) 2025-03-25 21:15:38 +08:00
Zexi Li
8cc49b3bee fix(monitor): wrong index of details (#22332) 2025-03-25 15:31:22 +08:00
Zexi Li
100575e6a8 fix(monitor): wrong TriggerTime (#22329) 2025-03-25 11:42:41 +08:00
Zexi Li
0c4b3784e0 optmized(monitor): query alertrecord by res_id (#22319) 2025-03-25 10:03:31 +08:00
屈轩
37dca8c6fc fix(region): vendor update (#22326) 2025-03-24 19:49:38 +08:00
Jian Qiu
aeb3b620ed fix: fail to delete sub images of composed guest image (#22281)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-03-19 22:26:55 +08:00
屈轩
33f7ca1681 fix(region): add post delete hook (#22302) 2025-03-19 10:13:48 +08:00
Zexi Li
9874b4af3f optimized(keystone): local sql auth by password (#22305) 2025-03-19 10:10:55 +08:00
屈轩
ea36eb2e82 fix(monitor): optimized alert list (#22298) 2025-03-18 19:52:35 +08:00
屈轩
2a4231658f fix(region): vendor update (#22293) 2025-03-18 16:16:15 +08:00
wanyaoqi
8e4d673139 fix(host): virtio nic add fdb record on has sriov nic (#22283) 2025-03-18 15:09:59 +08:00
Zexi Li
d34db8ebf5 fix(webconsole): disable 3des cipher suites (#22294) 2025-03-18 13:12:17 +08:00
Zexi Li
357b5c1f43 feat(monitor): support listing monitor_resource by alert_state (#22287) 2025-03-18 11:52:25 +08:00
wanyaoqi
2b60f5a217 fix(host): hotplug mem adaptation for guests no memdev (#22256) 2025-03-16 00:04:30 +08:00
屈轩
bd2ccad027 fix(region): vendor update (#22279) 2025-03-16 00:03:52 +08:00
屈轩
e5d1bbd245 fix(region): vendor update (#22274) 2025-03-14 09:59:21 +08:00
屈轩
a27a67f82a fix(climc): service config bool value (#22270) 2025-03-13 14:00:27 +08:00
屈轩
0edb97930e fix(region): show dump info when worker stuck (#22251) 2025-03-12 16:53:00 +08:00
Zexi Li
29438227a7 Merge pull request #22261 from zexi/automated-cherry-pick-of-#22259-upstream-release-3.11
Automated cherry pick of #22259: fix(webconsole,monitor): pprof handlers of gorilla mux
2025-03-11 12:27:43 +08:00
Zexi Li
6efd55eff3 fix(webconsole,monitor): pprof handlers of gorilla mux 2025-03-11 11:57:18 +08:00
wanyaoqi
47ad526e75 feat(glance,region,host): auto cache glance images to ceph storages (#22246) 2025-03-08 11:03:37 +08:00
Jian Qiu
bb31b2abfc fix: auto truncate sql string (#22243)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-03-08 10:46:33 +08:00
wanyaoqi
698aad1eb1 fix(host): change storage clone disk add encrypt info (#22229) 2025-03-08 08:59:23 +08:00
wanyaoqi
9408f234fa fix(host-deployer): set xfs default ftype 1 (#22233) 2025-03-06 11:16:19 +08:00
Zexi Li
1f215d316c fix(host): not purge isolated device when detaching it (#22224) 2025-03-05 19:33:24 +08:00
Jian Qiu
c25e1b5981 fix: glance always init s3 client (#22129)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-03-03 20:15:29 +08:00
Jian Qiu
58b90f1d9c fix: add summary-stats options (#22219)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-03-03 10:10:34 +08:00
Jian Qiu
4756215435 fix: disk copy to storage inherit classmeta (#22215)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-03-03 10:03:48 +08:00
wanyaoqi
1b37a6ab95 Fix/deploy guest add cpu vendor (#22206)
* fix(host-deployer): deploy guest add cpu vendor

* fix(host): host generate passwd use strong ruler
2025-02-28 14:12:28 +08:00
wanyaoqi
137d6a674c fix(host): shared lvm activte with auto activation option (#22189) 2025-02-27 16:05:05 +08:00
wanyaoqi
48453911ca feat(region,host): add guest disk auto reset on shutdown support (#22195) 2025-02-27 16:02:44 +08:00
屈轩
77efa95856 fix(esxi-agent): vendor update (#22203) 2025-02-27 14:49:24 +08:00
屈轩
b081dc43de fix(region): fast sync image (#22185) 2025-02-26 15:18:23 +08:00
屈轩
e03fc31ba2 fix(region): fix typo (#22182) 2025-02-25 17:11:51 +08:00
屈轩
3e43510b5c fix(region): allow create disk when vm running (#22171) 2025-02-25 12:02:12 +08:00
Zexi Li
4a4f529600 fix(monitor,webconsole): enable app profiling (#22176) 2025-02-24 19:51:31 +08:00
Jian Qiu
4a2e1cc26d fix: remove default values from cmtbound columns (#22157)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-02-24 17:32:06 +08:00
Jian Qiu
68aef7f31c fix: disable server TLS 1.0, 1.x and 1.2 SHA1 (#22168)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-02-24 17:30:09 +08:00
屈轩
f32665adf2 fix(region): 允许不同账号dns zone重名 (#22163) 2025-02-24 11:11:19 +08:00
wanyaoqi
12f27298b7 fix(region): lvm disk path add dev prefix (#22150) 2025-02-21 10:23:34 +08:00
wanyaoqi
1f2d2863b4 fix(region): lvm disk path add dev prefix (#22105) 2025-02-21 10:23:15 +08:00
wanyaoqi
4420290011 fix(host): check has vga use desc dev_type instead of host dev object (#22149) 2025-02-21 10:22:19 +08:00
wanyaoqi
f4bcf38f72 fix(host): add check default mem dev exist on hotplug (#22140) 2025-02-21 10:21:06 +08:00
Zexi Li
6e0f595d8a fix(climc): show ip column of action-show command (#22155) 2025-02-21 10:16:45 +08:00
Zexi Li
3bc77548b6 fix(monitor): always skip_check_series for metric-measurement api (#22145) 2025-02-19 19:57:30 +08:00
Zexi Li
d759f836ce fix(scheduler): 尽早发现子网ip不足引起的调度失败 (#22131) 2025-02-19 17:02:38 +08:00
屈轩
29a0d421fc fix(climc): support create vm with tags (#22127) 2025-02-19 16:50:10 +08:00
Zexi Li
60b8ea0021 fix(monitor): split tags and cloud_tags (#22122) 2025-02-18 18:29:37 +08:00
屈轩
368ebf5129 fix(region): avoid panic (#22118) 2025-02-18 15:52:54 +08:00
wanyaoqi
d1ad8f7998 Automated cherry pick of #22085: fix(host): update host-base to v0.7.0 (#22108)
* fix(host): update host-base to v0.7.0

* fix(cronjob): init timezone, timer set location
2025-02-15 00:02:43 +08:00
屈轩
f7f42b0d56 fix(region): support change vm billing type (#22103) 2025-02-14 11:33:44 +08:00
屈轩
c1934735f1 fix(region): skip sync server status time range (#22100) 2025-02-13 15:18:14 +08:00
Zexi Li
3eab8e495f fix(lbagent): telegraf configuration panic (#22095) 2025-02-13 12:29:44 +08:00
屈轩
3820efa0b4 fix(region): 跳过esxi存储找不到的关联宿主机 (#22083) 2025-02-12 12:04:48 +08:00
Zexi Li
b176297a30 fix(monitor): not split resource when notifying (#22078) 2025-02-10 19:50:06 +08:00
wanyaoqi
4dcf4283a5 fix(host,host-image): use nbd export images (#22073) 2025-02-10 14:16:18 +08:00
屈轩
135fa82ee1 fix(webconsole): avoid high cpu load (#22069) 2025-02-06 15:47:18 +08:00
屈轩
518bd57bcb fix(region): avoid panic (#22067) 2025-02-06 14:42:59 +08:00
屈轩
e5c8ca496b fix(region): aliyun disk resize (#22062) 2025-02-05 21:04:51 +08:00
Jian Qiu
eacf7444c0 fix: separate backup worker (#22063)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-02-05 20:20:37 +08:00
wanyaoqi
e06fbef9f0 fix(host): check image desc is empty (#22058)
image.inf record chksum or image id not matched will cause image desc empty
2025-02-05 18:54:09 +08:00
屈轩
7848a2eacc fix(region): resize cloud_auto disk (#22060) 2025-02-05 18:03:50 +08:00
屈轩
95b4c9dab0 fix(region): avoid panic (#22055) 2025-02-05 17:57:05 +08:00
Jian Qiu
e9ae6171b5 fix: task fetch duplicated id error (#22052)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-02-05 15:03:27 +08:00
Jian Qiu
2677a402fc fix: image cache use specific workers (#22047)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-02-05 11:33:41 +08:00
Zexi Li
8ca9fd5640 optimized(scheduler): reduce scheduling time (#22031) 2025-02-05 10:25:27 +08:00
屈轩
2143052cac fix(region): avoid panic (#22049) 2025-02-05 09:56:06 +08:00
wanyaoqi
5b3bb19a84 fix(region): hosts_tbl sys_info use longtext (#22042) 2025-01-29 23:59:36 +08:00
wanyaoqi
a3265c0370 fix(host): support sata ahci controller (#22040) 2025-01-29 23:58:43 +08:00
Jian Qiu
65199c6487 fix: notify empty receipients (#22043)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-01-29 21:13:12 +08:00
wanyaoqi
83477a7150 fix(glance): donot umount s3fs on glance exit (#22038) 2025-01-28 18:51:44 +08:00
wanyaoqi
7a19870f54 fix(region,host): slvm snapshot delete and instance snapshot purge (#22021) 2025-01-26 19:37:57 +08:00
Zexi Li
63e6043e0a customized(monitor): check whether the measurement field exists in victoriametrics (#22029) 2025-01-26 12:24:06 +08:00
wanyaoqi
23d9cc2a55 feat(region,host): hostpinger add cpu usage percent report (#22007) 2025-01-25 15:54:57 +08:00
Jian Qiu
016f93ec2c fix: support server change ipv6 address (#22014)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-01-25 15:39:52 +08:00
Zexi Li
266732b9b0 fix(glance): query vmware account brand (#22018) 2025-01-24 11:51:50 +08:00
屈轩
06c901897b fix(climc): apigateway endpoint type (#22013) 2025-01-23 14:39:12 +08:00
Jian Qiu
569fa010b7 fix: is_classic is missing from network details (#21995)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-01-21 16:25:25 +08:00
屈轩
0a432e16c4 fix(apigateway): set scope policy binding project id query (#21999) 2025-01-20 17:50:45 +08:00
Jian Qiu
4f3e35f110 fix: add summary statistics switch (#21992)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-01-18 20:14:52 +08:00
Zexi Li
a5c5b7ac39 fix(host): skip detect device that is not GPU class (#21984) 2025-01-18 06:14:26 +08:00
屈轩
7dd7c005f6 fix(region): export excel float (#21981) 2025-01-16 11:54:51 +08:00
wanyaoqi
e94f62d511 fix(region): snapshot policy with multi disk on same guest (#21949)
fix(region): delete overdued snapshots on cleanup snapshot task only
2025-01-16 10:42:56 +08:00
Zexi Li
e30f782bb1 fix(host): wrap qemu machine info error (#21972) 2025-01-14 20:49:58 +08:00
Jian Qiu
fae0a0dd7e fix: image update input struct param (#21963)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-01-14 02:17:55 +08:00
屈轩
daaf2305e7 fix(region): tags export (#21960) 2025-01-13 16:49:50 +08:00
wanyaoqi
9734c5187c fix(region): host list add hide cpu topo info option (#21946) 2025-01-13 13:54:40 +08:00
屈轩
3d1befff66 fix(region): vendor update (#21941) 2025-01-08 18:47:33 +08:00
屈轩
5c77ddcf00 fix(region): loadbalancer listener create input (#21938) 2025-01-08 18:31:32 +08:00
wanyaoqi
12f5f83fce fix(region): record snapshot last attched host on delete disk (#21925) 2025-01-07 20:43:00 +08:00
屈轩
a9816b929f fix(region): fetch lb backend owner (#21931) 2025-01-07 09:40:13 +08:00
Jian Qiu
b25f1f356b fix: backup storage support sign version (#21914)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-01-01 10:11:12 +08:00
wanyaoqi
4e0df86bf1 Fix/host load servers (#21894)
* fix(host): load disks init scsi bus

* fix(region,host): delete instance snapshot progress incorrect
2024-12-30 10:31:34 +08:00
Jian Qiu
525e93445e fix: add more filters to isolated_device (#21907)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2024-12-30 10:29:53 +08:00
wanyaoqi
843e6b8e29 Automated cherry pick of #21804: [WIP] fix: add more action log (#21875)
* fix: add more action log

* fix(region): add set cmt bound action
2024-12-29 23:08:36 +08:00
屈轩
4c18310404 fix(region): skip record conflict error (#21899) 2024-12-26 09:46:50 +08:00
屈轩
b6b5523822 fix(region): qcloud rds cpu option (#21892) 2024-12-25 10:54:48 +08:00
wanyaoqi
5e3a7f82cd fix(host): delete snapshot from storagehandler misc fix (#21883) 2024-12-23 20:43:32 +08:00
Zexi Li
8818e68e75 fix(monitor): unknown column returned when group by name tag (#21870) 2024-12-20 18:00:42 +08:00
Zexi Li
cee4111854 fix(baremetal): panic when save desc (#21864) 2024-12-20 16:18:31 +08:00
屈轩
dc8207ba41 fix(cloudmon): skip pull k8s service info (#21863) 2024-12-20 15:49:33 +08:00
屈轩
375d73dd1f fix(devtool): remove duplicate init db (#21857) 2024-12-20 15:34:47 +08:00
屈轩
f9f24ac560 fix(climc): avoid showing help twice (#21860) 2024-12-20 15:34:02 +08:00
wanyaoqi
26999afa35 fix(region): disk show io throttles (#21832) 2024-12-20 11:41:22 +08:00
wanyaoqi
2419a6f8db fix(host): optimize storage register failed wiht dup name (#21835) 2024-12-20 11:40:14 +08:00
屈轩
8915c4408d fix(region): expand rds maintain time field length (#21840) 2024-12-20 11:14:58 +08:00
wanyaoqi
f22d54b94a fix(climc): host-show hide long content sys_info nic_info metadata (#21851) 2024-12-20 11:11:48 +08:00
屈轩
8813a99a7a fix(region): host order by commit (#21854) 2024-12-20 09:57:35 +08:00
屈轩
5c46e663a3 fix(cloudmon): optimize service metric collect (#21847) 2024-12-19 18:48:31 +08:00
Zexi Li
74f4acedb7 fix(host): make telegraf configuration log to debug (#21842) 2024-12-19 15:56:14 +08:00
屈轩
c87eb001c9 fix(region): host custom total count (#21830) 2024-12-19 11:33:58 +08:00
Jian Qiu
a7a0d57830 fix: enfore mfa (#21802)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2024-12-17 19:39:51 +08:00
屈轩
194f9412b1 fix(apigateway): totp_issuer (#21825) 2024-12-17 19:37:10 +08:00
屈轩
1b62580dce fix(scheduledtask): add handler for scheduledtask (#21821) 2024-12-17 19:26:10 +08:00
Zexi Li
32bb02f443 fix(host): fix the rtl8139 NIC information is missing (#21818)
Co-authored-by: 云原生驿站 <33771248+CloudCourierStation@users.noreply.github.com>
2024-12-17 10:36:54 +08:00
屈轩
9d666573c0 fix(region): vendor update (#21810) 2024-12-16 16:42:00 +08:00
Zexi Li
ba2b03b2dc fix(baremetal-agent): adjust redfish http client timeout to 60s (#21790) 2024-12-13 10:39:18 +08:00
屈轩
bc63b300cd fix(region): skip cloudpods vm kernel check (#21796) 2024-12-12 19:23:38 +08:00
Zexi Li
3a5a8ba6ca feat(webconsole): keep_websocket_session option (#21783) 2024-12-11 14:26:37 +08:00
屈轩
64652c4656 fix(keystone): avoid remove project metadata when join organization node (#21763) 2024-12-07 20:58:45 +08:00
Zexi Li
93c06cf715 feat(monitor): add min and max aggregator (#21765) 2024-12-07 20:58:31 +08:00
屈轩
9478982cf0 fix(region): keep cloudpods vm empty password (#21760) 2024-12-06 18:10:08 +08:00
屈轩
5bcbecf5bb fix(region): managed vm migrate info (#21756) 2024-12-05 19:33:21 +08:00
屈轩
5191a3b7f2 fix(region): sync managed vm status (#21752) 2024-12-05 16:39:04 +08:00
屈轩
b2766640ef fix(region): managed vm migrate (#21749) 2024-12-05 16:18:16 +08:00
屈轩
667e3a4f7c fix(region): cloudpods vm migrate (#21746) 2024-12-05 14:39:18 +08:00
屈轩
b373e74560 fix(region): vendor update (#21742) 2024-12-05 12:33:36 +08:00
屈轩
6bcee5cbed fix(cloudmon): sync cloudproviders (#21733) 2024-12-04 09:42:41 +08:00
屈轩
d5469ae918 fix(apigateway): add service settings info (#21721) 2024-12-04 09:41:25 +08:00
Zexi Li
2280def838 fix(monitor): clone alert dashboard (#21727) 2024-12-03 10:06:04 +08:00
wanyaoqi
2857dcaef2 fix(host,host-deployer): start deployer guest with all of disk (#21710) 2024-12-02 14:58:52 +08:00
wanyaoqi
d463a945f7 fix(scheduler,region): fill resource info check guest is in pending usage (#21675) 2024-11-27 10:58:04 +08:00
Zexi Li
db83d01929 Automated cherry pick of #21692: fix: complete monitor metrics (#21695)
* fix: complete monitor metrics

* fix(monitor): remove container related metrics

---------

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2024-11-26 14:45:29 +08:00
wanyaoqi
c8510d007e fix(host): generate ceph conf dup monHosts (#21687) 2024-11-26 14:07:24 +08:00
Zexi Li
c4324e25e6 fix(monitor): set default query select and group by for alerting and panel (#21672) 2024-11-22 19:20:31 +08:00
Zexi Li
da7e2a010a feat(monitor): list alertrecords by res_id (#21667) 2024-11-22 16:54:37 +08:00
Zexi Li
b4852c75cd fix(monitor): raw_name of influxdb query (#21661) 2024-11-22 15:52:59 +08:00
屈轩
35c0dde143 fix(region): avoid panic (#21658) 2024-11-22 14:53:06 +08:00
wanyaoqi
175a354c4f fix(host): import from libvirt parse live xml (#21648) 2024-11-22 14:51:49 +08:00
屈轩
69780561f9 fix(cloudid): vendor update for azure iam (#21643) 2024-11-20 20:15:47 +08:00
屈轩
38e82e262a fix(region): vendor update for azure vm create (#21638) 2024-11-20 15:12:29 +08:00
Zexi Li
12fe3fa05c feat(monitor): support sorting reduced result (#21635) 2024-11-20 11:17:07 +08:00
Zexi Li
e96810ef0c fix(monitor): set default aggregator and group by for alert model (#21629) 2024-11-19 14:56:26 +08:00
Zexi Li
36a616d575 fix(monitor): inject ResType (#21625) 2024-11-19 14:00:15 +08:00
Zexi Li
ce913c10e0 Automated cherry pick of #21619: support telegraf linux_sysctl_fs (#21621)
* support telegraf-sysctl

* feat(monitor): add linux_sysctl_fs measurement
2024-11-18 20:04:26 +08:00
屈轩
cb8ab4b052 fix(region): add lb backend group count and listener count for lb details (#21609) 2024-11-17 22:47:16 +08:00
Zexi Li
ef7762d758 fix(region): not sync status when attaching and detaching disk (#21605) 2024-11-14 21:28:25 +08:00
屈轩
2883aeb870 fix(region): shareable virtual resource query (#21598) 2024-11-14 20:35:17 +08:00
屈轩
e102d90486 fix(region): remove dstack (#21601) 2024-11-14 20:32:23 +08:00
Zexi Li
0718d2abe6 fix(monitor): raw_name of group_by (#21594) 2024-11-14 18:01:03 +08:00
屈轩
d53802e0bc fix(region): allow disable default policy (#21587) 2024-11-14 14:42:40 +08:00
屈轩
e546326539 fix(region): add actual capacity used usage (#21574) 2024-11-12 11:35:06 +08:00
Zexi Li
6c60044bcb fix(monitor): alert notification details (#21578) 2024-11-12 11:28:16 +08:00
屈轩
5ac7edf489 fix(region): filter unused snapshot (#21563) 2024-11-12 11:16:18 +08:00
Zexi Li
583d5be908 fix(monitor): add metric content for email template (#21569) 2024-11-11 16:09:45 +08:00
Jian Qiu
8f356b65a2 fix: disable default dns domain cloud.onecloud.io (#21560)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2024-11-08 10:09:21 +08:00
屈轩
0b79844c12 fix(region): vendor update for gcp disk name length (#21556) 2024-11-07 15:00:04 +08:00
Jian Qiu
4c0fa9a6fe fix: telegraf kakfa ordered configuration (#21550)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2024-11-07 09:49:48 +08:00
屈轩
cb409c75b8 fix(glance): image stream worker count (#21538) 2024-11-07 09:48:31 +08:00
Zexi Li
0b791de55f feat(region,climc): server-set-root-disk-matcher (#21545) 2024-11-06 18:53:15 +08:00
Zexi Li
259ddccb04 fix(monitor): 修复报警恢复时包含其他资源的问题 (#21542) 2024-11-06 18:52:25 +08:00
屈轩
bb1d55b944 fix(notify): show pretty notify error (#21533) 2024-11-06 10:05:13 +08:00
wanyaoqi
be112dd6cc fix(region,host): storage add master host (#21470) 2024-11-06 10:03:41 +08:00
屈轩
d45514a104 fix(monitor): add order index for monitor panel (#21529) 2024-11-05 17:31:55 +08:00
Zexi Li
e1f524e832 feat(monitor): add system and processes host metrics (#21524) 2024-11-04 19:17:26 +08:00
屈轩
6b39ee756f fix(region): vendor update for disable esxi swap (#21516) 2024-11-04 15:09:23 +08:00
Zexi Li
8eaf118118 fix(region): not set PrimaryZone when no dns_domain configured (#21512) 2024-11-04 12:40:01 +08:00
Jian Qiu
1d51a4fb21 fix: disk filter by storage host (#21500)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2024-10-31 01:49:37 +08:00
Jian Qiu
2ac233d40b feature: kafka telegraf output options (#21495)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2024-10-30 12:32:50 +08:00
屈轩
13c3ea0ee0 fix(region): vendor update (#21490) 2024-10-29 18:26:13 +08:00
屈轩
8aa76d2176 fix(region): 避免翻页查询导致公有云实例被误清除 (#21481) 2024-10-28 16:41:06 +08:00
屈轩
03e7dcd2b7 fix(region): purge manager quota (#21478) 2024-10-28 15:50:43 +08:00
Zexi Li
5033905cd1 feat(webconsole): disable command recording defaultly (#21468) 2024-10-25 21:55:37 +08:00
屈轩
e3779e2c81 fix(cloudmon): cloudpods metric sync (#21461) 2024-10-25 17:26:20 +08:00
wanyaoqi
547c3b939a fix(region,host): ceph add enable messenger v2 options (#21443) 2024-10-25 10:15:59 +08:00
屈轩
06ca635327 fix(region): vendor update (#21441) 2024-10-22 19:57:54 +08:00
Jian Qiu
8da3c5aa02 fix: host bond slave nic should use permaddr as mac (#21434)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2024-10-20 14:42:20 +08:00
屈轩
e3a4b93205 fix(region): support cloudpods secrule ops (#21429) 2024-10-18 16:48:09 +08:00
屈轩
aa7197c53a Revert "fix(region): account probe lock" (#21426)
This reverts commit 7f90d38e5f.
2024-10-18 16:08:07 +08:00
屈轩
87b710ef58 fix(region): add interface field length (#21420) 2024-10-18 09:52:17 +08:00
Zexi Li
833dfcc6e2 fix(scheduler): avoid_same_host 策略分数过高导致调度分配不均 (#21415) 2024-10-16 10:23:22 +08:00
Zexi Li
ceb5598041 fix(webconsole): ssh randomly exited error (#21409) 2024-10-14 14:51:09 +08:00
wanyaoqi
6087afa546 fix(region): fix default network on get desc (#21395) 2024-10-14 12:35:51 +08:00
wanyaoqi
80870e97ad fix(host-deployer): update host-deployer-base to 1.4.9 (#21402) 2024-10-12 14:14:00 +08:00
wanyaoqi
a1bf4c7b6c fix(host-deployer): do not clean spool dir on save image (#21399) 2024-10-12 10:08:56 +08:00
wanyaoqi
d82c7bc5a5 fix(host): set ssd disk default scheduler none (#21358) 2024-10-12 10:03:17 +08:00
wanyaoqi
a266f4ccc2 fix(host,glance): qemuimg convert optimize, allow write out of order and increase coroutines (#21373) 2024-10-12 10:01:23 +08:00
屈轩
123b51a321 fix(region): storage conf update (#21393) 2024-10-11 18:05:07 +08:00
屈轩
568b781177 fix(region): gcp security group check (#21389) 2024-10-11 17:54:03 +08:00
屈轩
9c894020c9 fix(common): compatible metadata mod find (#21385) 2024-10-11 16:40:03 +08:00
Zexi Li
0c9f0314c7 feat(apigateway): add rpc methods of scheduler for apigateway (#21378) 2024-10-10 19:07:35 +08:00
wanyaoqi
1641c178b9 fix(region): check disk is deleted on delete snapshot (#21367) 2024-10-09 21:48:37 +08:00
1046 changed files with 55756 additions and 11482 deletions

View File

@@ -13,8 +13,7 @@ If no, just write "NONE".
If don't know, write "UNKNOWN", and let the reviewer decide.
If yes, write the release branches name in the below format and submit the related cherry-pick PR:
- release/3.7
- release/3.6
- release/3.11
Take a look at "https://www.cloudpods.org/en/docs/contribute/contrib/" to learn how to submit a cherry-pick PR.
-->

View File

@@ -47,11 +47,6 @@ PKGS := go list ./...
CGO_CFLAGS_ENV = $(shell go env CGO_CFLAGS)
CGO_LDFLAGS_ENV = $(shell go env CGO_LDFLAGS)
ifdef LIBQEMUIO_PATH
X_CGO_CFLAGS := ${CGO_CFLAGS_ENV} -I${LIBQEMUIO_PATH}/src -I${LIBQEMUIO_PATH}/src/include
X_CGO_LDFLAGS := ${CGO_LDFLAGS_ENV} -laio -lqemuio -lpthread -lgnutls -lnettle -L ${LIBQEMUIO_PATH}/src
endif
export GOOS ?= linux
export GO111MODULE:=on
export CGO_CFLAGS = ${X_CGO_CFLAGS}
@@ -63,7 +58,7 @@ ifeq ($(UNAME), Linux)
XARGS_FLAGS = --no-run-if-empty
endif
cmdTargets:=$(filter-out cmd/host-image,$(wildcard cmd/*))
cmdTargets:=$(wildcard cmd/*)
rpmTargets:=$(foreach b,$(patsubst cmd/%,%,$(cmdTargets)),$(if $(shell [ -f "$(CURDIR)/build/$(b)/vars" ] && echo 1),rpm/$(b)))
debTargets:=$(foreach b,$(patsubst cmd/%,%,$(cmdTargets)),$(if $(shell [ -f "$(CURDIR)/build/$(b)/vars" ] && echo 1),deb/$(b)))
@@ -282,12 +277,12 @@ dep:
@echo "$$depDeprecated"
@$(MAKE) mod
RELEASE_BRANCH:=release/3.11
RELEASE_BRANCH:=release/3.11.12
GOPROXY ?= direct
mod:
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go get -d yunion.io/x/cloudmux@$(RELEASE_BRANCH)
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x 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 '/cloudmux$$'))
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go get yunion.io/x/cloudmux@$(RELEASE_BRANCH)
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go get $(patsubst %,%@master,$(shell GO111MODULE=on go mod edit -print | sed -n -e 's|.*\(yunion.io/x/[a-z].*\) v.*|\1|p' | grep -v '/cloudmux$$'))
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go mod tidy
GOPROXY=$(GOPROXY) GONOSUMDB=yunion.io/x go mod vendor -v

View File

@@ -1,7 +1,7 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.1.1
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.1.3
# install playbook and telegraf install pkg
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.4 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.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.3.5
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.15.4-0
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"

View File

@@ -1,8 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.4.0 as file-repo
FROM registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.0 AS file-repo
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
MAINTAINER "Rain Zheng <zhengyu@yunion.com>"
LABEL maintainer="Rain Zheng <zhengyu@yunion.com>"
# openssh-client, for ansible ssh connection
# git, ca-certificates, for fetching ansible roles
@@ -12,15 +12,12 @@ RUN set -x \
&& rm -rf /var/cache/apk/*
# install default playbook and install pkg
Run mkdir -p /opt/yunion/ansible-install-pkg
RUN mkdir -p /opt/yunion/ansible-install-pkg
# file repo base image from https://github.com/yunionio/telegraf/blob/612b918a28a93cf8e354b8d59544753b021b824a/Makefile.yn#L24
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.rpm /opt/yunion/ansible-install-pkg
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.deb /opt/yunion/ansible-install-pkg
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.zip /opt/yunion/ansible-install-pkg
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf-1.19.2-yn~be742cbf-0.x86_64.rpm /opt/yunion/ansible-install-pkg
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf-1.19.2-yn~be742cbf-0.aarch64.rpm /opt/yunion/ansible-install-pkg
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf_1.19.2-yn~be742cbf-0_arm64.deb /opt/yunion/ansible-install-pkg
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf_1.19.2-yn~be742cbf-0_amd64.deb /opt/yunion/ansible-install-pkg
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf-1.19.2-yn~be742cbf_windows_amd64.zip /opt/yunion/ansible-install-pkg
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf-1.19.2-yn~be742cbf_windows_i386.zip /opt/yunion/ansible-install-pkg
Run mkdir -p /opt/yunion/playbook
Run mkdir /opt/yunion/playbook/monitor-agent
Run git clone https://github.com/yunionio/monitor-agent.git /opt/yunion/playbook/monitor-agent --recurse-submodules
RUN mkdir -p /opt/yunion/playbook
RUN mkdir /opt/yunion/playbook/monitor-agent
RUN git clone https://github.com/yunionio/monitor-agent.git /opt/yunion/playbook/monitor-agent --recurse-submodules

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.5.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.7.0
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.4.8
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.4.11
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"

View File

@@ -1,9 +1,6 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
RUN mkdir -p /opt/yunion/bin
ENV TZ UTC
ADD ./_output/bin/host-image /opt/yunion/bin/host-image
ADD ./_output/bin/.host-image.bin /opt/yunion/bin/.host-image.bin
ADD ./_output/bin/bundles/host-image /opt/yunion/bin/bundles/host-image
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/host-image /opt/yunion/bin/host-image

View File

@@ -15,7 +15,7 @@ onecloud-base:
onecloud-base-3-15-4:
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION_3-15-4) -f ./Dockerfile.onecloud-base-3-15-4 .
ANSIBLESERVER_BASE = v1.1.2
ANSIBLESERVER_BASE = v1.1.3
ansibleserver-base:
$(DOCKER_BUILDX)/ansibleserver-base:$(ANSIBLESERVER_BASE) -f ./Dockerfile.ansibleserver-base .
@@ -44,10 +44,10 @@ GLANCE_BASE_VERSION = v0.0.1
glance-base:
$(DOCKER_BUILDX)/glance-base:$(GLANCE_BASE_VERSION) -f ./Dockerfile.glance-base .
FILE_REPO_VERSION = v0.5.2
FILE_REPO_VERSION = v0.5.4
file-repo:
$(DOCKER_BUILDX)/file-repo:$(FILE_REPO_VERSION) -f ./Dockerfile.file-repo .
$(DOCKER_BUILDX)/file-repo:$(FILE_REPO_VERSION) -f ./Dockerfile.file-repo . --no-cache
HOST_IMAGE_VERSION ?= v1.0.2
HOST_IMAGE_NAME = $(REGISTRY)/host-image:$(HOST_IMAGE_VERSION)

View File

@@ -7,11 +7,11 @@ COPY . /root/go/src/yunion.io/x/onecloud
WORKDIR /root/go/src/yunion.io/x/onecloud
RUN make cmd/host
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.4.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.7.0
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
ENV TZ Asia/Shanghai
ENV TZ UTC
RUN mkdir -p /opt/yunion/bin
COPY --from=build /root/go/src/yunion.io/x/onecloud/_output/bin/host /opt/yunion/bin/host

View File

@@ -68,6 +68,7 @@
border-bottom: 1px solid #d7d7d7;
}
</style>
{{$match_tags_str := .match_tags_str}}
<body>
<h3 class="title">报警提醒</h3>
<table border="0" cellspacing="0" cellpadding="0" class="table">
@@ -108,7 +109,11 @@
<td>名称</td>
<td>IP</td>
<td>平台</td>
<td>指标</td>
<td>触发值</td>
{{if gt (len $match_tags_str) 1}}
<td>标签</td>
{{end}}
</tr>
</thead>
<tbody>
@@ -124,7 +129,11 @@
<td>
{{ index .tags "brand" }}
</td>
<td>{{$Matche.value_str}}</td>
<td>{{ $Matche.metric }}</td>
<td>{{ $Matche.value_str }}</td>
{{if gt (len $match_tags_str) 1}}
<td>{{ index $match_tags_str $i }}</td>
{{end}}
</tr>
{{end}}
</tbody>

View File

@@ -68,6 +68,7 @@
border-bottom: 1px solid #d7d7d7;
}
</style>
{{$match_tags_str := .match_tags_str}}
<body>
<h3 class="title">Alert</h3>
<table border="0" cellspacing="0" cellpadding="0" class="table">
@@ -108,7 +109,11 @@
<td>Name</td>
<td>IP</td>
<td>Brand</td>
<td>Metric</td>
<td>Trigger value</td>
{{if gt (len $match_tags_str) 1}}
<td>Tags</td>
{{end}}
</tr>
</thead>
<tbody>
@@ -124,7 +129,11 @@
<td>
{{ index .tags "brand" }}
</td>
<td>{{$Matche.value_str}}</td>
<td>{{ $Matche.metric }}</td>
<td>{{ $Matche.value_str }}</td>
{{if gt (len $match_tags_str) 1}}
<td>{{ index $match_tags_str $i }}</td>
{{end}}
</tr>
{{end}}
</tbody>

View File

@@ -70,7 +70,7 @@ type BaseOptions struct {
OsRegionName string `default:"$OS_REGION_NAME" help:"Defaults to env[OS_REGION_NAME]"`
OsZoneName string `default:"$OS_ZONE_NAME" help:"Defaults to env[OS_ZONE_NAME]"`
OsEndpointType string `default:"$OS_ENDPOINT_TYPE|internalURL" help:"Defaults to env[OS_ENDPOINT_TYPE] or internalURL" choices:"publicURL|internalURL|adminURL"`
OsEndpointType string `default:"$OS_ENDPOINT_TYPE|internalURL" help:"Defaults to env[OS_ENDPOINT_TYPE] or internalURL" choices:"publicURL|internalURL|adminURL|apigateway"`
// ApiVersion string `default:"$API_VERSION" help:"override default modules service api version"`
OutputFormat string `default:"$CLIMC_OUTPUT_FORMAT|table" choices:"table|kv|json|yaml|flatten-table|flatten-kv" help:"output format"`
@@ -335,7 +335,6 @@ func ClimcMain() {
}
if parser.IsHelpSet() {
fmt.Print(parser.HelpString())
return
}

View File

@@ -41,48 +41,12 @@ import (
func init() {
cmd := shell.NewResourceCmd(&modules.Disks)
cmd.List(&compute_options.DiskListOptions{})
cmd.Perform("set-class-metadata", &options.ResourceMetadataOptions{})
cmd.Perform("rebuild", &options.ResourceIdOptions{})
cmd.Perform("migrate", &compute_options.DiskMigrateOptions{})
type DiskListOptions struct {
options.BaseListOptions
Unused *bool `help:"Show unused disks"`
Share *bool `help:"Show Share storage disks"`
Local *bool `help:"Show Local storage disks"`
Guest string `help:"Guest ID or name"`
GuestStatus string `help:"Guest Status"`
OrderByServer string `help:"Order By Server"`
Storage string `help:"Storage ID or name"`
Type string `help:"Disk type" choices:"sys|data|swap|volume"`
CloudType string `help:"Public cloud or private cloud" choices:"Public|Private"`
OrderByGuestCount string `help:"Order By Guest Count"`
BillingType string `help:"billing type" choices:"postpaid|prepaid"`
SnapshotpolicyId string `help:"snapshotpolicy id"`
}
R(&DiskListOptions{}, "disk-list", "List virtual disks", func(s *mcclient.ClientSession, opts *DiskListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
if len(opts.CloudType) > 0 {
if opts.CloudType == "Public" {
params.Add(jsonutils.JSONTrue, "public_cloud")
} else if opts.CloudType == "Private" {
params.Add(jsonutils.JSONTrue, "private_cloud")
}
}
result, err := modules.Disks.List(s, params)
if err != nil {
return err
}
printList(result, modules.Disks.GetColumns(s))
return nil
})
cmd.Perform("change-billing-type", new(compute_options.DiskChangeBillingTypeOptions))
cmd.Perform("change-storage-type", &compute_options.DiskChangeStorageTypeOptions{})
type DiskDetailOptions struct {
ID string `help:"ID or Name of disk"`
@@ -176,6 +140,7 @@ func init() {
AutoSnapshot string `help:"enable/disable auto snapshot of disk" choices:"enable|disable"`
DiskType string `help:"Disk type" choices:"data|volume|sys"`
IsSsd *bool `help:"mark disk as ssd" negative:"no-is-ssd"`
AutoReset *bool `help:"Enable auto reset disk after geust shutdown"`
}
R(&DiskUpdateOptions{}, "disk-update", "Update property of a virtual disk", func(s *mcclient.ClientSession, args *DiskUpdateOptions) error {
params := jsonutils.NewDict()
@@ -209,6 +174,10 @@ func init() {
params.Add(jsonutils.JSONFalse, "is_ssd")
}
}
if args.AutoReset != nil {
params.Add(jsonutils.NewBool(*args.AutoReset), "auto_reset")
}
if params.Size() == 0 {
return InvalidUpdateError()
}

View File

@@ -37,7 +37,6 @@ import (
func init() {
cmd := shell.NewResourceCmd(&modules.Hosts)
cmd.List(&compute.HostListOptions{})
cmd.Show(&options.BaseShowOptions{})
cmd.GetMetadata(&options.BaseIdOptions{})
cmd.GetProperty(&compute.HostStatusStatisticsOptions{})
@@ -55,6 +54,7 @@ func init() {
cmd.Perform("class-metadata", &options.ResourceMetadataOptions{})
cmd.Perform("set-class-metadata", &options.ResourceMetadataOptions{})
cmd.PerformClass("validate-ipmi", &compute.HostValidateIPMI{})
cmd.Perform("set-commit-bound", &compute.HostSetCommitBoundOptions{})
cmd.BatchPerform("enable", &options.BaseIdsOptions{})
cmd.BatchPerform("disable", &options.BaseIdsOptions{})
@@ -70,6 +70,10 @@ func init() {
cmd.Get("ipmi", &options.BaseIdOptions{})
cmd.Get("vnc", &options.BaseIdOptions{})
cmd.Get("app-options", &options.BaseIdOptions{})
cmd.GetWithCustomShow("worker-stats", func(data jsonutils.JSONObject) {
stats, _ := data.GetArray("workers")
printList(&printutils.ListResult{Data: stats}, nil)
}, &options.BaseIdOptions{})
cmd.Get("tap-config", &options.BaseIdOptions{})
cmd.GetWithCustomShow("nics", func(data jsonutils.JSONObject) {
results := printutils.ListResult{}
@@ -89,6 +93,34 @@ func init() {
}
}, &options.BaseIdOptions{})
R(&compute.HostShowOptions{}, "host-show", "Show details of a host", func(s *mcclient.ClientSession, args *compute.HostShowOptions) error {
params, err := args.Params()
if err != nil {
return err
}
result, err := modules.Hosts.Get(s, args.ID, params)
if err != nil {
return err
}
resultDict := result.(*jsonutils.JSONDict)
if !args.ShowAll {
if !args.ShowMetadata {
print("ShowMetadata\n")
resultDict.Remove("metadata")
}
if !args.ShowNicInfo {
print("ShowMetadata\n")
resultDict.Remove("nic_info")
}
if !args.ShowSysInfo {
print("ShowSysInfo\n")
resultDict.Remove("sys_info")
}
}
printObject(resultDict)
return nil
})
R(&options.BaseIdOptions{}, "host-logininfo", "Get SSH login information of a host", func(s *mcclient.ClientSession, args *options.BaseIdOptions) error {
i, e := modules.Hosts.PerformAction(s, args.ID, "login-info", nil)
if e != nil {
@@ -174,14 +206,12 @@ func init() {
})
type HostUpdateOptions struct {
ID string `help:"ID or Name of Host"`
Name string `help:"New name of the host"`
Desc string `help:"New Description of the host"`
CpuCommitBound float64 `help:"CPU overcommit upper bound at this host"`
MemoryCommitBound float64 `help:"Memory overcommit upper bound at this host"`
MemoryReserved string `help:"Memory reserved"`
CpuReserved int64 `help:"CPU reserved"`
HostType string `help:"Change host type, CAUTION!!!!" choices:"hypervisor|kubelet|esxi|baremetal"`
ID string `help:"ID or Name of Host"`
Name string `help:"New name of the host"`
Desc string `help:"New Description of the host"`
MemoryReserved string `help:"Memory reserved"`
CpuReserved int64 `help:"CPU reserved"`
HostType string `help:"Change host type, CAUTION!!!!" choices:"hypervisor|kubelet|esxi|baremetal"`
// AccessIp string `help:"Change access ip, CAUTION!!!!"`
AccessMac string `help:"Change baremetal access MAC, CAUTION!!!!"`
Uuid string `help:"Change baremetal UUID, CAUTION!!!!"`
@@ -203,12 +233,6 @@ func init() {
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if args.CpuCommitBound > 0.0 {
params.Add(jsonutils.NewFloat64(args.CpuCommitBound), "cpu_cmtbound")
}
if args.MemoryCommitBound > 0.0 {
params.Add(jsonutils.NewFloat64(args.MemoryCommitBound), "mem_cmtbound")
}
if len(args.MemoryReserved) > 0 {
params.Add(jsonutils.NewString(args.MemoryReserved), "mem_reserved")
}

View File

@@ -59,6 +59,17 @@ func init() {
printBatchResults(ret, modules.InstanceSnapshots.GetColumns(s))
return nil
})
type InstanceSnapshotPurgeOptions struct {
ID string `help:"Delete snapshot id"`
}
R(&InstanceSnapshotPurgeOptions{}, "instance-snapshot-purge", "Purge snapshots", func(s *mcclient.ClientSession, args *InstanceSnapshotPurgeOptions) error {
result, err := modules.InstanceSnapshots.PerformAction(s, args.ID, "purge", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type InstanceSnapshotShowOptions struct {
ID string `help:"ID or Name of snapshot"`

View File

@@ -15,90 +15,16 @@
package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/cmd/climc/shell"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
type DeviceListOptions struct {
options.BaseListOptions
Unused bool `help:"Only show unused devices"`
Gpu bool `help:"Only show gpu devices"`
Host string `help:"Host ID or Name"`
Region string `help:"Cloudregion ID or Name"`
Zone string `help:"Zone ID or Name"`
Server string `help:"Server ID or Name"`
}
R(&DeviceListOptions{}, "isolated-device-list", "List isolated devices like GPU", func(s *mcclient.ClientSession, args *DeviceListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
}
if len(args.Host) > 0 {
params.Add(jsonutils.NewString(args.Host), "host")
}
if args.Unused {
params.Add(jsonutils.JSONTrue, "unused")
}
if args.Gpu {
params.Add(jsonutils.JSONTrue, "gpu")
}
if len(args.Region) > 0 {
params.Add(jsonutils.NewString(args.Region), "region")
}
if args.Zone != "" {
params.Add(jsonutils.NewString(args.Zone), "zone")
}
if args.Server != "" {
params.Add(jsonutils.NewString(args.Server), "guest_id")
}
result, err := modules.IsolatedDevices.List(s, params)
if err != nil {
return err
}
printList(result, modules.IsolatedDevices.GetColumns(s))
return nil
})
type DeviceShowOptions struct {
ID string `help:"ID of the isolated device"`
}
R(&DeviceShowOptions{}, "isolated-device-show", "Show isolated device details", func(s *mcclient.ClientSession, args *DeviceShowOptions) error {
result, err := modules.IsolatedDevices.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type DeviceDeleteOptions struct {
IDS []string `help:"IDs of the isolated device"`
}
R(&DeviceDeleteOptions{}, "isolated-device-delete", "Delete a isolated device", func(s *mcclient.ClientSession, args *DeviceDeleteOptions) error {
result := modules.IsolatedDevices.BatchDelete(s, args.IDS, nil)
printBatchResults(result, modules.IsolatedDevices.GetColumns(s))
return nil
})
type DeviceUpdateOptions struct {
ID []string `help:"ID of the isolated device" json:"-"`
ReservedCpu *int `help:"reserved cpu for isolated device"`
ReservedMem *int `help:"reserved mem for isolated device"`
ReservedStorage *int `help:"reserved storage for isolated device"`
DevType string `help:"Device type" choices:"GPU-HPC|GPU-VGA"`
}
R(&DeviceUpdateOptions{}, "isolated-device-update", "Update a isolated device", func(s *mcclient.ClientSession, args *DeviceUpdateOptions) error {
res := modules.IsolatedDevices.BatchUpdate(s, args.ID, jsonutils.Marshal(args))
printBatchResults(res, modules.IsolatedDevices.GetColumns(s))
return nil
})
cmd := shell.NewResourceCmd(&modules.IsolatedDevices)
cmd.List(&compute.DeviceListOptions{})
cmd.Update(&compute.DeviceUpdateOptions{})
cmd.Show(&compute.DeviceShowOptions{})
cmd.BatchDelete(&compute.DeviceDeleteOptions{})
cmd.BatchPerform("purge", &compute.DevicePurgeOptions{})
}

View File

@@ -77,7 +77,7 @@ func init() {
type ServerDiskUpdateOptions struct {
SERVER string `help:"ID or Name of server"`
DISK string `help:"ID or Name of Disk"`
Driver string `help:"Driver of vDisk" choices:"virtio|ide|scsi|pvscsi"`
Driver string `help:"Driver of vDisk" choices:"virtio|ide|sata|scsi|pvscsi"`
Cache string `help:"Cache mode of vDisk" choices:"writethrough|none|writeback|directsync"`
Aio string `help:"Asynchronous IO mode of vDisk" choices:"native|threads"`
Index int64 `help:"Index of vDisk" default:"-1"`

View File

@@ -155,8 +155,9 @@ func init() {
})
type ServerAttachNetworkOptions struct {
SERVER string `help:"ID or Name of server"`
NETDESC []string `help:"Network description"`
SERVER string `help:"ID or Name of server"`
DisableSyncConfig bool `help:"Disable sync config"`
NETDESC []string `help:"Network description"`
}
R(&ServerAttachNetworkOptions{}, "server-attach-network", "Attach a server to a virtual network", func(s *mcclient.ClientSession, args *ServerAttachNetworkOptions) error {
input := compute.AttachNetworkInput{}
@@ -167,6 +168,7 @@ func init() {
}
input.Nets = append(input.Nets, conf)
}
input.DisableSyncConfig = &args.DisableSyncConfig
params := jsonutils.Marshal(input)
srv, err := modules.Servers.PerformAction(s, args.SERVER, "attachnetwork", params)
if err != nil {

View File

@@ -51,6 +51,7 @@ func init() {
cmd.BatchPut(new(options.ServerUpdateOptions))
cmd.GetMetadata(new(options.ServerIdOptions))
cmd.Perform("clone", new(options.ServerCloneOptions))
cmd.Perform("change-billing-type", new(options.ServerChangeBillingTypeOptions))
cmd.BatchPerform("start", new(options.ServerStartOptions))
cmd.BatchPerform("syncstatus", new(options.ServerIdsOptions))
cmd.BatchPerform("sync", new(options.ServerIdsOptions))
@@ -127,7 +128,8 @@ func init() {
cmd.BatchPerform("start-rescue", &options.ServerStartOptions{})
cmd.BatchPerform("stop-rescue", &options.ServerStartOptions{})
cmd.BatchPerform("sync-os-info", &options.ServerIdsOptions{})
cmd.BatchPerform("set-root-disk-matcher", &options.ServerSetRootDiskMatcher{})
cmd.Perform("disable-auto-merge-snapshot", &options.ServerDisableAutoMergeSnapshot{})
cmd.Get("vnc", new(options.ServerVncOptions))
cmd.Get("desc", new(options.ServerIdOptions))
cmd.Get("status", new(options.ServerIdOptions))
@@ -141,6 +143,8 @@ func init() {
cmd.Get("sshport", new(options.ServerIdOptions))
cmd.Get("qemu-info", new(options.ServerIdOptions))
cmd.Get("hardware-info", new(options.ServerIdOptions))
cmd.Get("screen-dump-show", new(options.ServerScreenDumpOptions))
cmd.BatchPerform("screen-dump", new(options.ServerIdsOptions))
cmd.GetProperty(&options.ServerStatusStatisticsOptions{})
cmd.GetProperty(&options.ServerProjectStatisticsOptions{})

View File

@@ -0,0 +1,23 @@
package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/cmd/climc/shell"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
type ServerScreenDumpListOptions struct {
options.BaseListOptions
Server string `help:"Id or name of server"`
}
func (o *ServerScreenDumpListOptions) Params() (jsonutils.JSONObject, error) {
return jsonutils.Marshal(o), nil
}
func init() {
cmd := shell.NewResourceCmd(&modules.ServerScreenDumps)
cmd.List(new(ServerScreenDumpListOptions))
}

View File

@@ -28,5 +28,7 @@ func init() {
cmd.Create(&compute.SnapshotPolicyCreateOptions{})
cmd.Perform("bind-disks", &compute.SnapshotPolicyDisksOptions{})
cmd.Perform("unbind-disks", &compute.SnapshotPolicyDisksOptions{})
cmd.Perform("bind-resources", &compute.SnapshotPolicyResourcesOptions{})
cmd.Perform("unbind-resources", &compute.SnapshotPolicyResourcesOptions{})
cmd.Perform("syncstatus", &options.BaseIdOptions{})
}

View File

@@ -32,6 +32,8 @@ func init() {
Share *bool `help:"Show shared snapshots"`
DiskType string `help:"Filter by disk type" choices:"sys|data"`
Server string `help:"Filter by server" json:"server_id"`
Unused bool
StorageId string `help:"Filter by storage id"`
OrderByGuest string
OrderByDiskName string

View File

@@ -47,6 +47,7 @@ func init() {
cmd.Perform("private", &options.BaseIdOptions{})
cmd.Get("hardware-info", &options.BaseIdOptions{})
cmd.Perform("set-hardware-info", &compute.StorageSetHardwareInfoOptions{})
cmd.Perform("set-commit-bound", &compute.StorageSetCommitBoundOptions{})
type StorageCephRunOptions struct {
ID string `help:"ID or name of ceph storage"`
@@ -60,9 +61,10 @@ func init() {
info := struct {
StorageType string `json:"storage_type"`
StorageConf struct {
Key string `json:"key"`
MonHost string `json:"mon_host"`
Pool string `json:"pool"`
Key string `json:"key"`
MonHost string `json:"mon_host"`
Pool string `json:"pool"`
EnableMessengerV2 bool `json:"enable_messenger_v2"`
}
}{}
err = result.Unmarshal(&info)
@@ -76,6 +78,7 @@ func init() {
info.StorageConf.MonHost,
info.StorageConf.Key,
info.StorageConf.Pool,
info.StorageConf.EnableMessengerV2,
)
if err != nil {
return errors.Wrap(err, "cephutils.NewClient")

View File

@@ -33,7 +33,7 @@ import (
type GeneralUsageOptions struct {
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack|google|ctyun"`
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun"`
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|DStack|Google|Ctyun"`
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun"`
Project string `help:"show usage of specified project"`
ProjectDomain string `help:"show usage of specified domain"`

View File

@@ -211,7 +211,13 @@ func init() {
}
key := strings.TrimSpace(c[:pos])
value := strings.TrimSpace(c[pos+1:])
config.Add(jsonutils.NewString(value), "config", "default", key)
var v jsonutils.JSONObject
if value == "true" || value == "false" {
v = jsonutils.NewBool(value == "true")
} else {
v = jsonutils.NewString(value)
}
config.Add(v, "config", "default", key)
}
nconf, err := modules.ServicesV3.PerformAction(s, args.SERVICE, "config", config)
if err != nil {

View File

@@ -47,7 +47,7 @@ type BaseActionListOptions struct {
type ActionListOptions struct {
BaseActionListOptions
Service []string `help:"service name`
Service []string `help:"service name"`
Id string `help:"" metavar:"OBJ_ID"`
Type []string `help:"Type of relevant object" metavar:"OBJ_TYPE"`
}

View File

@@ -19,6 +19,7 @@ import (
"io"
"io/ioutil"
"os"
"strings"
"syscall"
"yunion.io/x/jsonutils"
@@ -68,6 +69,10 @@ func init() {
return fmt.Errorf("no service address provide")
}
if opts.Service == "identity" {
svcUrl = strings.TrimSuffix(svcUrl, "/v3")
}
params := jsonutils.NewDict()
params.Add(jsonutils.NewInt(int64(opts.Second)), "seconds")
if pType == "heap" && opts.Gc {

View File

@@ -36,9 +36,7 @@ func initAlertNotification() {
return err
}
var result *printutils.ListResult
if len(args.Alert) > 0 {
result, err = monitor.Alertnotification.ListDescendent(s, args.Alert, params)
} else if len(args.Notification) > 0 {
if len(args.Notification) > 0 {
result, err = monitor.Alertnotification.ListDescendent2(s, args.Notification, params)
} else {
result, err = monitor.Alertnotification.List(s, params)

View File

@@ -23,5 +23,6 @@ func init() {
cmd := NewResourceCmd(modules.AlertRecordManager)
cmd.List(new(options.AlertRecordListOptions))
cmd.Show(new(options.AlertRecordShowOptions))
cmd.Get("", new(options.AlertRecordTotalOptions))
cmd.GetProperty(new(options.AlertRecordTotalOptions))
cmd.GetProperty(new(options.AlertRecordHistoryAlertOptions))
}

View File

@@ -18,7 +18,7 @@ import (
"fmt"
"strings"
"gopkg.in/ldap.v3"
"github.com/go-ldap/ldap/v3"
"yunion.io/x/pkg/util/shellutils"

27
go.mod
View File

@@ -5,9 +5,8 @@ go 1.21
require (
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
github.com/360EntSecGroup-Skylar/excelize v1.4.0
github.com/LeeEirc/terminalparser v0.0.0-20220328021224-de16b7643ea4
github.com/LeeEirc/terminalparser v0.0.0-20240205084113-fbf78c8480f2
github.com/aliyun/alibaba-cloud-sdk-go v1.61.684
github.com/anacrolix/sync v0.0.0-20180808010631-44578de4e778
github.com/anacrolix/torrent v0.0.0-20181129073333-cc531b8c4a80
github.com/benbjohnson/clock v1.0.0
github.com/bitly/go-simplejson v0.5.0
@@ -20,6 +19,7 @@ require (
github.com/fsnotify/fsnotify v1.4.9
github.com/ghodss/yaml v1.0.0
github.com/gin-gonic/gin v1.7.7
github.com/go-ldap/ldap/v3 v3.1.5
github.com/go-yaml/yaml v2.1.0+incompatible
github.com/golang-plus/uuid v1.0.0
github.com/golang/mock v1.4.4
@@ -30,7 +30,6 @@ require (
github.com/gorilla/websocket v1.4.1
github.com/gosuri/uitable v0.0.0-20160404203958-36ee7e946282
github.com/hako/durafmt v0.0.0-20180520121703-7b7ae1e72ead
github.com/hugozhu/godingtalk v1.0.6
github.com/influxdata/influxql v1.1.0
github.com/influxdata/promql/v2 v2.12.0
github.com/jaypipes/ghw v0.11.0
@@ -45,6 +44,7 @@ require (
github.com/mholt/caddy v0.10.11
github.com/miekg/dns v1.1.25
github.com/minio/minio-go v6.0.14+incompatible
github.com/petermattis/goid v0.0.0-20250508124226-395b08cebbdb
github.com/pierrec/lz4/v4 v4.1.15
github.com/pkg/errors v0.9.1
github.com/pkg/sftp v1.13.6
@@ -66,7 +66,8 @@ require (
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74
github.com/vmihailenco/msgpack v4.0.4+incompatible
github.com/xuri/excelize/v2 v2.7.1
github.com/zexi/influxql-to-metricsql v0.0.9
github.com/zeebo/xxh3 v1.0.2
github.com/zexi/influxql-to-metricsql v0.1.1
go.etcd.io/etcd/api/v3 v3.5.0
go.etcd.io/etcd/client/v3 v3.5.0
golang.org/x/crypto v0.19.0
@@ -80,7 +81,6 @@ require (
google.golang.org/grpc v1.62.0
google.golang.org/protobuf v1.32.0
gopkg.in/fatih/set.v0 v0.2.1
gopkg.in/ldap.v3 v3.0.3
gopkg.in/mail.v2 v2.3.1
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.19.3
@@ -88,14 +88,14 @@ require (
k8s.io/client-go v0.19.3
k8s.io/cluster-bootstrap v0.19.3
moul.io/http2curl/v2 v2.3.0
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240926044403-b549642e9ab3
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32
yunion.io/x/jsonutils v1.0.1-0.20240203102553-4096f103b401
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251015023252-07f4567eae95
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0
yunion.io/x/jsonutils v1.0.1-0.20250507052344-1abcf4f443b1
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91
yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900
yunion.io/x/pkg v1.10.1-0.20240905110705-77c46e716318
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v1.1.3-0.20240926163039-d41512b264e1
yunion.io/x/pkg v1.10.4-0.20250820035218-6008459eb4f0
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1
yunion.io/x/sqlchemy v1.1.3-0.20250925091009-4ca0766fc8f0
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c
)
@@ -130,6 +130,7 @@ require (
github.com/anacrolix/log v0.0.0-20180808012509-286fcf906b48 // indirect
github.com/anacrolix/missinggo v0.0.0-20181129073415-3237bf955fed // indirect
github.com/anacrolix/mmsg v0.0.0-20180808012353-5adb2c1127c0 // indirect
github.com/anacrolix/sync v0.0.0-20180808010631-44578de4e778 // indirect
github.com/anacrolix/utp v0.0.0-20180219060659-9e0e1d1d0572 // indirect
github.com/aokoli/goutils v1.0.1 // indirect
github.com/apache/thrift v0.13.0 // indirect
@@ -163,6 +164,7 @@ require (
github.com/frankban/quicktest v1.14.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
github.com/go-logfmt/logfmt v0.5.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
@@ -196,7 +198,9 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/ks3sdklib/aws-sdk-go v1.8.1 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/lestrrat-go/iter v0.0.0-20200422075355-fc1769541911 // indirect
github.com/lestrrat-go/pdebug v0.0.0-20200204225717-4d6bd78da58d // indirect
@@ -276,7 +280,6 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect

57
go.sum
View File

@@ -86,8 +86,8 @@ github.com/DataDog/dd-trace-go v0.6.1 h1:nsZ2lohbSw1CKtfNRu3wPh1jFirv6XSz8vqNpuI
github.com/DataDog/dd-trace-go v0.6.1/go.mod h1:SmQTTcC37XMyEm75HV0AWiZIYxDiaNhRi49zorIpW+o=
github.com/DataDog/zstd v1.3.4 h1:LAGHkXuvC6yky+C2CUG2tD7w8QlrUwpue8XwIh0X4AY=
github.com/DataDog/zstd v1.3.4/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/LeeEirc/terminalparser v0.0.0-20220328021224-de16b7643ea4 h1:Gk7m4Nu2jqVqJAJqNlTYqkiq96WkANAtB4fVi+t7Xv8=
github.com/LeeEirc/terminalparser v0.0.0-20220328021224-de16b7643ea4/go.mod h1:tiLv6VBLH4Z3KdBSe2qIKRwQDGCVQ9/F5fOKpQGvyoA=
github.com/LeeEirc/terminalparser v0.0.0-20240205084113-fbf78c8480f2 h1:XGB3B0651J1uKOE1KJa1gsrV/DO1kthhk2NTDUHATgs=
github.com/LeeEirc/terminalparser v0.0.0-20240205084113-fbf78c8480f2/go.mod h1:tiLv6VBLH4Z3KdBSe2qIKRwQDGCVQ9/F5fOKpQGvyoA=
github.com/Microsoft/azure-vhd-utils v0.0.0-20181115010904-44cbada2ece3 h1:gImoAO1xAcC1oDlYmD/X7dggsodGf2DFJOVE5m0ssms=
github.com/Microsoft/azure-vhd-utils v0.0.0-20181115010904-44cbada2ece3/go.mod h1:u0H9gMieFLxkUy8RS0X8VbFWyPs2815qQAaitRbj6x0=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
@@ -281,12 +281,17 @@ github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 h1:Ujru
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493 h1:OTanQnFt0bi5iLFSdbEVA/idR6Q2WhCm+deb7ir2CcM=
github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 h1:BP4M0CvQ4S3TGls2FvczZtj5Re/2ZzkV9VwqPHH/3Bo=
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
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-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-ldap/ldap/v3 v3.1.5 h1:5o1ik2It7MJoXwoS7JXWUebf18L7E1VWBBgYV/iVsN0=
github.com/go-ldap/ldap/v3 v3.1.5/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4=
@@ -390,7 +395,6 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -456,15 +460,12 @@ github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0
github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=
github.com/huaweicloud/huaweicloud-sdk-go v1.0.26 h1:aWTl4Ng9lZUW1DupYyqYiqkTwuTKMmqUZBKLmX0iWxo=
github.com/huaweicloud/huaweicloud-sdk-go v1.0.26/go.mod h1:YHXxw/bm7AohI4jTY8Z43JYw+DPCDLqjxoLTqmcyja4=
github.com/hugozhu/godingtalk v1.0.6 h1:K280OQGbYVS/UQuVWJz5cHhv/Wvfj1FHNo8lbbLGsNQ=
github.com/hugozhu/godingtalk v1.0.6/go.mod h1:Je6PSjUH7IKCPpFq5ti2I9ak1szzSNgCIMlP0s+8pbQ=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/influxdata/influxql v1.1.0 h1:sPsaumLFRPMwR5QtD3Up54HXpNND8Eu7G1vQFmi3quQ=
github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo=
github.com/ipandtcp/godingtalk v0.0.0-20180410032244-ca3d6ac197fb/go.mod h1:3umLciE1jBnh2LgrL15R2zbEe+HVPRZXnlSjjb/dYiw=
github.com/jaypipes/ghw v0.11.0 h1:i0pKvAM7eZk0KvLm9vzpcpDKTRnfR6AQ5pFkPVnYJXU=
github.com/jaypipes/ghw v0.11.0/go.mod h1:jeJGbkRB2lL3/gxYzNYzEDETV1ZJ56OKr+CSeSEym+g=
github.com/jdcloud-api/jdcloud-sdk-go v1.55.0 h1:mzVj8r6fluEwjn8ogqtGfYW2qSIVUaEq0JAsvjCav3A=
@@ -498,6 +499,8 @@ github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALr
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/koding/websocketproxy v0.0.0-20181220232114-7ed82d81a28c h1:N7A4JCA2G+j5fuFxCsJqjFU/sZe0mj8H0sSoSwbaikw=
github.com/koding/websocketproxy v0.0.0-20181220232114-7ed82d81a28c/go.mod h1:Nn5wlyECw3iJrzi0AhIWg+AJUb4PlRQVW4/3XHH1LZA=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -514,6 +517,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/ks3sdklib/aws-sdk-go v1.8.1 h1:/3mYWujGfr4K/+mAdESbi9u3T4VDuHYMYFk1/OL0JWE=
github.com/ks3sdklib/aws-sdk-go v1.8.1/go.mod h1:jGcsV0dJgMmStAyqjkKVUu6F167pAXYZAS3LqoZMmtM=
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/lestrrat-go/iter v0.0.0-20200422075355-fc1769541911 h1:FvnrqecqX4zT0wOIbYK1gNgTm0677INEWiFY8UEYggY=
@@ -618,6 +623,8 @@ github.com/openzipkin/zipkin-go-opentracing v0.3.4/go.mod h1:js2AbwmHW0YD9DwIw2J
github.com/oracle/oci-go-sdk v24.3.0+incompatible h1:x4mcfb4agelf1O4/1/auGlZ1lr97jXRSSN5MxTgG/zU=
github.com/oracle/oci-go-sdk v24.3.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/petermattis/goid v0.0.0-20250508124226-395b08cebbdb h1:3PrKuO92dUTMrQ9dx0YNejC6U/Si6jqKmyQ9vWjwqR4=
github.com/petermattis/goid v0.0.0-20250508124226-395b08cebbdb/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
@@ -792,8 +799,12 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zexi/influxql-to-metricsql v0.0.9 h1:IVT4w4OvYvUJvj5c1TvH0G/ueM4ZZsfHGMoXtzC5rQE=
github.com/zexi/influxql-to-metricsql v0.0.9/go.mod h1:JlC5FY+6De9ZPxG47G5DOgva8P9X1VaKS4ExzCmhSCc=
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
github.com/zexi/influxql-to-metricsql v0.1.1 h1:dXnVzlxVLuo88zGkDca7erEnmvprGWjzsBcs8qIoQGQ=
github.com/zexi/influxql-to-metricsql v0.1.1/go.mod h1:JlC5FY+6De9ZPxG47G5DOgva8P9X1VaKS4ExzCmhSCc=
github.com/zexi/promql/v2 v2.12.1 h1:crHKpULdLLsBZ9b78Rg6qQkugzlk6BHeCj93tw/F5RU=
github.com/zexi/promql/v2 v2.12.1/go.mod h1:2UtzWZGmth95n2qdIZWpJ5yQ0cE5hEvz0dGsajI1Sqg=
go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw=
@@ -1108,7 +1119,6 @@ google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
@@ -1127,7 +1137,6 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.4/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
@@ -1204,8 +1213,6 @@ google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHh
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -1220,8 +1227,6 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ldap.v3 v3.0.3 h1:YKRHW/2sIl05JsCtx/5ZuUueFuJyoj/6+DGXe3wp6ro=
gopkg.in/ldap.v3 v3.0.3/go.mod h1:oxD7NyBuxchC+SgJDE1Q5Od05eGt29SDQVBmV+HYbzw=
gopkg.in/mail.v2 v2.3.1 h1:WYFn/oANrAGP2C0dcV6/pbkPzv8yGzqTjPmTeO7qoXk=
gopkg.in/mail.v2 v2.3.1/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
@@ -1274,13 +1279,13 @@ 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/cloudmux v0.3.10-0-alpha.1.0.20240926044403-b549642e9ab3 h1:Ee7IeQHhfzA6wuutvWkidNpp65dWjlLXJahapW3L0tA=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240926044403-b549642e9ab3/go.mod h1:rj/pb3DitJlQaQD8UW1oxx/KD+PzDZqoywzqRJaFE9A=
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 h1:v7POYkQwo1XzOxBoIoRVr/k0V9Y5JyjpshlIFa9raug=
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251015023252-07f4567eae95 h1:RcTzopo22fQvKnJSJSBUvlP2jEqoVVJD9EGW3IeTJ3s=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251015023252-07f4567eae95/go.mod h1:S9o/TRZsnYWGaGe7o3PpeOv6CgMY8ZJwITYsEnGfOgQ=
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0 h1:msG4SiDSVU7CrXH06WuHlNEZXIooTcmNbfrIGHuIHBU=
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v1.0.1-0.20240203102553-4096f103b401 h1:4l6ELFSQ0MBVInscZ8/yOtSWF0cwH5BT1ATN6dCtAqc=
yunion.io/x/jsonutils v1.0.1-0.20240203102553-4096f103b401/go.mod h1:VK4Z93dgiKgAijcSqbMKmGaBMJuHulR16Hz4K015ZPo=
yunion.io/x/jsonutils v1.0.1-0.20250507052344-1abcf4f443b1 h1:/+THlvf/MvgCW+7KeCDCr33e81KSRa5JmdZ1IIyLOXQ=
yunion.io/x/jsonutils v1.0.1-0.20250507052344-1abcf4f443b1/go.mod h1:VK4Z93dgiKgAijcSqbMKmGaBMJuHulR16Hz4K015ZPo=
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 v1.0.1-0.20240305175729-7cf2d6cd5a91 h1:inY5o3LDa/zgsIZuPN0HmpzKIsu/lLgsBmMttuDPGj4=
@@ -1289,11 +1294,11 @@ yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900 h1:Hu/4ERvoWaN6aiFs4h4/yvVB
yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900/go.mod h1:0vLkNEhlmA64HViPBAnSTUMrx5QP1CLsxXmxDKQ80tc=
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 v1.10.1-0.20240905110705-77c46e716318 h1:Fm7I8ypXHxeObY4u/VUGz78NsambemzTZ9fECyGKNi8=
yunion.io/x/pkg v1.10.1-0.20240905110705-77c46e716318/go.mod h1:0Bwxqd9MA3ACi119/l02FprY/o9gHahmYC2bsSbnVpM=
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 v1.1.3-0.20240926163039-d41512b264e1 h1:HWPqY1I5JSmM6Sks6FyK9hnq/MjL7FDghM6M8DXHob0=
yunion.io/x/sqlchemy v1.1.3-0.20240926163039-d41512b264e1/go.mod h1:vCIZpqhZ5Jzaq3tFyrti/vv8BijQKtkzSgNT/uH4H5A=
yunion.io/x/pkg v1.10.4-0.20250820035218-6008459eb4f0 h1:/vHcYqzQInxqR1jjS+e7A0owRXj+/rvrIgES6uadUqs=
yunion.io/x/pkg v1.10.4-0.20250820035218-6008459eb4f0/go.mod h1:0Bwxqd9MA3ACi119/l02FprY/o9gHahmYC2bsSbnVpM=
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1 h1:1KJ3YYinydPHpDEQRXdr/T8SYcKZ5Er+m489H+PnaQ4=
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v1.1.3-0.20250925091009-4ca0766fc8f0 h1:L4zE6kTD1PEki1jQnLLBiYnEYFKWa/weoful0Sl4tKw=
yunion.io/x/sqlchemy v1.1.3-0.20250925091009-4ca0766fc8f0/go.mod h1:vCIZpqhZ5Jzaq3tFyrti/vv8BijQKtkzSgNT/uH4H5A=
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c h1:QuLab2kSRECZRxo4Lo2KcYn6XjQFDGaZ1+x0pYDVVwQ=
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

View File

@@ -232,5 +232,5 @@ func taskCompleted(ctx context.Context, data jsonutils.JSONObject) {
}
func InitPlaybookWorker() {
PlaybookWorker = workmanager.NewWorkManger(taskFailed, taskCompleted, options.Options.PlaybookWorkerCount)
PlaybookWorker = workmanager.NewWorkManger("PlaybookWorker", taskFailed, taskCompleted, options.Options.PlaybookWorkerCount)
}

View File

@@ -16,6 +16,7 @@ package handler
import (
"context"
"crypto/md5"
"encoding/base64"
"fmt"
"net/http"
@@ -25,6 +26,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/gotypes"
"yunion.io/x/pkg/util/httputils"
"yunion.io/x/pkg/util/printutils"
"yunion.io/x/pkg/util/rbacscope"
@@ -34,7 +36,6 @@ import (
"yunion.io/x/onecloud/pkg/apigateway/options"
policytool "yunion.io/x/onecloud/pkg/apigateway/policy"
agapi "yunion.io/x/onecloud/pkg/apis/apigateway"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/appsrv"
"yunion.io/x/onecloud/pkg/cloudcommon/policy"
"yunion.io/x/onecloud/pkg/httperrors"
@@ -44,6 +45,8 @@ import (
compute_modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/identity"
"yunion.io/x/onecloud/pkg/mcclient/modules/notify"
"yunion.io/x/onecloud/pkg/mcclient/modules/yunionconf"
"yunion.io/x/onecloud/pkg/util/hashcache"
"yunion.io/x/onecloud/pkg/util/logclient"
"yunion.io/x/onecloud/pkg/util/netutils2"
"yunion.io/x/onecloud/pkg/util/seclib2"
@@ -75,6 +78,7 @@ func (h *AuthHandlers) AddMethods() {
NewHP(h.handleSsoLogin, "ssologin"),
NewHP(h.handleIdpInitSsoLogin, "ssologin", "<idp_id>"),
NewHP(h.postLogoutHandler, "logout"),
NewHP(h.getScopedPolicyBindings, "scopedpolicybindings"),
// oidc auth
NewHP(handleOIDCAuth, "oidc", "auth"),
NewHP(handleOIDCConfiguration, "oidc", ".well-known", "openid-configuration"),
@@ -213,6 +217,38 @@ func (h *AuthHandlers) getRegions(ctx context.Context, w http.ResponseWriter, re
appsrv.SendJSON(w, jsonutils.Marshal(resp))
}
var (
bindingCache = hashcache.NewCache(1024, time.Minute)
)
func (h *AuthHandlers) getScopedPolicyBindings(ctx context.Context, w http.ResponseWriter, req *http.Request) {
_, _params, _ := appsrv.FetchEnv(ctx, w, req)
if gotypes.IsNil(_params) {
_params = jsonutils.NewDict()
}
params := _params.(*jsonutils.JSONDict)
token, _, err := fetchAuthInfo(ctx, req)
if err != nil {
httperrors.GeneralServerError(ctx, w, err)
return
}
params.Set("project_id", jsonutils.NewString(token.GetProjectId()))
hash := fmt.Sprintf("%x", md5.Sum([]byte(params.String())))
cache := bindingCache.Get(hash)
if cache != nil {
appsrv.SendJSON(w, jsonutils.Marshal(cache))
return
}
s := auth.GetAdminSession(ctx, options.Options.Region)
resp, err := yunionconf.ScopedPolicyBindings.List(s, params)
if err != nil {
httperrors.GeneralServerError(ctx, w, err)
return
}
bindingCache.AtomicSet(hash, resp)
appsrv.SendJSON(w, jsonutils.Marshal(resp))
}
func (h *AuthHandlers) getUser(ctx context.Context, w http.ResponseWriter, req *http.Request) {
data, err := getUserInfo(ctx, req)
if err != nil {
@@ -1070,25 +1106,6 @@ func getUserInfo2(s *mcclient.ClientSession, uid string, pid string, loginIp str
menus.Add(item)
}
log.Infof("getUserInfo modules.Hosts.Get")
// s2 := auth.GetSession(ctx, token, FetchRegion(req), "v2")
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("host_type"), "field")
params.Add(jsonutils.NewString("system"), "scope")
params.Add(jsonutils.JSONTrue, "usable")
params.Add(jsonutils.JSONTrue, "show_emulated")
cap, err := compute_modules.Hosts.Get(s, "distinct-field", params)
if err != nil {
log.Errorf("modules.Servers.Get distinct-field fail %s", err)
} else {
hostTypes, _ := jsonutils.GetStringArray(cap, "host_type")
hypervisors := make([]string, len(hostTypes))
for i, hostType := range hostTypes {
hypervisors[i] = compute.HOSTTYPE_HYPERVISOR[hostType]
}
data.Add(jsonutils.NewStringArray(hypervisors), "hypervisors")
}
data.Add(menus, "menus")
data.Add(k8s, "k8sdashboard")
data.Add(services, "services")

View File

@@ -108,6 +108,8 @@ func (h *MiscHandler) Bind(app *appsrv.Application) {
// syslog webservice handlers
app.AddHandler(POST, prefix+"syslog/token", handleSyslogWebServiceToken)
app.AddHandler(POST, prefix+"syslog/message", handleSyslogWebServiceMessage)
// service settings
app.AddHandler(GET, prefix+"service_settings", h.getServiceSettings)
}
func UploadHandlerInfo(method, prefix string, handler func(context.Context, http.ResponseWriter, *http.Request)) *appsrv.SHandlerInfo {

View File

@@ -0,0 +1,81 @@
// 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 handler
import (
"context"
"net/http"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/appsrv"
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient/auth"
"yunion.io/x/onecloud/pkg/mcclient/modules/identity"
)
var settingNames = map[string][]string{
"identity": []string{"no_action_logout_seconds"},
"yunionapi": []string{"enable_organization", "totp_issuer"},
"image": []string{"enable_pending_delete"},
"compute_v2": []string{"enable_pending_delete"},
"meter": []string{"cost_conversion_available", "enable_prediction", "share_resource_type"},
"common": []string{"api_server", "enable_quota_check", "enable_watermark", "enable_cloud_shell"},
}
func (mh *MiscHandler) getServiceSettings(ctx context.Context, w http.ResponseWriter, req *http.Request) {
s := auth.GetAdminSession(ctx, FetchRegion(req))
types := []string{}
for typ := range settingNames {
types = append(types, typ)
}
params := map[string]interface{}{
"limit": 20,
"scope": "system",
"type": types,
}
resp, err := identity.ServicesV3.List(s, jsonutils.Marshal(params))
if err != nil {
e := httperrors.NewInternalServerError(err.Error())
httperrors.JsonClientError(ctx, w, e)
return
}
services := []struct {
Id string
Type string
}{}
err = jsonutils.Update(&services, resp.Data)
if err != nil {
e := httperrors.NewInternalServerError(err.Error())
httperrors.JsonClientError(ctx, w, e)
return
}
result := map[string]map[string]interface{}{}
for _, service := range services {
result[service.Type] = map[string]interface{}{}
data, err := identity.ServicesV3.GetSpecific(s, service.Id, "config", nil)
if err != nil {
e := httperrors.NewInternalServerError(err.Error())
httperrors.JsonClientError(ctx, w, e)
return
}
names, _ := settingNames[service.Type]
for _, name := range names {
v, _ := data.Get("config", "default", name)
result[service.Type][name] = v
}
}
appsrv.SendJSON(w, jsonutils.Marshal(result))
}

View File

@@ -16,10 +16,19 @@ package service
import (
_ "yunion.io/x/onecloud/pkg/cloudevent/policy"
_ "yunion.io/x/onecloud/pkg/compute/policy"
_ "yunion.io/x/onecloud/pkg/image/policy"
_ "yunion.io/x/onecloud/pkg/keystone/policy"
_ "yunion.io/x/onecloud/pkg/logger/policy"
_ "yunion.io/x/onecloud/pkg/notify/policy"
_ "yunion.io/x/onecloud/pkg/yunionconf/policy"
compute "yunion.io/x/onecloud/pkg/compute/policy"
image "yunion.io/x/onecloud/pkg/image/policy"
keystone "yunion.io/x/onecloud/pkg/keystone/policy"
logger "yunion.io/x/onecloud/pkg/logger/policy"
notify "yunion.io/x/onecloud/pkg/notify/policy"
yunionconf "yunion.io/x/onecloud/pkg/yunionconf/policy"
)
func InitDefaultPolicy() {
compute.Init()
image.Init()
keystone.Init()
logger.Init()
notify.Init()
yunionconf.Init()
}

View File

@@ -39,6 +39,7 @@ func StartService() {
baseOpts := &opts.BaseOptions
commonOpts := &opts.CommonOptions
common_options.ParseOptions(opts, os.Args, "apigateway.conf", api.SERVICE_TYPE)
InitDefaultPolicy()
app_common.InitAuth(commonOpts, func() {
log.Infof("Auth complete.")
})
@@ -57,7 +58,7 @@ func StartService() {
// log.Infof("Modules: %s", jsonutils.Marshal(jmods).PrettyString())
if !options.Options.DisableReporting {
cron := cronman.InitCronJobManager(true, 1)
cron := cronman.InitCronJobManager(true, 1, opts.TimeZone)
rand.Seed(time.Now().Unix())
cron.AddJobEveryFewDays("AutoReport", 1, rand.Intn(23), rand.Intn(59), 0, report.Report, true)
go cron.Start()

View File

@@ -15,6 +15,8 @@
package compute
import (
"time"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/apis"
@@ -172,6 +174,10 @@ type DiskConfig struct {
// requried: false
Fs string `json:"fs"`
// 关机后自动重置磁盘
// required: false
AutoReset bool `json:"auto_reset"`
// 磁盘存储格式
// enum: qcow2, raw, docker, iso, vmdk, vmdkflatver1, vmdkflatver2, vmdkflat, vmdksparse, vmdksparsever1, vmdksparsever2, vmdksepsparse vhd
// requried: false
@@ -630,6 +636,8 @@ type ServerCreateInput struct {
BillingType string `json:"billing_type"`
// swagger:ignore
BillingCycle string `json:"billing_cycle"`
// 到期释放时间
ReleaseAt time.Time `json:"release_at"`
// swagger:ignore
// Deprecated

View File

@@ -189,6 +189,8 @@ type SBackupStorageAccessInfo struct {
ObjectAccessKey string `json:"object_access_key"`
// description: secret of object storage
ObjectSecret string `json:"object_secret"`
// description: signing version, can be v2/v4, default is v4
ObjectSignVer string `json:"object_sign_ver"`
}
func (ba *SBackupStorageAccessInfo) String() string {

View File

@@ -80,6 +80,8 @@ func (self BucketDetails) GetMetricTags() map[string]string {
"status": self.Status,
"tenant": self.Project,
"tenant_id": self.ProjectId,
"account": self.Account,
"account_id": self.AccountId,
"external_id": self.ExternalId,
}
return AppendMetricTags(ret, self.MetadataResourceInfo, self.ProjectizedResourceInfo)

View File

@@ -86,4 +86,7 @@ type CachedimageListInput struct {
// valid cachedimage
Valid bool `json:"valid"`
// enum: [public, private]
CloudEnv string `json:"cloud_env"`
}

View File

@@ -72,12 +72,6 @@ type CloudenvResourceListInput struct {
// Deprecated
Provider []string `json:"provider" yunion-deprecated-by:"providers"`
// 列出指定云平台品牌的资源一般来说brand和provider相同除了以上支持的provider之外还支持以下band
//
// | Brand | Provider | 说明 |
// |----------|----------|------------|
// | DStack | ZStack | 滴滴云私有云 |
//
Brands []string `json:"brands"`
// swagger:ignore
// Deprecated
@@ -169,7 +163,7 @@ type CloudaccountCreateInput struct {
// | Huawei | Huawei |
// | OpenStack | OpenStack |
// | Ucloud | Ucloud |
// | ZStack | ZStack, DStack |
// | ZStack | ZStack |
// | Google | Google |
// | Ctyun | Ctyun |
Brand string `json:"brand"`
@@ -344,7 +338,7 @@ type CloudaccountDetail struct {
SyncIntervalSeconds int `json:"sync_interval_seconds"`
// 同步状态
SyncStatus2 string `json:"sync_stauts2"`
SyncStatus2 string `json:"sync_status2"`
// 云账号环境类型
// public: 公有云
@@ -571,7 +565,7 @@ type SyncRangeInput struct {
// 按资源类型同步,可输入多个
// enmu: project, compute, network, eip, loadbalancer, objectstore, rds, cache, event, cloudid, dnszone, public_ip, intervpcnetwork, saml_auth, quota, nat, nas, waf, mongodb, es, kafka, app, cdn, container, ipv6_gateway, tablestore, modelarts, vpcpeer, misc
Resources []string `json:"resources" choices:"project|compute|network|eip|loadbalancer|objectstore|rds|cache|event|cloudid|dnszone|public_ip|intervpcnetwork|saml_auth|quota|nat|nas|waf|mongodb|es|kafka|app|cdn|container|ipv6_gateway|tablestore|modelarts|vpcpeer|misc"`
Resources []string `json:"resources" choices:"project|compute|network|eip|loadbalancer|objectstore|rds|cache|event|cloudid|dnszone|public_ip|intervpcnetwork|saml_auth|quota|nat|nas|waf|mongodb|es|kafka|app|cdn|container|ipv6_gateway|tablestore|modelarts|vpcpeer|misc|image"`
}
type iRes interface {

View File

@@ -83,7 +83,6 @@ const (
CLOUD_PROVIDER_HEALTH_UNKNOWN = compute.CLOUD_PROVIDER_HEALTH_UNKNOWN // 未知状态,查询失败
CLOUD_PROVIDER_HEALTH_NO_PERMISSION = compute.CLOUD_PROVIDER_HEALTH_NO_PERMISSION // 没有权限获取账单信息
ZSTACK_BRAND_DSTACK = compute.ZSTACK_BRAND_DSTACK
ONECLOUD_BRAND_ONECLOUD = "OneCloud"
CLOUD_ACCOUNT_WIRE_LEVEL_VCENTER = "vcenter"

View File

@@ -82,8 +82,8 @@ type DBInstanceCreateInput struct {
// default: false
AutoRenew bool `json:"auto_renew"`
// swagger:ignore
ExpiredAt time.Time `json:"expired_at"`
// 到期释放时间
ReleaseAt time.Time `json:"release_at"`
// 计费方式
// enum: postpaid, prepaid
@@ -342,6 +342,8 @@ func (self DBInstanceDetails) GetMetricTags() map[string]string {
"tenant_id": self.ProjectId,
"brand": self.Brand,
"domain_id": self.DomainId,
"account": self.Account,
"account_id": self.AccountId,
"project_domain": self.ProjectDomain,
"external_id": self.ExternalId,
}

View File

@@ -163,6 +163,9 @@ type DiskListInput struct {
// 根据虚拟机状态过滤
GuestStatus string `json:"guest_status"`
// 根据是否绑定快照策略过滤
BindingSnapshotpolicy *bool `json:"binding_snapshotpolicy"`
}
type DiskResourceInput struct {
@@ -201,6 +204,12 @@ type SimpleGuest struct {
Driver string `json:"driver"`
// 缓存模式
CacheMode string `json:"cache_mode"`
// 磁盘并发数
Iops int `json:"iops"`
// 磁盘吞吐
Bps int `json:"bps"`
// 计费类型
BillingType string `json:"billing_type"`
}
type SimpleSnapshotPolicy struct {
@@ -225,6 +234,8 @@ type DiskDetails struct {
GuestCount int `json:"guest_count"`
// 所挂载虚拟机状态
GuestStatus string `json:"guest_status"`
// 所挂载虚拟机计费类型
GuestBillingType string `json:"guest_billing_type"`
// 自动清理时间
AutoDeleteAt time.Time `json:"auto_delete_at"`
@@ -257,6 +268,8 @@ type DiskUpdateInput struct {
// 磁盘类型
DiskType string `json:"disk_type"`
// 关机自动重置
AutoReset *bool `json:"auto_reset"`
}
type DiskSaveInput struct {
@@ -329,8 +342,21 @@ type DiskMigrateInput struct {
TargetStorageId string `json:"target_storage_id"`
}
type DiskChagneStorageTypeInput struct {
// 目标存储类型
StorageType string `json:"storage_type"`
}
type DiskSnapshotpolicyInput struct {
SnapshotpolicyId string `json:"snapshotpolicy_id"`
}
type DiskRebuildInput struct{}
type DiskChangeBillingTypeInput struct {
// 仅在磁盘挂载在虚拟机上时调用
// 目前支持阿里云
// enmu: [postpaid, prepaid]
// required: true
BillingType string `json:"billing_type"`
}

View File

@@ -53,6 +53,8 @@ func (self ElasticcacheDetails) GetMetricTags() map[string]string {
"tenant": self.Project,
"tenant_id": self.ProjectId,
"brand": self.Brand,
"account": self.Account,
"account_id": self.AccountId,
"domain_id": self.DomainId,
"project_domain": self.ProjectDomain,
"external_id": self.ExternalId,
@@ -244,13 +246,13 @@ type ElasticcacheCreateInput struct {
// 包年包月时间周期
Duration string `json:"duration"`
// 到期释放时间
ReleaseAt time.Time `json:"release_at"`
// 是否自动续费(仅包年包月时生效)
// default: false
AutoRenew bool `json:"auto_renew"`
// swagger:ignore
ExpiredAt time.Time `json:"expired_at"`
// 计费方式
// enum: postpaid, prepaid
BillingType string

View File

@@ -87,8 +87,8 @@ type FileSystemCreateInput struct {
// default: false
AutoRenew bool `json:"auto_renew"`
// 到期释放时间,仅后付费支持
ExpiredAt time.Time `json:"expired_at"`
// 到期释放时间
ReleaseAt time.Time `json:"release_at"`
// 计费方式
// enum: postpaid, prepaid

View File

@@ -420,23 +420,24 @@ const (
VM_AZURE_DEFAULT_LOGIN_USER = compute.VM_AZURE_DEFAULT_LOGIN_USER
VM_ZSTACK_DEFAULT_LOGIN_USER = compute.VM_ZSTACK_DEFAULT_LOGIN_USER
VM_METADATA_APP_TAGS = "app_tags"
VM_METADATA_CREATE_PARAMS = "create_params"
VM_METADATA_LOGIN_ACCOUNT = "login_account"
VM_METADATA_LOGIN_KEY = "login_key"
VM_METADATA_LAST_LOGIN_KEY = "last_login_key"
VM_METADATA_LOGIN_KEY_TIMESTAMP = "login_key_timestamp"
VM_METADATA_OS_ARCH = "os_arch"
VM_METADATA_OS_DISTRO = "os_distribution"
VM_METADATA_OS_NAME = "os_name"
VM_METADATA_OS_VERSION = "os_version"
VM_METADATA_CGROUP_CPUSET = "cgroup_cpuset"
VM_METADATA_ENABLE_MEMCLEAN = "enable_memclean"
VM_METADATA_HOTPLUG_CPU_MEM = "hotplug_cpu_mem"
VM_METADATA_HOT_REMOVE_NIC = "hot_remove_nic"
VM_METADATA_START_VMEM_MB = "start_vmem_mb"
VM_METADATA_START_VCPU_COUNT = "start_vcpu_count"
VM_METADATA_CPU_NUMA_PIN = "__cpu_numa_pin"
VM_METADATA_APP_TAGS = "app_tags"
VM_METADATA_CREATE_PARAMS = "create_params"
VM_METADATA_LOGIN_ACCOUNT = "login_account"
VM_METADATA_LOGIN_KEY = "login_key"
VM_METADATA_LAST_LOGIN_KEY = "last_login_key"
VM_METADATA_LOGIN_KEY_TIMESTAMP = "login_key_timestamp"
VM_METADATA_OS_ARCH = "os_arch"
VM_METADATA_OS_DISTRO = "os_distribution"
VM_METADATA_OS_NAME = "os_name"
VM_METADATA_OS_VERSION = "os_version"
VM_METADATA_CGROUP_CPUSET = "cgroup_cpuset"
VM_METADATA_ENABLE_MEMCLEAN = "enable_memclean"
VM_METADATA_HOTPLUG_CPU_MEM = "hotplug_cpu_mem"
VM_METADATA_HOT_REMOVE_NIC = "hot_remove_nic"
VM_METADATA_START_VMEM_MB = "start_vmem_mb"
VM_METADATA_START_VCPU_COUNT = "start_vcpu_count"
VM_METADATA_CPU_NUMA_PIN = "__cpu_numa_pin"
VM_METADATA_DISABLE_AUTO_MERGE_SNAPSHOT = "disable_auto_merge_snapshot"
)
func Hypervisors2HostTypes(hypervisors []string) []string {

View File

@@ -34,6 +34,8 @@ type GuestDiskDetails struct {
// 磁盘类型
// example: data
DiskType string `json:"disk_type"`
// 关机自动重置
AutoReset bool `json:"auto_reset"`
// 介质类型
// example: ssd
MediumType string `json:"medium_type"`
@@ -91,6 +93,7 @@ type GuestdiskJsonDesc struct {
Dev string `json:"dev"`
IsSSD bool `json:"is_ssd"`
NumQueues uint8 `json:"num_queues"`
AutoReset bool `json:"auto_reset"`
// esxi
ImageInfo struct {

View File

@@ -27,3 +27,26 @@ type SImagesInGuest struct {
RootImage SSubImage
DataImages []SSubImage
}
type SGuestScreenDump struct {
S3AccessKey string
S3SecretKey string
S3Endpoint string
S3BucketName string
S3ObjectName string
S3UseSSL bool
}
type GuestScreenDumpListInput struct {
Server string
}
type GetDetailsGuestScreenDumpInput struct {
ObjectName string
}
type GetDetailsGuestScreenDumpOutput struct {
GuestId string
Name string
ScreenDump string
}

View File

@@ -127,8 +127,13 @@ type ServerListInput struct {
// 根据镜像发行版排序
OrderByOsDist string `json:"order_by_os_dist"`
SnapshotpolicyId string `json:"snapshotpolicy_id"`
// 是否调度到宿主机上
WithHost *bool `json:"with_host"`
// 根据是否绑定快照策略过滤
BindingSnapshotpolicy *bool `json:"binding_snapshotpolicy"`
}
func (input *ServerListInput) AfterUnmarshal() {
@@ -313,6 +318,8 @@ func (self ServerDetails) GetMetricTags() map[string]string {
"paltform": self.Hypervisor,
"host": self.Host,
"host_id": self.HostId,
"ips": self.IPs,
"vm_ip": self.IPs,
"vm_id": self.Id,
"vm_name": self.Name,
"zone": self.Zone,
@@ -359,9 +366,11 @@ type GuestDiskInfo struct {
Driver string `json:"driver"`
CacheMode string `json:"cache_mode"`
AioMode string `json:"aio_mode"`
AutoReset bool `json:"auto_reset"`
MediumType string `json:"medium_type"`
StorageType string `json:"storage_type"`
Iops int `json:"iops"`
Throughput int `json:"throughput"`
Bps int `json:"bps"`
ImageId string `json:"image_id,omitempty"`
Image string `json:"image,omitemtpy"`
@@ -624,6 +633,7 @@ type ServerStopInput struct {
TimeoutSecs int `json:"timeout_secs"`
// 是否关机停止计费, 若平台不支持停止计费,此参数无作用
// 若包年包月机器关机设置此参数,则先转换计费模式到按量计费,再关机不收费
// 目前仅阿里云,腾讯云此参数生效
StopCharging bool `json:"stop_charging"`
}
@@ -912,6 +922,7 @@ type GuestJsonDesc struct {
InstanceSnapshotId string `json:"instance_snapshot_id"`
InstanceId string `json:"instance_id"`
} `json:"instance_snapshot_info"`
EnableEsxiSwap bool `json:"enable_esxi_swap"`
EncryptKeyId string `json:"encrypt_key_id,omitempty"`
@@ -977,6 +988,13 @@ type ServerChangeDiskStorageInternalInput struct {
CloneDiskCount int `json:"disk_count"`
}
type ServerCopyDiskToStorageInput struct {
KeepOriginDisk bool `json:"keep_origin_disk"`
GuestRunning bool `json:"guest_running"`
CompletedDiskCount int `json:"completed_disk_count"`
CloneDiskCount int `json:"disk_count"`
}
type ServerSetExtraOptionInput struct {
Key string `json:"key"`
Value string `json:"value"`
@@ -1162,7 +1180,7 @@ type ServerQgaGetNetworkInput struct {
}
type ServerQgaTimeoutInput struct {
// qga execute timeout millisecond
// qga execute timeout second
Timeout int
}
@@ -1246,6 +1264,8 @@ type GuestPerformStartInput struct {
// 指定启动虚拟机的Qemu版本可选值2.12.1, 4.2.0
// 仅适用于KVM虚拟机
QemuVersion string `json:"qemu_version"`
// 按量机器自动转换为包年包月
AutoPrepaid bool `json:"auto_prepaid"`
}
type ServerSetOSInfoInput struct {
@@ -1331,6 +1351,10 @@ func (conf ServerChangeConfigSettings) MemChanged() bool {
return conf.VmemSize != conf.Old.VmemSize
}
func (conf ServerChangeConfigSettings) InstanceTypeChanged() bool {
return len(conf.InstanceType) > 0 && conf.InstanceType != conf.Old.InstanceType
}
func (conf ServerChangeConfigSettings) AddedMem() int {
addMem := conf.VmemSize - conf.Old.VmemSize
if addMem < 0 {
@@ -1349,3 +1373,10 @@ func (conf ServerChangeConfigSettings) AddedDisk() int {
}
return size
}
type ServerChangeBillingTypeInput struct {
// 仅在虚拟机开机或关机状态下调用
// enmu: [postpaid, prepaid]
// required: true
BillingType string `json:"billing_type"`
}

View File

@@ -151,6 +151,42 @@ type HostListInput struct {
// 按内存超分率排序
// enmu: asc,desc
OrderByMemCommitRate string `json:"order_by_mem_commit_rate"`
// 按本地存储分配大小排序
// enmu: asc,desc
OrderByStorageUsed string `json:"order_by_storage_used"`
// 按cpu分配大小排序
// enmu: asc,desc
OrderByCpuCommit string `json:"order_by_cpu_commit"`
// 按内存分配大小排序
// enmu: asc,desc
OrderByMemCommit string `json:"order_by_mem_commit"`
// 按物理cpu使用率排序
// enmu: asc,desc
OrderByCpuUsage string `json:"order_by_cpu_usage"`
// 按物理内存使用率排序
// enmu: asc,desc
OrderByMemUsage string `json:"order_by_mem_usage"`
// 按物理存储使用率排序
// enmu: asc,desc
OrderByStorageUsage string `json:"order_by_storage_usage"`
// 按虚拟内存使用率排序
// enmu: asc,desc
OrderByVirtualMemUsage string `json:"order_by_virtual_mem_usage"`
// 按虚拟cpu使用率排序
// enmu: asc,desc
OrderByVirtualCpuUsage string `json:"order_by_virtual_cpu_usage"`
// 按虚拟存储使用率排序
// enmu: asc,desc
OrderByVirtualStorageUsage string `json:"order_by_virtual_storage_usage"`
}
type HostDetails struct {
@@ -301,6 +337,8 @@ type HostResourceInfo struct {
// 宿主机类型
HostType string `json:"host_type"`
HostAccessIp string `json:"host_access_ip"`
}
type HostFilterListInput struct {
@@ -531,7 +569,8 @@ type SHostStorageStat struct {
type SHostPingInput struct {
WithData bool `json:"with_data"`
MemoryUsedMb int `json:"memory_used_mb"`
MemoryUsedMb int `json:"memory_used_mb"`
CpuUsagePercent float64 `json:"cpu_usage_percent"`
RootPartitionUsedCapacityMb int `json:"root_partition_used_capacity_mb"`
@@ -641,3 +680,8 @@ type HostLoginInfoOutput struct {
type HostPerformStartInput struct {
}
type HostSetCommitBoundInput struct {
CpuCmtbound *float32
MemCmtbound *float32
}

View File

@@ -119,6 +119,11 @@ const (
HostResourceTypeDedicated = "dedicated"
)
const (
HOST_METADATA_CPU_USAGE_PERCENT = "cpu_usage_percent"
HOST_METADATA_MEMORY_USED_MB = "memory_used_mb"
)
var HOST_TYPES = []string{
HOST_TYPE_BAREMETAL,
HOST_TYPE_HYPERVISOR,

View File

@@ -147,6 +147,8 @@ type SnapshotPolicyListInput struct {
// 按绑定的磁盘数量排序
// pattern:asc|desc
OrderByBindDiskCount string `json:"order_by_bind_disk_count"`
// 按类型过滤
Type string `json:"type"`
}
type HostnameInput struct {

View File

@@ -23,6 +23,10 @@ import (
"yunion.io/x/onecloud/pkg/apis"
)
const (
ErrMsgIsolatedDeviceUsedByServer = "Isolated device used by server"
)
type IsolateDeviceDetails struct {
apis.StandaloneResourceDetails
HostResourceInfo
@@ -58,9 +62,15 @@ type IsolatedDeviceListInput struct {
// # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr`
Addr []string `json:"addr"`
// 设备路径
DevicePath []string `json:"device_path"`
// 设备VENDOE编号
VendorDeviceId []string `json:"vendor_device_id"`
// NUMA节点序号
NumaNode []uint8 `json:"numa_node"`
// 展示物理机的上的设备
ShowBaremetalIsolatedDevices bool `json:"show_baremetal_isolated_devices"`

View File

@@ -18,6 +18,10 @@ import "yunion.io/x/onecloud/pkg/apis"
var KEYPAIR_SCHEMAS = []string{
KEYPAIRE_SCHEME_RSA,
// OpenSSH deprecated DSA keys
//KEYPAIRE_SCHEME_DSA,
KEYPAIRE_SCHEME_ECDSA,
KEYPAIRE_SCHEME_ED25519,
}
type KeypairCreateInput struct {

View File

@@ -15,6 +15,8 @@
package compute
const (
KEYPAIRE_SCHEME_RSA = "RSA"
KEYPAIRE_SCHEME_DSA = "DSA"
KEYPAIRE_SCHEME_RSA = "RSA"
KEYPAIRE_SCHEME_DSA = "DSA"
KEYPAIRE_SCHEME_ECDSA = "ECDSA"
KEYPAIRE_SCHEME_ED25519 = "ED25519"
)

View File

@@ -96,6 +96,12 @@ type LoadbalancerDetails struct {
// 关联安全组列表
Secgroups []SimpleSecurityGroup `json:"secgroups"`
LoadbalancerUsage
}
type LoadbalancerUsage struct {
BackendGroupCount int `json:"backend_group_count"`
ListenerCount int `json:"listener_count"`
}
type SimpleSecurityGroup struct {
@@ -255,6 +261,8 @@ func (self LoadbalancerDetails) GetMetricTags() map[string]string {
"status": self.Status,
"tenant": self.Project,
"tenant_id": self.ProjectId,
"account": self.Account,
"account_id": self.AccountId,
"external_id": self.ExternalId,
}
return AppendMetricTags(ret, self.MetadataResourceInfo, self.ProjectizedResourceInfo)

View File

@@ -144,7 +144,7 @@ type LoadbalancerListenerCreateInput struct {
HealthCheck string `json:"health_check"`
// enum: tcp, udp, http
HealthCheckType string `json:"health_check_type"`
HealthCheckDomain string `json:"string"`
HealthCheckDomain string `json:"health_check_domain"`
HealthCheckPath string `json:"health_check_path"`
// default: http_2xx,http_3xx
HealthCheckHttpCode string `json:"health_check_http_code"`

View File

@@ -117,8 +117,8 @@ type NatgatewayCreateInput struct {
// default: false
AutoRenew bool `json:"auto_renew"`
// 到期释放时间,仅后付费支持
ExpiredAt time.Time `json:"expired_at"`
// 到期释放时间
ReleaseAt time.Time `json:"release_at"`
// 计费方式
// enum: postpaid, prepaid

View File

@@ -255,6 +255,8 @@ type SecgroupResourceInput struct {
type SecgroupFilterListInput struct {
SecgroupResourceInput
RegionalFilterListInput
ManagedResourceListInput
// 以安全组排序
OrderBySecgroup string `json:"order_by_secgroup"`
@@ -291,6 +293,16 @@ type SecgroupDetails struct {
type SecurityGroupResourceInfo struct {
// 安全组名称
Secgroup string `json:"secgroup"`
// VPC归属区域ID
CloudregionId string `json:"cloudregion_id"`
CloudregionResourceInfo
// VPC归属云订阅ID
ManagerId string `json:"manager_id"`
ManagedResourceInfo
}
type GuestsecgroupListInput struct {

View File

@@ -74,6 +74,12 @@ type SnapshotListInput struct {
// list server snapshots
ServerId string `json:"server_id"`
// 未关联任何磁盘
Unused bool `json:"unused"`
// 按存储过滤
StorageId string `json:"storage_id"`
// 按虚拟机名称排序
// pattern:asc|desc
OrderByGuest string `json:"order_by_guest"`

View File

@@ -30,6 +30,9 @@ const (
SNAPSHOT_POLICY_APPLY_FAILED = "apply_failed"
SNAPSHOT_POLICY_CANCEL = "canceling"
SNAPSHOT_POLICY_CANCEL_FAILED = "cancel_failed"
SNAPSHOT_POLICY_TYPE_DISK = "disk"
SNAPSHOT_POLICY_TYPE_SERVER = "server"
)
type SnapshotPolicyDetails struct {
@@ -41,7 +44,8 @@ type SnapshotPolicyDetails struct {
RetentionDays int `json:"retention_days"`
BindingDiskCount int `json:"binding_disk_count"`
BindingDiskCount int `json:"binding_disk_count"`
BindingResourceCount int `json:"binding_resource_count"`
}
type SSnapshotPolicyCreateInput struct {
@@ -49,7 +53,10 @@ type SSnapshotPolicyCreateInput struct {
CloudproviderResourceInput
CloudregionResourceInput
RetentionDays int `json:"retention_days"`
RetentionDays int `json:"retention_days"`
RetentionCount int `json:"retention_count"`
// 快照类型, 目前支持 disk, server
Type string `json:"type"`
RepeatWeekdays []int `json:"repeat_weekdays"`
@@ -92,7 +99,8 @@ func (self *SSnapshotPolicyCreateInput) Validate() error {
type SSnapshotPolicyUpdateInput struct {
apis.VirtualResourceBaseUpdateInput
RetentionDays *int
RetentionDays *int
RegentionCount *int
RepeatWeekdays *[]int `json:"repeat_weekdays"`
TimePoints *[]int `json:"time_points"`
@@ -131,6 +139,13 @@ type SnapshotPolicyDisksInput struct {
Disks []string `json:"disk"`
}
type SnapshotPolicyResourcesInput struct {
Resources []struct {
Id string `json:"id"`
Type string `json:"type"`
} `json:"resources"`
}
type RepeatWeekdays []int
func (days RepeatWeekdays) String() string {

View File

@@ -77,6 +77,12 @@ type StorageCreateInput struct {
// example: 192.168.222.3,192.168.222.4,192.168.222.99
RbdMonHost string `json:"rbd_mon_host"`
// enable ceph messenger v2
EnableMessengerV2 *bool `json:"enable_messenger_v2"`
// rbd storage auto cache glance images
AutoCacheImages *bool `json:"auto_cache_images"`
// swagger:ignore
MonHost string
@@ -117,7 +123,6 @@ type StorageCreateInput struct {
CLVMVgName string
// SLVM VG Name
SLVMVgName string
MasterHost string
Lvmlockd bool
}
@@ -180,6 +185,9 @@ type StorageDetails struct {
// 超分比
CommitBound float32 `json:"commit_bound"`
// master host name
MasterHostName string `json:"master_host_name"`
}
func (self StorageDetails) GetMetricTags() map[string]string {
@@ -239,6 +247,11 @@ type StorageUpdateInput struct {
// example: AQDigB9dtnDAKhAAxS6X4zi4BPR/lIle4nf4Dw==
RbdKey string `json:"rbd_key"`
// enable ceph messenger v2
EnableMessengerV2 *bool `json:"enable_messenger_v2"`
// rbd storage auto cache glance images
AutoCacheImages *bool `json:"auto_cache_images"`
RbdTimeoutInput
// swagger:ignore
@@ -250,3 +263,19 @@ type StorageUpdateInput struct {
HardwareInfo *StorageHardwareInfo `json:"hardware_info"`
MasterHost string
}
type RbdStorageConf struct {
RadosMonOpTimeout int `json:"rados_mon_op_timeout"`
RadosOsdOpTimeout int `json:"rados_osd_op_timeout"`
ClientMountTimeout int `json:"client_mount_timeout"`
MonHost string `json:"mon_host"`
Pool string `json:"pool"`
Key string `json:"key"`
EnableMessengerV2 bool `json:"enable_messenger_v2"`
AutoCacheImages bool `json:"auto_cache_images"`
}
type StorageSetCmtBoundInput struct {
Cmtbound *float32
}

View File

@@ -74,6 +74,8 @@ const (
STORAGE_CLOUD_BASIC = compute.STORAGE_CLOUD_BASIC
STORAGE_CLOUD_PREMIUM = compute.STORAGE_CLOUD_PREMIUM //高性能云硬盘
STORAGE_CLOUD_HSSD = compute.STORAGE_CLOUD_HSSD //增强型SSD云硬盘
STORAGE_CLOUD_BSSD = compute.STORAGE_CLOUD_BSSD //增强型SSD云硬盘
STORAGE_CLOUD_TSSD = compute.STORAGE_CLOUD_TSSD //极速型SSD云硬盘
// huawei storage type
STORAGE_HUAWEI_SSD = compute.STORAGE_HUAWEI_SSD // 超高IO云硬盘
@@ -104,10 +106,15 @@ const (
STORAGE_ZSTACK_SHARED_BLOCK = compute.STORAGE_ZSTACK_SHARED_BLOCK
// Google storage type
STORAGE_GOOGLE_LOCAL_SSD = compute.STORAGE_GOOGLE_LOCAL_SSD //本地SSD暂存盘 (最多8个)
STORAGE_GOOGLE_PD_STANDARD = compute.STORAGE_GOOGLE_PD_STANDARD //标准永久性磁盘
STORAGE_GOOGLE_PD_SSD = compute.STORAGE_GOOGLE_PD_SSD //SSD永久性磁盘
STORAGE_GOOGLE_PD_BALANCED = compute.STORAGE_GOOGLE_PD_BALANCED //平衡永久性磁盘
STORAGE_GOOGLE_LOCAL_SSD = compute.STORAGE_GOOGLE_LOCAL_SSD //本地SSD暂存盘 (最多8个)
STORAGE_GOOGLE_PD_STANDARD = compute.STORAGE_GOOGLE_PD_STANDARD //标准永久性磁盘
STORAGE_GOOGLE_PD_SSD = compute.STORAGE_GOOGLE_PD_SSD //SSD永久性磁盘
STORAGE_GOOGLE_PD_BALANCED = compute.STORAGE_GOOGLE_PD_BALANCED //平衡永久性磁盘
STORAGE_GOOGLE_PD_EXTREME = compute.STORAGE_GOOGLE_PD_EXTREME //极端永久性磁盘
STORAGE_GOOGLE_HYPERDISK_BALANCED = compute.STORAGE_GOOGLE_HYPERDISK_BALANCED //平衡 Hyperdisk
STORAGE_GOOGLE_HYPERDISK_EXTREME = compute.STORAGE_GOOGLE_HYPERDISK_EXTREME //Hyperdisk Extreme
STORAGE_GOOGLE_HYPERDISK_THROUGHPUT = compute.STORAGE_GOOGLE_HYPERDISK_THROUGHPUT //Hyperdisk Throughput
STORAGE_GOOGLE_HYPERDISK_ML = compute.STORAGE_GOOGLE_HYPERDISK_ML //Hyperdisk ML
// ctyun storage type
STORAGE_CTYUN_SSD = compute.STORAGE_CTYUN_SSD // 超高IO云硬盘
@@ -126,6 +133,21 @@ const (
STORAGE_ECLOUD_SSD = compute.STORAGE_ECLOUD_SSD // 高性能盘
STORAGE_ECLOUD_SSDEBS = compute.STORAGE_ECLOUD_SSDEBS // 性能优化盘
STORAGE_ECLOUD_SYSTEM = compute.STORAGE_ECLOUD_SYSTEM // 系统盘
STORAGE_BAIDU_SSD = compute.STORAGE_BAIDU_SSD
STORAGE_BAIDU_PREMIUM_SSD = compute.STORAGE_BAIDU_PREMIUM_SSD
STORAGE_BAIDU_HDD = compute.STORAGE_BAIDU_HDD
STORAGE_BAIDU_ENHANCED_SSD_PL1 = compute.STORAGE_BAIDU_ENHANCED_SSD_PL1
STORAGE_BAIDU_ENHANCED_SSD_PL2 = compute.STORAGE_BAIDU_ENHANCED_SSD_PL2
STORAGE_BAIDU_ENHANCED_SSD_PL3 = compute.STORAGE_BAIDU_ENHANCED_SSD_PL3
// ksyun storage type
STORAGE_KSYUN_ESSD_AUTO_PL = compute.STORAGE_KSYUN_ESSD_AUTO_PL
STORAGE_KSYUN_SSD3_0 = compute.STORAGE_KSYUN_SSD3_0
STORAGE_KSYUN_EHDD = compute.STORAGE_KSYUN_EHDD
STORAGE_KSYUN_ESSD_PL1 = compute.STORAGE_KSYUN_ESSD_PL1
STORAGE_KSYUN_ESSD_PL2 = compute.STORAGE_KSYUN_ESSD_PL2
STORAGE_KSYUN_ESSD_PL3 = compute.STORAGE_KSYUN_ESSD_PL3
)
const (
@@ -162,7 +184,7 @@ var (
}
STORAGE_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_SHEEPDOG,
STORAGE_RBD, STORAGE_DOCKER, STORAGE_NAS, STORAGE_VSAN, STORAGE_NFS,
STORAGE_PUBLIC_CLOUD, STORAGE_CLOUD_SSD, STORAGE_CLOUD_ESSD, STORAGE_CLOUD_ESSD_PL2, STORAGE_CLOUD_ESSD_PL3,
STORAGE_PUBLIC_CLOUD, STORAGE_CLOUD_SSD, STORAGE_CLOUD_ESSD_PL0, STORAGE_CLOUD_ESSD, STORAGE_CLOUD_ESSD_PL2, STORAGE_CLOUD_ESSD_PL3,
STORAGE_EPHEMERAL_SSD, STORAGE_CLOUD_EFFICIENCY,
STORAGE_STANDARD_LRS, STORAGE_STANDARDSSD_LRS, STORAGE_PREMIUM_LRS,
STORAGE_GP2_SSD, STORAGE_GP3_SSD, STORAGE_IO1_SSD, STORAGE_ST1_HDD, STORAGE_SC1_HDD, STORAGE_STANDARD_HDD,
@@ -181,6 +203,7 @@ var (
SHARED_FILE_STORAGE = []string{STORAGE_NFS, STORAGE_GPFS}
FIEL_STORAGE = []string{STORAGE_LOCAL, STORAGE_NFS, STORAGE_GPFS, STORAGE_LVM, STORAGE_CLVM, STORAGE_SLVM}
LVM_STORAGE = []string{STORAGE_LVM, STORAGE_CLVM, STORAGE_SLVM}
// supported shared storage types
SHARED_STORAGE = []string{STORAGE_NFS, STORAGE_GPFS, STORAGE_RBD, STORAGE_CLVM, STORAGE_SLVM}
@@ -223,6 +246,9 @@ type StorageResourceInput struct {
type StorageFilterListInputBase struct {
StorageResourceInput
// 以host过滤
StorageHostId string `json:"storage_host_id"`
// 以存储名称排序
// pattern:asc|desc
OrderByStorage string `json:"order_by_storage"`
@@ -269,4 +295,7 @@ type StorageListInput struct {
// filter storages of baremetal host
IsBaremetal *bool `json:"is_baremetal"`
// filter by storage type
StorageType string `json:"storage_type"`
}

View File

@@ -48,6 +48,8 @@ const (
STATUS_UPDATE_TAGS = "update_tags"
STATUS_UPDATE_TAGS_FAILED = "update_tags_fail"
STATUS_START_SYNC_STATUS = "start_sync_status"
STATUS_SYNC_STATUS = "sync_status"
STATUS_DELETING = "deleting"
STATUS_DELETE_FAILED = "delete_failed"
@@ -56,6 +58,10 @@ const (
STATUS_AVAILABLE = "available"
STATUS_CREATE_FAILED = "create_failed"
// 更改计费模式
STATUS_CHANGE_BILLING_TYPE = "change_billing_type"
STATUS_CHANGE_BILLING_TYPE_FAILED = "change_billing_type_failed"
CLOUD_TAG_PREFIX = "ext:"
USER_TAG_PREFIX = "user:"
SYS_CLOUD_TAG_PREFIX = "sys:"
@@ -142,3 +148,28 @@ var (
func IsARM(osArch string) bool {
return utils.IsInStringArray(osArch, ARCH_ARM)
}
func IsX86(osArch string) bool {
return utils.IsInStringArray(osArch, ARCH_X86)
}
func IsIllegalSearchDomain(domain string) bool {
switch domain {
case "cloud.onecloud.io":
return true
}
return false
}
func IsSameArch(arch1, arch2 string) bool {
if arch1 == arch2 {
return true
}
if IsARM(arch1) && IsARM(arch2) {
return true
}
if IsX86(arch1) && IsX86(arch2) {
return true
}
return false
}

View File

@@ -236,6 +236,7 @@ var (
// kubeserver blacklist options
// ############################
"running_mode",
"enable_default_policy",
},
}
)

View File

@@ -44,6 +44,10 @@ type IdentityProviderDetails struct {
// 该认证源关联的所有域的组数量
GroupCount int `json:"group_count,allowempty"`
// 该认证源的URL, 可以区分ladp是否使用TLS
// example: ldaps://192.168.100.10, ldap://192.168.100.10
URL string `json:"url,allowempty"`
SIdentityProvider
}

View File

@@ -41,6 +41,8 @@ const (
IMAGE_STATUS_DELETED = "deleted"
IMAGE_STATUS_PENDING_DELETE = "pending_delete"
IMAGE_STATUS_UNKNOWN = "unkown"
IMAGE_STATUS_SYNC_CLASS_METADATA_FAILEd = "sync_class_metadata_failed"
ImageTypeTemplate = TImageType("image")
@@ -59,6 +61,7 @@ const (
IMAGE_OS_VERSION = "os_version"
IMAGE_DISK_FORMAT = "disk_format"
IMAGE_UEFI_SUPPORT = "uefi_support"
IMAGE_BIOS_SUPPORT = "bios_support"
IMAGE_IS_LVM_PARTITION = "is_lvm_partition"
IMAGE_IS_READONLY = "is_readonly"
IMAGE_PARTITION_TYPE = "partition_type"

View File

@@ -111,6 +111,25 @@ type ImageCreateInput struct {
Properties map[string]string `json:"properties"`
}
type ImageUpdateInput struct {
apis.SharableVirtualResourceBaseUpdateInput
// 最小系统盘要求
MinDiskMB *int32 `json:"min_disk"`
// 最小内存要求
MinRamMB *int32 `json:"min_ram"`
// 是否有删除保护
Protected *bool `json:"protected"`
// 是否是标准镜像
IsStandard *bool `json:"is_standard"`
// 是否是数据盘镜像
IsData *bool `json:"is_data"`
// 镜像属性
Properties map[string]string `json:"properties"`
}
type ImageUpdateStatusInput struct {
apis.Meta

View File

@@ -14,7 +14,13 @@
package apis
import "time"
import (
"time"
"yunion.io/x/pkg/util/billing"
"yunion.io/x/onecloud/pkg/httperrors"
)
type DomainizedResourceInput struct {
// 指定项目归属域名称或ID
@@ -390,8 +396,25 @@ type DistinctFieldsInput struct {
}
type PostpaidExpireInput struct {
Duration string `json:"duration"`
ExpireTime time.Time `json:"expire_time"`
Duration string `json:"duration"`
// swagger:ignore
ExpireTime time.Time `json:"expire_time" yunion-deprecated-by:"release_at"`
// 到期释放时间
ReleaseAt time.Time `json:"release_at"`
}
func (input *PostpaidExpireInput) GetReleaseAt() (time.Time, error) {
if !input.ReleaseAt.IsZero() {
return input.ReleaseAt, nil
}
if len(input.Duration) == 0 {
return time.Time{}, httperrors.NewInputParameterError("missing duration/expire_time")
}
bc, err := billing.ParseBillingCycle(input.Duration)
if err != nil {
return time.Time{}, httperrors.NewInputParameterError("invalid duration: %s", input.Duration)
}
return bc.EndAt(time.Now()), nil
}
type AutoRenewInput struct {

View File

@@ -168,6 +168,8 @@ type ModelBaseListInput struct {
ExportKeys string `json:"export_keys" help:"Export field keys"`
// 返回结果携带delete_fail_reason和update_fail_reason字段
ShowFailReason *bool `json:"show_fail_reason"`
// 是否返回状态统计信息默认为False
SummaryStats *bool `json:"summary_stats"`
}
func (o ModelBaseListInput) GetExportKeys() string {

View File

@@ -15,10 +15,12 @@
package monitor
import (
"reflect"
"time"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/gotypes"
"yunion.io/x/onecloud/pkg/apis"
)
@@ -84,20 +86,37 @@ type AlertSetting struct {
Conditions []AlertCondition `json:"conditions"`
}
type AlertCondition struct {
Type string `json:"type"`
Query AlertQuery `json:"query"`
Reducer Condition `json:"reducer"`
Evaluator Condition `json:"evaluator"`
Operator string `json:"operator"`
func (s AlertSetting) String() string {
return jsonutils.Marshal(s).String()
}
func (s AlertSetting) IsZero() bool {
return len(s.Conditions) == 0
}
type AlertCondition struct {
Type string `json:"type"`
Query AlertQuery `json:"query"`
Reducer Condition `json:"reducer"`
ReducerOrder ResultReducerOrder `json:"reducer_order"`
Evaluator Condition `json:"evaluator"`
Operator string `json:"operator"`
}
type ResultReducerOrder string
const (
RESULT_REDUCER_ORDER_ASC ResultReducerOrder = "asc"
RESULT_REDUCER_ORDER_DESC ResultReducerOrder = "desc"
)
type AlertQuery struct {
Model MetricQuery `json:"model"`
From string `json:"from"`
To string `json:"to"`
// 查询结果 reducer执行 p95 这些操作
ResultReducer *Condition `json:"result_reducer"`
ResultReducer *Condition `json:"result_reducer"`
ResultReducerOrder ResultReducerOrder `json:"result_reducer_order"`
}
type AlertCreateInput struct {
@@ -188,6 +207,7 @@ type EvalMatch struct {
Tags map[string]string `json:"tags"`
Unit string `json:"unit"`
AlertDetails jsonutils.JSONObject `json:"alert_details"`
IsRecovery bool `json:"is_recovery"`
}
type AlertTestRunOutput struct {
@@ -212,3 +232,9 @@ type AlertPauseInput struct {
Paused bool `json:"paused"`
}
func init() {
gotypes.RegisterSerializable(reflect.TypeOf(&AlertSetting{}), func() gotypes.ISerializable {
return &AlertSetting{}
})
}

View File

@@ -15,8 +15,6 @@
package monitor
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/apis"
)
@@ -41,7 +39,7 @@ type AlertPanelDetail struct {
PanelName string `json:"panel_name"`
PanelId string `json:"panel_id"`
Refresh string `json:"refresh"`
Setting jsonutils.JSONObject
Setting *AlertSetting
PanelDetails
}
@@ -53,3 +51,10 @@ type AlertClonePanelInput struct {
type AlertCloneDashboardInput struct {
CloneName string `json:"clone_name"`
}
type AlertPanelSetOrderInput struct {
Order []struct {
PanelId string `json:"panel_id"`
Index int `json:"index"`
} `json:"order"`
}

View File

@@ -0,0 +1,28 @@
// 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 "yunion.io/x/onecloud/pkg/apis"
type AlertJointCreateInput struct {
apis.Meta
AlertId string `json:"alert_id"`
}
type AlertJointListInput struct {
apis.JointResourceBaseListInput
AlertIds []string `json:"alert_ids"`
}

View File

@@ -36,12 +36,7 @@ type AlertJointResourceBaseDetails struct {
type AlertnotificationDetails struct {
AlertJointResourceBaseDetails
Notification string `json:"notification"`
}
type AlertJointCreateInput struct {
apis.Meta
AlertId string `json:"alert_id"`
Frequency int64 `json:"frequency"`
}
type AlertnotificationCreateInput struct {
@@ -51,3 +46,7 @@ type AlertnotificationCreateInput struct {
UsedBy string `json:"used_by"`
Params jsonutils.JSONObject `json:"params"`
}
type AlertNotificationListInput struct {
AlertJointListInput
}

View File

@@ -39,12 +39,13 @@ type AlertRecordListInput struct {
ResType string `json:"res_type"`
Alerting bool `json:"alerting"`
ResName string `json:"res_name"`
ResId string `json:"res_id"`
}
type AlertRecordDetails struct {
SAlertRecord
apis.StatusStandaloneResourceDetails
apis.StandaloneAnonResourceDetails
apis.ScopedResourceBaseInfo
ResNum int64 `json:"res_num"`
@@ -52,20 +53,6 @@ type AlertRecordDetails struct {
TriggerTime time.Time
}
func (self AlertRecordDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"alert_id": self.AlertId,
"alert_name": self.AlertName,
"domain_id": self.DomainId,
"project_domain": self.ProjectDomain,
"res_type": self.ResType,
"tenant": self.Tenant,
"tenant_id": self.TenantId,
}
return ret
}
type AlertRecordCreateInput struct {
apis.StandaloneResourceCreateInput
@@ -98,3 +85,26 @@ type AlertRecordRule struct {
SilentPeriod string `json:"silent_period"`
Reducer string `json:"reducer"`
}
type AlertRecordHistoryAlertData struct {
ProjectId string `json:"project_id"`
Project string `json:"project"`
DomainId string `json:"domain_id"`
Domain string `json:"domain"`
ResType string `json:"res_type"`
ResNum int64 `json:"res_num"`
}
func (self AlertRecordHistoryAlertData) GetMetricTags() map[string]string {
return map[string]string{
"tenant_id": self.ProjectId,
"domain_id": self.DomainId,
"domain": self.Domain,
"tenant": self.Project,
"res_type": self.ResType,
}
}
type AlertRecordHistoryAlert struct {
Data []AlertRecordHistoryAlertData `json:"data"`
}

View File

@@ -14,7 +14,11 @@
package monitor
import "yunion.io/x/onecloud/pkg/apis"
import (
"yunion.io/x/pkg/util/sets"
"yunion.io/x/onecloud/pkg/apis"
)
const EXT_PREFIX = "ext"
@@ -56,6 +60,18 @@ const (
)
var (
MetricCloudResTypes = sets.NewString(
METRIC_RES_TYPE_HOST,
METRIC_RES_TYPE_AGENT,
METRIC_RES_TYPE_GUEST,
METRIC_RES_TYPE_OSS,
METRIC_RES_TYPE_RDS,
METRIC_RES_TYPE_REDIS,
METRIC_RES_TYPE_TENANT,
METRIC_RES_TYPE_DOMAIN,
METRIC_RES_TYPE_STORAGE,
METRIC_RES_TYPE_CLOUDACCOUNT)
MetricResType = []string{METRIC_RES_TYPE_GUEST, METRIC_RES_TYPE_HOST, METRIC_RES_TYPE_REDIS, METRIC_RES_TYPE_OSS,
METRIC_RES_TYPE_RDS, METRIC_RES_TYPE_CLOUDACCOUNT}
MetricUnit = []string{METRIC_UNIT_PERCENT, METRIC_UNIT_BPS, METRIC_UNIT_MBPS, METRIC_UNIT_BYTEPS, "count/s",

View File

@@ -39,9 +39,10 @@ type MonitorResourceListInput struct {
apis.EnabledResourceBaseListInput
compute.ManagedResourceListInput
ResId []string `json:"res_id"`
ResType string `json:"res_type"`
OnlyResId bool `json:"only_res_id"`
ResId []string `json:"res_id"`
ResType string `json:"res_type"`
OnlyResId bool `json:"only_res_id"`
AlertStates []string `json:"alert_states"`
ResName string `json:"res_name"`
}

View File

@@ -19,10 +19,12 @@ type NotificationTemplateCreateInput struct {
}
type NotificationTemplateConfig struct {
Title string `json:"title"`
Name string `json:"name"`
ResourceName string `json:"resource_name"`
Matches []EvalMatch `json:"matches"`
Title string `json:"title"`
Name string `json:"name"`
ResourceName string `json:"resource_name"`
Matches []*EvalMatch `json:"matches"`
MatchTags []map[string]string `json:"match_tags"`
MatchTagsStr []string `json:"match_tags_str"`
// PrevAlertState AlertStateType `json:"prev_alert_state"`
// State AlertStateType `json:"state"`
NoDataFound bool `json:"no_data"`

View File

@@ -23,7 +23,7 @@ var (
UNIFIED_MONITOR_FIELD_OPT_TYPE = []string{"Aggregations", "Selectors"}
UNIFIED_MONITOR_GROUPBY_OPT_TYPE = []string{"time", "tag", "fill"}
UNIFIED_MONITOR_FIELD_OPT_VALUE = map[string][]string{
"Aggregations": {"MEAN", "SUM"}, // {"COUNT", "DISTINCT", "INTEGRAL", "MEAN", "MEDIAN", "MODE", "STDDEV", "SUM"},
"Aggregations": {"MEAN", "SUM", "MAX", "MIN"}, // {"COUNT", "DISTINCT", "INTEGRAL", "MEAN", "MEDIAN", "MODE", "STDDEV", "SUM"},
"Selectors": {"BOTTOM", "FIRST", "LAST", "MAX", "MIN", "TOP"},
}
UNIFIED_MONITOR_GROUPBY_OPT_VALUE = map[string][]string{
@@ -65,6 +65,27 @@ var (
}
)
func GetMeasurementTagIdKeyByResType(resType string) string {
return MEASUREMENT_TAG_ID[resType]
}
func GetMeasurementTagIdKeyByResTypeWithDefault(resType string) string {
tagId := GetMeasurementTagIdKeyByResType(resType)
if len(tagId) == 0 {
tagId = "host_id"
}
return tagId
}
func GetMeasurementResourceId(tags map[string]string, resType string) string {
return tags[GetMeasurementTagIdKeyByResType(resType)]
}
func GetResourceIdFromTagWithDefault(tags map[string]string, resType string) string {
tagId := GetMeasurementTagIdKeyByResTypeWithDefault(resType)
return tags[tagId]
}
type MetricFunc struct {
FieldOptType []string `json:"field_opt_type"`
FieldOptValue map[string][]string `json:"field_opt_value"`
@@ -86,6 +107,9 @@ type SimpleQueryInput struct {
EndTime time.Time `json:"end_time"`
// 指定标签
Tags map[string]string `json:"tag_pairs"`
// 间隔周期
// default: 5m
Interval string `json:"interval"`
}
type SimpleQueryOutput struct {
@@ -107,11 +131,12 @@ type TimeSeriesSlice []*TimeSeries
type TimeSeries struct {
// RawName is used to frontend displaying the curve name
RawName string `json:"raw_name"`
Columns []string `json:"columns"`
Name string `json:"name"`
Points TimeSeriesPoints `json:"points"`
Tags map[string]string `json:"tags,omitempty"`
RawName string `json:"raw_name"`
Columns []string `json:"columns"`
Name string `json:"name"`
Points TimeSeriesPoints `json:"points"`
Tags map[string]string `json:"tags,omitempty"`
CloudTags map[string]string `json:"cloud_tags,omitempty"`
}
type TimePoint []interface{}
@@ -145,11 +170,35 @@ func (p TimePoint) IsValids() bool {
}
func (p TimePoint) Value() float64 {
return *(p[0].(*float64))
v := p[0]
if fval, ok := v.(*float64); ok {
return *fval
}
if ival, ok := v.(*int64); ok {
return float64(*ival)
}
if t, ok := v.(float64); ok {
return t
}
if t, ok := v.(int64); ok {
return float64(t)
}
return 0
}
func (p TimePoint) Timestamp() float64 {
return p[len(p)-1].(float64)
v := p[len(p)-1]
if t, ok := v.(float64); ok {
return t
}
if t, ok := v.(int64); ok {
return float64(t)
}
return 0
}
func (p TimePoint) Time() time.Time {
return time.UnixMilli(int64(p.Timestamp()))
}
func (p TimePoint) Values() []float64 {

View File

@@ -29,11 +29,11 @@ type SAlert struct {
apis.SStatusStandaloneResourceBase
SMonitorScopedResource
// Frequency is evaluate period
Frequency int64 `json:"frequency"`
Settings jsonutils.JSONObject `json:"settings"`
Level string `json:"level"`
Message string `json:"message"`
UsedBy string `json:"used_by"`
Frequency int64 `json:"frequency"`
Settings *AlertSetting `json:"settings"`
Level string `json:"level"`
Message string `json:"message"`
UsedBy string `json:"used_by"`
// Silenced bool
ExecutionError string `json:"execution_error"`
// If an alert rule has a configured `For` and the query violates the configured threshold

View File

@@ -214,9 +214,10 @@ type SNotifyConfigContent struct {
Username string
SenderAddress string
//Lark
AppId string
AppSecret string
AccessToken string
AppId string
AppSecret string
AccessToken string
AccessTokenExpireTime time.Time
// workwx
AgentId string
CorpId string

View File

@@ -66,6 +66,7 @@ var (
ActionIsolatedDeviceUpdate SAction = "isolated_device_update"
ActionIsolatedDeviceDelete SAction = "isolated_device_delete"
ActionStatusChanged SAction = "status_changed"
ActionRunTask SAction = "run_task"
ResultFailed SResult = "failed"
ResultSucceed SResult = "succeed"

View File

@@ -102,6 +102,8 @@ type NotificationManagerEventNotifyInput struct {
// description: direct contact, admin privileges required
// required: false
Contacts []SContact `json:"contacts"`
// 消息机器人列表
RobotIds []string `json:"robot_ids"`
// description: contact types
// required: false
// example: email

View File

@@ -90,6 +90,9 @@ type ScheduleInput struct {
// For Migrate
CpuNumaPin []SCpuNumaPin `json:"cpu_numa_pin"`
// GuestIds
GuestIds []string `json:"guest_ids"`
HostMemPageSizeKB int `json:"host_mem_page_size"`
SkipKernelCheck *bool `json:"skip_kernel_check"`
TargetHostKernel string `json:"target_host_kernel"`

View File

@@ -38,4 +38,8 @@ const (
CLOUDPODS = "cloudpods"
PROXMOX = "proxmox"
VOLC_ENGINE = "volcengine"
BAIDU = "baidu"
SANGFOR = "sangfor"
CNWARE = "cnware"
KSYUN = "ksyun"
)

View File

@@ -23,7 +23,6 @@ import (
"encoding/base64"
"fmt"
"io"
"io/ioutil"
olog "log"
"math/rand"
"net"
@@ -78,6 +77,8 @@ type Application struct {
isTLS bool
enableProfiling bool
allowTLS1x bool
}
const (
@@ -92,13 +93,13 @@ const (
var quitHandlerRegisted bool
func NewApplication(name string, connMax int, db bool) *Application {
func NewApplication(name string, connMax int, queueSize int, db bool) *Application {
app := Application{name: name,
context: ctx.CtxWithTime(),
connMax: connMax,
session: NewWorkerManager("HttpRequestWorkerManager", connMax, DEFAULT_BACKLOG, db),
readSession: NewWorkerManager("HttpGetRequestWorkerManager", connMax, DEFAULT_BACKLOG, db),
systemSession: NewWorkerManager("InternalHttpRequestWorkerManager", 1, DEFAULT_BACKLOG, false),
session: NewWorkerManager("HttpRequestWorkerManager", connMax, connMax*queueSize, db),
readSession: NewWorkerManager("HttpGetRequestWorkerManager", connMax, connMax*queueSize, db),
systemSession: NewWorkerManager("InternalHttpRequestWorkerManager", 1, queueSize, false),
roots: make(map[string]*RadixNode),
rootLock: &sync.RWMutex{},
idleTimeout: DEFAULT_IDLE_TIMEOUT,
@@ -139,6 +140,12 @@ func (app *Application) SetDefaultTimeout(to time.Duration) *Application {
return app
}
func (app *Application) AllowTLS1x() *Application {
log.Infof("Allow TLS1.0&1.1")
app.allowTLS1x = true
return app
}
func SplitPath(path string) []string {
ret := make([]string, 0)
for _, seg := range strings.Split(path, "/") {
@@ -361,6 +368,7 @@ func (app *Application) defaultHandle(w http.ResponseWriter, r *http.Request, ri
w.Header().Set("Server", "Yunion AppServer/Go/2018.4")
w.Header().Set("X-Frame-Options", "SAMEORIGIN")
w.Header().Set("X-XSS-Protection", "1; mode=block")
w.Header().Set("X-Content-Type-Options", "nosniff")
if app.isTLS {
w.Header().Set("Strict-Transport-Security", "max-age=31536000; includeSubDomains")
}
@@ -406,11 +414,11 @@ func (app *Application) defaultHandle(w http.ResponseWriter, r *http.Request, ri
task.appParams.Request = r
task.appParams.Response = w
if r.Body != nil && r.ContentLength > 0 && getContentType(r) == ContentTypeJson {
data, _ := ioutil.ReadAll(r.Body)
data, _ := io.ReadAll(r.Body)
task.appParams.Body, _ = jsonutils.Parse(data)
r.Body = ioutil.NopCloser(bytes.NewBuffer(data))
r.Body = io.NopCloser(bytes.NewBuffer(data))
}
session.Run(
inqueue := session.Run(
task,
currentWorker,
func(err error) {
@@ -418,13 +426,17 @@ func (app *Application) defaultHandle(w http.ResponseWriter, r *http.Request, ri
task.fw.closeChannels()
},
)
runErr := task.fw.wait(task.ctx, currentWorker)
if runErr != nil {
switch je := runErr.(type) {
case *httputils.JSONClientError:
httperrors.GeneralServerError(task.ctx, w, je)
default:
httperrors.InternalServerError(task.ctx, w, "Internal server error")
if !inqueue {
httperrors.TooManyRequestsError(task.ctx, w, "Request queue is full")
} else {
runErr := task.fw.wait(task.ctx, currentWorker)
if runErr != nil {
switch je := runErr.(type) {
case *httputils.JSONClientError:
httperrors.GeneralServerError(task.ctx, w, je)
default:
httperrors.InternalServerError(task.ctx, w, "Internal server error")
}
}
}
task.fw.closeChannels()
@@ -469,6 +481,10 @@ func timeoutHandle(h http.Handler) http.HandlerFunc {
}
func (app *Application) initServer(addr string) *http.Server {
return InitHTTPServer(app, addr)
}
func InitHTTPServer(app *Application, addr string) *http.Server {
/* db := AppContextDB(app.context)
if db != nil {
db.SetMaxIdleConns(app.connMax + 1)
@@ -478,7 +494,18 @@ func (app *Application) initServer(addr string) *http.Server {
cipherSuites := []uint16{}
for _, suite := range tls.CipherSuites() {
cipherSuites = append(cipherSuites, suite.ID)
if !strings.HasSuffix(suite.Name, "_SHA") {
cipherSuites = append(cipherSuites, suite.ID)
}
}
minTLSVer := uint16(tls.VersionTLS12)
if app.allowTLS1x {
minTLSVer = tls.VersionTLS10
}
tlsConf := &tls.Config{
CipherSuites: cipherSuites,
MinVersion: minTLSVer,
}
s := &http.Server{
@@ -493,9 +520,7 @@ func (app *Application) initServer(addr string) *http.Server {
// issue like: https://github.com/megaease/easegress/issues/481
ErrorLog: olog.New(io.Discard, "", olog.LstdFlags),
TLSConfig: &tls.Config{
CipherSuites: cipherSuites,
},
TLSConfig: tlsConf,
}
return s
}
@@ -603,22 +628,6 @@ func (app *Application) listenAndServeInternal(s *http.Server, certFile, keyFile
}
}
func isJsonContentType(r *http.Request) bool {
contType := strings.ToLower(r.Header.Get("Content-Type"))
if strings.HasPrefix(contType, "application/json") {
return true
}
return false
}
func isFormContentType(r *http.Request) bool {
contType := strings.ToLower(r.Header.Get("Content-Type"))
if strings.HasPrefix(contType, "application/json") {
return true
}
return false
}
type TContentType string
const (

View File

@@ -49,7 +49,7 @@ type ApplicationTestSuit struct {
}
func (suite *ApplicationTestSuit) SetupTest() {
suite.app = NewApplication("test", 4, false)
suite.app = NewApplication("test", 4, 10, false)
suite.app.AddHandler("GET", "/delay", func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
time.Sleep(time.Second * 1)
Send(w, "delay pong")

View File

@@ -20,6 +20,8 @@ import (
"net/http"
"net/http/pprof"
"github.com/gorilla/mux"
"yunion.io/x/pkg/util/version"
)
@@ -85,3 +87,26 @@ func profSymbol(_ context.Context, w http.ResponseWriter, r *http.Request) {
func profTrace(_ context.Context, w http.ResponseWriter, r *http.Request) {
pprof.Trace(w, r)
}
func AddMiscHandlersToMuxRouter(app *Application, root *mux.Router, enableProfiling bool) {
adapterF := func(appHandleFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request)) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
appHandleFunc(app.GetContext(), w, r)
}
}
root.HandleFunc("/version", adapterF(VersionHandler))
root.HandleFunc("/stats", adapterF(StatisticHandler))
root.HandleFunc("/ping", adapterF(PingHandler))
root.HandleFunc("/worker_stats", adapterF(WorkerStatsHandler))
if enableProfiling {
pp := "/debug/pprof"
ppPath := func(sufix string) string {
return fmt.Sprintf("%s/%s", pp, sufix)
}
root.HandleFunc(ppPath(""), pprof.Index)
root.HandleFunc(ppPath("cmdline"), pprof.Cmdline)
root.HandleFunc(ppPath("profile"), pprof.Profile)
root.HandleFunc(ppPath("symbol"), pprof.Symbol)
root.HandleFunc(ppPath("trace"), pprof.Trace)
}
}

View File

@@ -188,6 +188,12 @@ func NewWorkerManager(name string, workerCount int, backlog int, dbWorker bool)
}
func NewWorkerManagerIgnoreOverflow(name string, workerCount int, backlog int, dbWorker bool, ignoreOverflow bool) *SWorkerManager {
if workerCount <= 0 {
workerCount = 1
}
if backlog <= 0 {
backlog = 128
}
manager := SWorkerManager{name: name,
queue: NewRing(workerCount * backlog),
workerCount: workerCount,
@@ -292,15 +298,14 @@ func (wm *SWorkerManager) scheduleWithLock() {
log.Debugf("no enough worker, add new worker %s", worker)
}
go worker.run()
} else if queueSize > 10 {
log.Warningf("[%s] BUSY activeWork %d detachedWork %d max %d queue: %d", wm, wm.ActiveWorkerCount(), wm.DetachedWorkerCount(), wm.workerCount, wm.queue.Size())
} else if queueSize > 50 {
w := wm.activeWorker.list.Front()
for w != nil {
if w != nil {
worker := w.Value.(*SWorker)
log.Warningf("work [%s]%s stucking for a while", worker.task.start, worker.task.task.Dump())
w = w.Next()
}
} else if queueSize > 10 {
log.Warningf("[%s] BUSY activeWork %d detachedWork %d max %d queue: %d", wm, wm.ActiveWorkerCount(), wm.DetachedWorkerCount(), wm.workerCount, wm.queue.Size())
}
}

View File

@@ -630,8 +630,10 @@ func (b *SBaremetalInstance) SaveDesc(ctx context.Context, desc jsonutils.JSONOb
b.descLock.Lock()
defer b.descLock.Unlock()
if desc != nil {
if desc != nil && b.desc != nil && b.desc.Contains("server_id") && !desc.Contains("server_id") {
desc.(*jsonutils.JSONDict).Set("server_id", jsonutils.NewString(b.server.GetId()))
if b.desc != nil && b.desc.Contains("server_id") && !desc.Contains("server_id") {
if b.server != nil {
desc.(*jsonutils.JSONDict).Set("server_id", jsonutils.NewString(b.server.GetId()))
}
}
b.desc = desc.(*jsonutils.JSONDict)
if b.desc.Contains("sys_info") {
@@ -1309,10 +1311,17 @@ func (b *SBaremetalInstance) GetTask() tasks.ITask {
}
func (b *SBaremetalInstance) SetTask(task tasks.ITask) {
// hack: clear exist tasks if task is server destroy task
if task.GetName() == tasks.BAREMETAL_SERVER_DESTROY_TASK {
log.Infof("clear tasks of baremetal %s before executing %s", b.GetName(), task.GetName())
b.taskQueue.ClearTasks()
}
b.taskQueue.AppendTask(task)
if reflect.DeepEqual(task, b.taskQueue.GetTask()) {
log.Infof("Set task equal, ExecuteTask %s", task.GetName())
log.Infof("Execute task %s of baremetal %s", task.GetName(), b.GetName())
tasks.ExecuteTask(task, nil)
} else {
log.Warningf("Append task %s of baremetal %s before executing %s", task.GetName(), b.GetName(), b.taskQueue.DebugString())
}
}

View File

@@ -78,7 +78,7 @@ func (s *BaremetalService) StartService() {
s.startAgent(app)
cron := cronman.InitCronJobManager(false, o.Options.CronJobWorkerCount)
cron := cronman.InitCronJobManager(false, o.Options.CronJobWorkerCount, o.Options.TimeZone)
cron.AddJobAtIntervals("BaremetalCronJobs", 10*time.Second, baremetal.DoCronJobs)
cron.Start()
defer cron.Stop()

View File

@@ -180,6 +180,25 @@ func (q *TaskQueue) AppendTask(task ITask) *TaskQueue {
return q
}
func (q *TaskQueue) ClearTasks() {
for {
existTask := q.PopTask()
if existTask != nil {
log.Warningf("Clear task %s", existTask.GetName())
} else {
break
}
}
}
func (q *TaskQueue) DebugString() string {
str := ""
for e := q.objList.Front(); e != nil; e = e.Next() {
str += fmt.Sprintf("%s, ", e.Value.(ITask).GetName())
}
return str
}
type TaskFactory func(userCred mcclient.TokenCredential, bm IBaremetal, taskId string, data jsonutils.JSONObject) ITask
type SBaremetalTaskBase struct {

View File

@@ -26,6 +26,10 @@ import (
var _ IServerBaseDeployTask = new(SBaremetalServerDestroyTask)
const (
BAREMETAL_SERVER_DESTROY_TASK = "BaremetalServerDestroyTask"
)
type SBaremetalServerDestroyTask struct {
SBaremetalServerBaseDeployTask
}
@@ -45,7 +49,7 @@ func NewBaremetalServerDestroyTask(
}
func (self *SBaremetalServerDestroyTask) GetName() string {
return "BaremetalServerDestroyTask"
return BAREMETAL_SERVER_DESTROY_TASK
}
func (self *SBaremetalServerDestroyTask) RemoveEFIOSEntry() bool {

View File

@@ -40,7 +40,13 @@ menuentry 'YunionOS for PXE' --class os {
`, sleepTime, kernel, kernel, kernelArgs, initrd, initrd)
}
// REF: https://github.com/bluebanquise/infrastructure/blob/master/packages/ipxe-bluebanquise/grub2-efi-autofind.cfg
var (
BOOT_EFI_MATCHER = "(hd*,gpt*)/EFI/BOOT/BOOTX64.EFI (hd*,msdos*)/EFI/BOOT/BOOTX64.EFI (hd*,gpt*)/EFI/BOOT/BOOTAA64.EFI (hd*,msdos*)/EFI/BOOT/BOOTAA64.EFI"
GRUB_EFI_MATCHER = "(md*)/EFI/*/shimx64.efi (md*)/EFI/*/grubx64.efi (hd*,gpt*)/EFI/*/shimx64.efi (hd*,msdos*)/EFI/*/shimx64.efi (hd*,gpt*)/EFI/*/grubx64.efi (hd*,mosdos*)/EFI/*/grubx64.efi (hd*,gpt*)/EFI/*/shimaa64.efi (hd*,msdos*)/EFI/*/shimaa64.efi (hd*,gpt*)/EFI/*/grubaa64.efi (hd*,mosdos*)/EFI/*/grubaa64.efi"
GRUB_CFG_MATCHER = "(md*)/boot/*/grub.cfg (md*)/*/grub.cfg (md*)/grub.cfg (md*)/EFI/*/grub.cfg (md*)/EFI/*/*/grub.cfg (hd*,gpt*)/boot/*/grub.cfg (hd*,gpt*)/*/grub.cfg (hd*,gpt*)/grub.cfg (hd*,gpt*)/EFI/*/grub.cfg (hd*,gpt*)/EFI/*/*/grub.cfg (hd*,mosdos*)/boot/*/grub.cfg (hd*,mosdos*)/*/grub.cfg (hd*,mosdos*)/grub.cfg (hd*,mosdos*)/EFI/*/grub.cfg (hd*,mosdos*)/EFI/*/*/grub.cfg"
)
// REF: https://github.com/bluebanquise/infrastructure/blob/master/packages/bluebanquise-ipxe/grub2-efi-autofind.cfg
const autoFindCfg = `
echo "Loading modules..."
insmod part_gpt
@@ -48,34 +54,114 @@ insmod fat
insmod chain
insmod part_msdos
insmod ext2
insmod regexp
insmod xfs
insmod mdraid1x
insmod mdraid09
echo
echo "Scanning, first pass..."
for cfg in (*,gpt*)/efi/*/grub.cfg (*,gpt*)/efi/*/*/grub.cfg (*,gpt*)/grub.cfg (*,gpt*)/*/grub.cfg (*,gpt*)/*/*/grub.cfg (*,msdos*)/grub.cfg (*,msdos*)/*/grub.cfg (*,mosdos*)/*/*/grub.cfg; do
regexp --set=1:cfg_device '^\((.*)\)/' "${cfg}"
echo "======================= lsmod ======================================="
lsmod
echo
echo "======================= devices ====================================="
ls
echo
echo "======================= Searching for the BOOT EFI executable ======="
echo "Scanning, 1st pass"
for efi in %s; do
regexp --set=1:root '^\(([^)]+)\)/' "${efi}"
echo "- Scanning: $efi"
if [ -e "$efi" ] ; then
echo " Found: $efi"
else
echo " $efi does not exist"
fi
done
echo "Scanning, second pass..."
for cfg in (*,gpt*)/efi/*/grub.cfg (*,gpt*)/efi/*/*/grub.cfg (*,gpt*)/grub.cfg (*,gpt*)/*/grub.cfg (*,gpt*)/*/*/grub.cfg (*,msdos*)/grub.cfg (*,msdos*)/*/grub.cfg (*,mosdos*)/*/*/grub.cfg; do
regexp --set=1:cfg_device '^\((.*)\)/' "${cfg}"
echo "Try configfile ${cfg}"
if [ -e "${cfg}" ]; then
cfg_found=true
echo " >> Found operating system grub config! <<"
echo " Path: ${cfg}"
echo " Booting in 5s..."
sleep --interruptible --verbose 5
configfile "${cfg}"
echo
echo "Scanning, 2nd pass..."
for efi in %s; do
echo "- Scanning: $efi"
if [ -e "$efi" ] ; then
regexp --set 1:root '^\(([^)]+)\)/' "${efi}"
echo " Found: $efi"
echo " Root: $root"
echo " Chainloading $efi"
chainloader "$efi"
boot
fi
done
echo "No grub.cfg known OS found. Fall back on shell after 5s."
sleep 5s
echo
echo " Found no BOOT EFI executable. Falling back to shell..."
echo
echo "======================= Searching for Grub EFI executables =========="
echo "Scanning, 1st pass"
for efi in %s ; do
regexp --set=1:root '^\(([^)]+)\)/' "${efi}"
echo "- Scanning: $efi"
if [ -e "$efi" ] ; then
echo " Found: $efi"
else
echo " $efi does not exist"
fi
done
echo
echo "Scanning, 2nd pass..."
for efi in %s ; do
echo "- Scanning: $efi"
if [ -e "$efi" ] ; then
regexp --set 1:root '^\(([^)]+)\)/' "${efi}"
echo " Found: $efi"
echo " Root: $root"
echo " Chainloading $efi"
chainloader "$efi"
boot
fi
done
echo
echo " Found no Grub EFI executable to load an OS."
echo
echo "======================= Searching for grub.cfg on local disks ======="
echo "Scanning, 1st pass..."
for grubcfg in %s ; do
regexp --set=1:root '^\(([^)]+)\)/' "${grubcfg}"
if [ -e "$grubcfg" ] ; then
echo " Found: $grubcfg"
else
echo " $grubcfg does not exist"
fi
done
echo
echo "Scanning, 2nd pass..."
for grubcfg in %s ; do
echo "- Scanning: $grubcfg"
if [ -e "${grubcfg}" ]; then
regexp --set=1:root '^\(([^)]+)\)/' "${grubcfg}"
echo " Found: $grubcfg"
echo " Root: $root"
# echo " Contents:"
# cat "$grubcfg"
configfile "${grubcfg}"
boot
fi
done
echo
echo " Found no grub.cfg configuration file to load."
sleep 4s
`
func GetAutoFindConfig() string {
return autoFindCfg
return fmt.Sprintf(autoFindCfg, BOOT_EFI_MATCHER, BOOT_EFI_MATCHER, GRUB_EFI_MATCHER, GRUB_EFI_MATCHER, GRUB_CFG_MATCHER, GRUB_CFG_MATCHER)
}
// REF: https://archived.forum.manjaro.org/t/detecting-efi-files-and-booting-them-from-grub/38083

View File

@@ -445,13 +445,13 @@ func (adapter *MegaRaidAdaptor) GetDevices() []*baremetal.BaremetalStorage {
func (adapter *MegaRaidAdaptor) GetLogicVolumes() ([]*raiddrivers.RaidLogicalVolume, error) {
errs := make([]error, 0)
megaLvs, err := adapter.getMegacliLogicVolumes()
if err != nil {
errs = append(errs, err)
megaLvs, megacliErr := adapter.getMegacliLogicVolumes()
if megacliErr != nil {
errs = append(errs, megacliErr)
}
storeLvs, err := adapter.getStorcliLogicVolums()
if err != nil {
errs = append(errs, err)
storeLvs, storcliErr := adapter.getStorcliLogicVolums()
if storcliErr != nil {
errs = append(errs, storcliErr)
}
if len(megaLvs) > 0 {
return megaLvs, nil
@@ -459,7 +459,7 @@ func (adapter *MegaRaidAdaptor) GetLogicVolumes() ([]*raiddrivers.RaidLogicalVol
if len(storeLvs) > 0 {
return storeLvs, nil
}
if len(errs) == 0 {
if len(errs) == 0 || megacliErr == nil || storcliErr == nil {
// no error, no volume
return []*raiddrivers.RaidLogicalVolume{}, nil
}

View File

@@ -54,6 +54,6 @@ func performImageCache(
return
}
hostutils.DelayTask(ctx, performTask, disk)
hostutils.DelayImageCacheTask(ctx, performTask, disk)
hostutils.ResponseOk(ctx, w)
}

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