Compare commits

...

562 Commits

Author SHA1 Message Date
Zexi Li
8838aaf84b fix(llm): 修复 llm 镜像没有根据 sku 更新的问题 (#24573) 2026-03-26 21:45:06 +08:00
Jian Qiu
199a669d19 fix: compat fixes for container host in vm (#24571)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-26 18:23:06 +08:00
屈轩
789c571703 fix(logger): add syslog init log (#24556) 2026-03-26 18:11:05 +08:00
wanyaoqi
af4f1d522a fix(region): validate kickstart enabled (#24559) 2026-03-26 18:09:57 +08:00
Zexi Li
a52c9b8a3b fix(region): order containers by created_at time (#24569) 2026-03-26 12:25:46 +08:00
Zexi Li
0e369eef9f fix(keystone): allow blob update for image credentials (#24566)
Also fix type check to allow secret/image only.
2026-03-26 11:50:51 +08:00
屈轩
86d531bf4e fix(region): add domain container usage (#24563) 2026-03-25 18:26:44 +08:00
Zexi Li
a53f8d0095 fix(vllm): user customize args & health check in hostlocal net (#24552)
Co-authored-by: cwz <cwz_eikoh@163.com>
2026-03-25 10:36:34 +08:00
wanyaoqi
8d5310f9e9 Automated cherry pick of #24544: fix(host): metadata handler proxy telegraf data fix tenant_id (#24546)
* fix(host): metadata handler proxy telegraf data

* fix(host): append unknown dmesg to last entry
2026-03-25 10:34:34 +08:00
Jian Qiu
1e5bab79f8 fix: lbagent genHaproxyConfig possible nil pointer panic (#24538)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-25 10:32:56 +08:00
Jian Qiu
6310c1e4a6 fix(hostmetrics): add checks for incomplete pod and container stats (#24550)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-25 10:31:20 +08:00
屈轩
51e3e7feb9 fix(region): add container usage (#24541) 2026-03-25 10:23:21 +08:00
屈轩
2c32ed9b85 fix(host-image): update script for riscv64 host-image (#24534) 2026-03-24 11:37:31 +08:00
Zexi Li
75c546050f fix(host): probing multiple container status (#24530) 2026-03-24 10:27:16 +08:00
wanyaoqi
4f91a82f12 fix(host): dd zero to lv wife partitions on lvremove (#24526) 2026-03-23 19:02:04 +08:00
wanyaoqi
c14170ff8f fix(host-deployer): resizefs add fstype LVM2_member (#24518) 2026-03-23 00:01:13 +08:00
wanyaoqi
6f23751754 fix(region): check instance snapshot joint is nil on snapshot purge (#24514) 2026-03-22 23:59:26 +08:00
屈轩
ece4993df6 fix(apigateway): stream download content-type (#24509) 2026-03-20 13:41:45 +08:00
Jian Qiu
fec1f2495b feature: support host-local wire (#24498)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-20 01:36:59 +08:00
wanyaoqi
e42d360bb5 Automated cherry pick of #24452: Cherry pick of #23094 upstream release 4.0 1770106850 (#24464)
* feat(region, climc): Add kickstart parameters and metadata

- Add kickstart parameters and metadata support
- Add kickstart CLI options and management commands
- Set kickstart metadata in PostCreate
- Add related kickstart metadata fields

* feat(host): Implement automated VM installation

- Mounts the installation ISO to a unique temp path, reusing existing mounts.
- Extracts kernel (`vmlinuz`, `initrd`) to configure QEMU boot.
- Injects kernel parameters to trigger the autoinstall.
- Add kickstart configuration validation.

Modified `guestLauncher` script to handle kernel parameters with spaces
that were previously truncated by the Python script.

* feat(host): Implement Kickstart monitoring

- Automatically updates the VM status upon
receiving `KICKSTART_SUCCESS` or `KICKSTART_FAILED` signals.
- On success, cleans up temporary mount points
and restarts the server via the Region API.

* feat(region): add kickstart type metadata

Adds the `VM_METADATA_KICKSTART_TYPE` to distinguish between
kickstart configurations passed by URL or by direct content.

* feat(host): Handle kickstart installing and timeout

- Set status to 'installing' upon successful kickstart boot
- Handle KICKSTART_INSTALLING serial message for status updates
- Add timeout handling for kickstart status monitoring

* feat(host): provide Kickstart config via content

Embed the provided config content as a file in a
labeled ISO (mkisofs), then mount the ISO during
the Kickstart installation to supply the config.

* refactor(host): Enhance the kickstart installation

- Integrates kickstart status directly into the VM status, replacing metadata.
- Unifies locations for kickstart logs and temporary files.
- Uses regex for more robust status matching.
- Moves helper functions to `kickstart_helper.go`.
- Fixes an incorrect kickstart configuration filename.
- Adjusts kickstart logging.

* feat(region, host): add kickstart support for openEuler

* refactor(host): extract kickstart cleanup function

* feat(region, climc): add kickstart-complete cli

Add this command to manually update the kickstart status and
reboot VM if needed. This is mainly used by users to manually
update the kickstart status when kickstart status detection is abnormal.

* refactor(region): reduce code duplication in Kickstart validation

- unify two validateKickstartConfig functions
- extract determineKickstartType function for type determination

* fix(region, host): fix kickstart auto-reboot

- Adjusted the timing of setting the status to
`kickstart_pending` to avoid incorrect reboot checks
- Skip setting kickstart if the status is already
`kickstart_completed` to prevent unnecessary reboots
- Added cleanup of kickstart files upon VM deletion

* feat(host): download kickstart config from URL

- download content when passing config via URL
- unified boot parameters

* feat(host): copy kickstart kernel files

* feat(host): ensure kickstart completion signal in config

---------

Co-authored-by: happygame <happygame1024@gmail.com>
2026-03-20 01:35:42 +08:00
wanyaoqi
6ea800897e Automated cherry pick of #24456: Fix/host deployer nbd driver40 (#24465)
* fix(host-deployer): nbd add concurrency control

* fix(host-deployer,glance): windows image add current version
2026-03-20 01:32:19 +08:00
Zexi Li
f1740579f1 feat(llm): unify container access url info and login response (#24506) 2026-03-19 23:07:01 +08:00
wanyaoqi
da37f6836a fix(host-deployer): get resize dev by serial panic (#24447) 2026-03-19 23:04:13 +08:00
cwz_eikoh
e701abe273 Automated cherry pick of #24471: Feature(mcp): support x-api-key authentication for mcp-server (#24501)
* feat(mcp-server): support base64 ak/sk

* fix(mcp-agent): try to fix route of default-mcp-tools
2026-03-19 15:04:57 +08:00
cwz_eikoh
e51be81c7e feat(llm): support model import for vllm (#24502) 2026-03-19 15:03:41 +08:00
wanyaoqi
5649836123 Automated cherry pick of #24473: fix(glance): cache images to ceph add brand filter (#24477)
* fix(glance): cache images to ceph add brand filter

* fix(region): iso image support default uefi boot mod
2026-03-19 11:45:18 +08:00
Jian Qiu
590a775cd8 fix: logger add app-options-show api (#24494)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-19 11:44:05 +08:00
屈轩
184de997c5 fix(region): allow set disk auto-delete attribute (#24487) 2026-03-19 10:27:52 +08:00
Zexi Li
c7b7911401 fix(llm): derive openclaw auth password from llm id (#24483) 2026-03-18 19:01:10 +08:00
屈轩
5250d2b647 fix(region): vendor update (#24484) 2026-03-18 18:52:10 +08:00
wanyaoqi
da094dbb5e fix(baremetal-agent): bm register reuse baseprepare updateBmInfo (#24476) 2026-03-18 10:11:00 +08:00
Zexi Li
3b031ebdca fix(monitor): align multi-metric alert conditions in notifications (#24469) 2026-03-17 15:57:27 +08:00
屈轩
93ea44d336 fix: add more log info (#24462) 2026-03-17 14:39:04 +08:00
Zexi Li
bdbe0642a0 feat(llm): add llm_types filters and cleanup dify cli (#24459) 2026-03-16 18:05:20 +08:00
Zexi Li
e6e4b70b6f feat(llm): 调整 openclaw 容器与 LLM 基础模型/sku 逻辑 (#24454) 2026-03-16 16:19:46 +08:00
Zexi Li
4b91e6235c fix(llm): mount openclaw home dir (#24450) 2026-03-13 20:38:37 +08:00
屈轩
c8a6867c10 fix(region): avoid delete ksyun vm error (#24442) 2026-03-13 15:23:17 +08:00
Jian Qiu
1673cf3fca fix: compat fixes for container host in vm (#24444)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-13 13:26:50 +08:00
cwz_eikoh
140054c927 Automated cherry pick of #24338: feat(llm): init vllm as llm_container (#24436)
* feat(llm): init vllm as llm_container

* feat(vllm): fix save-instant-model for vllm

* feat(llm): support quick-model for vllm

* feat(vllm): support preferred-model in llm

* fix(llm): add ValidateSpec in llm_container_driver

* feat(vllm): auto-set vllm params
2026-03-13 11:07:09 +08:00
Zexi Li
fc33607c0e feat(host): rotate container logs (#24434) 2026-03-12 15:15:24 +08:00
Zexi Li
1b276b02cb feat(llm): add login-info api (#24430) 2026-03-12 07:21:01 +08:00
wanyaoqi
8543f3735d fix(region): guestnetworksecgroup list add network info (#24393) 2026-03-11 19:31:52 +08:00
wanyaoqi
5dd913b40f fix(host): check file exist before copy ovmf vars (#24366) 2026-03-11 19:29:43 +08:00
Zexi Li
bfca09016e feat(llm): restart action (#24428) 2026-03-11 19:08:42 +08:00
屈轩
d1dec1d4bb fix(cloudmon): update volc api (#24424) 2026-03-11 16:54:50 +08:00
Zexi Li
129e15e52f Automated cherry pick of #24411: openclaw llm agent (#24419)
* support comfyui and openclaw

feat(region,host): support env credential of container

feat(llm): openclaw url

* fix(region): delete server without host_id

* feat(llm): llm spec
2026-03-11 15:21:17 +08:00
屈轩
f832e211bd fix(monitor): add vm out bandwidth metric (#24418) 2026-03-11 13:49:59 +08:00
屈轩
d1351b84c7 fix(region): vendor update (#24414) 2026-03-11 11:03:23 +08:00
屈轩
36afb063ef fix(region): persistence server status change (#24408) 2026-03-10 15:06:42 +08:00
Zexi Li
8bce8e4e17 Automated cherry pick of #24399: feat(llm): polymetric dify with llm (#24406)
* feat(llm): polymetric dify with llm

* fix(llm): drop LLMSpecHolder & fix some bugs

---------

Co-authored-by: cwz <cwz_eikoh@163.com>
2026-03-10 10:23:54 +08:00
Zexi Li
92b77d1f4d fix(region): associate eip to pod (#24403) 2026-03-09 15:24:09 +08:00
Zexi Li
d9229dae60 fix(monitor): 仅在 From/To/Interval 为空时设置默认值 (#24397)
setDefaultValue 中 From、To、Interval 改为仅在当前值为空时
才用 inputQuery 覆盖,避免覆盖用户已指定的查询时间范围与间隔
2026-03-06 19:13:30 +08:00
Zexi Li
af117c4f4b fix(host): hard code start index of va gpu (#24390) 2026-03-05 11:55:15 +08:00
Zexi Li
2e89fd9f95 feat(host): cgroupv2 implemented for pod (#24387) 2026-03-04 11:21:49 +08:00
cwz_eikoh
e9c33ccb09 Automated cherry pick of #24355: fix: some bugs in mcp-agent & llm (#24382)
* fix(mcp-agent): encoding issue when simulated streaming

* fix(mcp-agent): use chat-stream in phase tool-choose

* fix(mcp-agent): support reasoning model

* fix(llm): add pre-delete detection

* feat(mcp-agent): add default mcp-agent

* feat(mcp-agent): add default-mcp-tools
2026-03-03 16:07:43 +08:00
cwz_eikoh
cc7e6fca79 Automated cherry pick of #24354: feat(mcp-server): add mcp-server config (#24386)
* feat(mcp-server): add mcp-server config

* fix(mcp-agent): add claude mcp-server-config
2026-03-03 16:06:28 +08:00
屈轩
aaf93d316d fix(esxi-agent): vendor update for rebuild root fail (#24381) 2026-03-03 00:18:37 +08:00
Zexi Li
734e73da54 feat(monitor): support disable_notify_recovery for commonalert (#24376) 2026-03-02 16:13:00 +08:00
屈轩
bfd9d30689 fix(region): check bind disk resource (#24374) 2026-03-02 12:03:03 +08:00
屈轩
d9d0819e94 fix(region): snapshot size opslog (#24370) 2026-02-28 17:00:41 +08:00
屈轩
f5facd4c0a fix(region): avoid sync remove disk (#24363) 2026-02-27 15:06:53 +08:00
屈轩
465ffb8977 fix(ansibleserver): update telegraf (#24360) 2026-02-27 14:06:52 +08:00
Jian Qiu
9799dcadf8 fix: allow uncache deleted image (#24350)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-26 23:08:03 +08:00
wanyaoqi
39cbadd2b8 fix(host): add guest max mem size options (#24343) 2026-02-26 20:26:58 +08:00
Zexi Li
817673bbc5 fix(monitor): convert SNodeAlert to SCommonAlert in FetchCustomizeColumns (#24346)
Pass cObjs of type *SCommonAlert to SCommonAlertManager.FetchCustomizeColumns
instead of *SNodeAlert so the parent correctly fetches common alert columns.
2026-02-25 19:32:09 +08:00
Jian Qiu
f7161ae1bf fix: keep climc network-create backward compatibility (#24339)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-25 09:03:19 +08:00
屈轩
42b5913416 fix(region): avoid account sync cost time abnormal (#24335) 2026-02-24 17:33:57 +08:00
Jian Qiu
2e90864f32 fix: instance snapshot virtual size (#24329)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-24 09:23:28 +08:00
Zexi Li
15ea182d65 fix(region): wrong args type on callback function of DiskCreateTask (#24331) 2026-02-13 17:05:31 +08:00
Zexi Li
3c4f838bbb fix(host): do not set cached image status to active for TGZ on host (#24325)
TGZ images are unpacked after fetch on host; leave status update to region
StorageCacheImageTask so cachedimage becomes active only in OnCacheSucc.
2026-02-13 10:05:23 +08:00
Jian Qiu
bbcdc46a82 fix: ensure s3 client init for s3 storage driver (#24322)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-12 10:01:32 +08:00
Zexi Li
67ad215c00 feat(region,host): support post overlay uppper config (#24317) 2026-02-11 16:57:36 +08:00
屈轩
7d1f917f0d fix(yunionconf): policy scope (#24315) 2026-02-11 11:23:56 +08:00
wanyaoqi
673bae1853 fix(host): set dmesg parse failed log level to debug (#24310) 2026-02-11 00:58:57 +08:00
wanyaoqi
2dad4c9162 fix(host-deployer): deploy single disk has no disk id (#24305) 2026-02-10 19:36:09 +08:00
wanyaoqi
093a497f63 Automated cherry pick of #24301: fix(host-deployer): online resize loop dev (#24302)
* fix(host-deployer): online resize loop dev

* fix(host-deployer): update host-deployer-base
2026-02-10 17:07:58 +08:00
Zexi Li
bdbb3e71e0 Automated cherry pick of #24290: feat(monitor): support alert reason notification (#24294)
* feat(monitor): support alert reason notification

* fix(climc): commonalert list options
2026-02-10 09:06:35 +08:00
Jian Qiu
1eb46d87e1 fix: guest syncstatus subtask for disk create task (#24293)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-10 09:03:33 +08:00
屈轩
050d940832 fix(notify): notify receiver (#24298) 2026-02-09 20:42:44 +08:00
Jian Qiu
e7caa1f6e2 fix: remove parent task info from task context (#24284)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-09 13:22:18 +08:00
wanyaoqi
1667655c28 fix(host): add device_id only scsi-hd device (#24280) 2026-02-09 11:26:53 +08:00
wanyaoqi
36e4f22d37 fix(host): deploy nics config defore do add nics (#24277) 2026-02-09 08:37:54 +08:00
Jian Qiu
55e355860c fix: unify lb charge type (#24273)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-08 18:43:31 +08:00
Jian Qiu
3a53b034ba feature: support postpaid traffic metering (#24270)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-08 12:58:02 +08:00
wanyaoqi
24b1bc9c38 feat(region,host,vpcagent): allow guest network dedicate secgroups (#24262) 2026-02-07 17:31:55 +08:00
wanyaoqi
11ceadfcf2 fix(region,host): rbd snapshot get actual size (#24241)
- add host down and auto migrate notification
2026-02-07 17:31:06 +08:00
屈轩
f8611bb9f0 fix(region): vendor update (#24266) 2026-02-07 13:52:12 +08:00
wanyaoqi
aa5f56b225 fix(region,host): rename screen dump info structure (#24259) 2026-02-06 18:09:12 +08:00
cwz_eikoh
1868c64c2f fix(llm): add handler in apigateway for mcp-agent-chat (#24255) 2026-02-05 18:17:03 +08:00
屈轩
d5e86b770b fix(region): snapshot policy operation (#24248) 2026-02-05 16:40:29 +08:00
wanyaoqi
9c77f44b94 fix(glance): set s3 bucket name before s3 init check (#24238) 2026-02-04 23:07:44 +08:00
屈轩
2ea2e74464 fix(yunionconf): support tags (#24232) 2026-02-04 17:14:02 +08:00
屈轩
97c6af0dab fix(region): public cloud sku create (#24227) 2026-02-04 14:57:03 +08:00
屈轩
2c2fe1bb16 fix(region): support cloudpods vm disk driver (#24222) 2026-02-04 14:28:13 +08:00
Zexi Li
b6622f1fde fix(region,climc): persist netinterface vlan_id to hostnetwork (#24215)
- climc: add VlanId to host-add-netif, host-remove-netif, host-enable-netif,
  host-disable-netif
- region: set bn.VlanId from netif.VlanId when attaching to network
- mcclient: include Vlan_ID in baremetalnetworks list columns
2026-02-04 11:03:27 +08:00
屈轩
82c5ab2fb1 fix(host): support skip check kernel mod (#24219) 2026-02-04 10:30:07 +08:00
屈轩
10bdd3c05d fix(region): avoid duplicate check when update account aksk (#24210) 2026-02-03 20:53:21 +08:00
Zexi Li
02370a6529 Automated cherry pick of #24194: Fix(llm): some mistakes, use CmpId & InstantModelId insteadof SvrId & ModelId (#24206)
* fix(llm): some mistakes

* fix(llm): use CmpId instead of SvrId

* fix(llm): instant_model use id instead of modelId

---------

Co-authored-by: cwz <cwz_eikoh@163.com>
2026-02-03 16:46:17 +08:00
Zexi Li
24012af0d7 fix(monitor): comparator string (#24203) 2026-02-03 12:01:48 +08:00
屈轩
fd12d54130 fix(region): init snapshot policy disk table (#24199) 2026-02-02 20:38:34 +08:00
wanyaoqi
aa4cfa6688 fix(host): guestnetworksync do nothing on detach vfio nic (#24179) 2026-02-02 20:18:21 +08:00
Jian Qiu
1d58d47425 fix: allow guestnetwork ip4 addr field nullable (#24192)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-02 20:15:45 +08:00
Zexi Li
bdc91273e1 feat(monitor): add the registered model manger function (#24196) 2026-02-02 17:51:24 +08:00
屈轩
f3f21962ab fix(climc): sku create support arch (#24187) 2026-02-02 14:17:14 +08:00
屈轩
c7cdb0297a fix(notify): support webhook sign (#24181) 2026-02-02 12:53:50 +08:00
wanyaoqi
0d58a6228a Automated cherry pick of #24126: feat(region,host): riscv64 cpu arch support (#24175)
* feat(region,host): riscv64 cpu arch support

* fix(region,host): compatible riscv64

* fix(host): add qemu v10.0.7 support
2026-02-01 20:28:32 +08:00
wanyaoqi
348fcdfca9 fix(host): live migrate add timeout (#24163) 2026-02-01 20:24:31 +08:00
wanyaoqi
83814d3c84 fix(region): server add set network num queues (#24167) 2026-02-01 20:12:56 +08:00
wanyaoqi
4b4ee6aa64 fix(glance): set glance s3 bucket name default onecloud-images (#24172) 2026-02-01 20:10:27 +08:00
屈轩
2f91466ab4 fix(region): defer ctx cancel (#24155) 2026-01-30 19:11:45 +08:00
cwz_eikoh
2d99794806 Automated cherry pick of #24149: Fix(llm): fix bugs & apikey encrypt & support history for mcp-agent-chat & delete modelname in llmSku (#24151)
* fix(llm): mcp-agent apiKey encrypt

* fix(llm): error-handle when instant-model import

* feature(llm): add get-available-network for llm

* feature(llm): support history for mcp-agent-chat

* fix(llm): llm create with net instead of networktype & networkid

* fix(llm): delete modelName in llmSku & fix some bugs
2026-01-29 10:58:41 +08:00
wanyaoqi
15318ac0ea fix(region): have agent add check is telegraf deployed (#24147) 2026-01-29 10:34:38 +08:00
屈轩
1786b05c3a fix(region): billing resource create time (#24141) 2026-01-28 19:59:53 +08:00
屈轩
75d2af1a6a fix(glance): support prob iso image (#24134) 2026-01-28 15:29:03 +08:00
Zexi Li
0bb65d75e5 fix(llm): add community-registry api (#24132) 2026-01-28 14:31:05 +08:00
Jian Qiu
81a336ea41 fix: skip baremetal-agent riscv64 (#24124)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-24 20:32:28 +08:00
屈轩
0c9d242f34 fix(region): vendor update (#24119) 2026-01-23 17:03:37 +08:00
屈轩
db2932e20c fix(region): cloudpods container sync (#24114) 2026-01-21 15:35:16 +08:00
Jian Qiu
2d4a3da562 fix: update vendor 4.0.2 20260121 (#24110)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-21 13:57:24 +08:00
Jian Qiu
0cbdf68df3 fix: notify receiver update precedure recode (#24100)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-20 00:16:06 +08:00
wanyaoqi
28bbdd3061 fix(host): ensure scsi pci addr on add scsi disk (#24097) 2026-01-19 20:16:30 +08:00
cwz_eikoh
8c20fb7e3d Automated cherry pick of #23906: feature(llm): adapt frontend (#24095)
* feature(llm): add llm-list details, add autostart for llm-save-instant-model

* fix(llm): adjust some interfaces

* fix: name-dup problem when create llm

* fix: install instant-model by id rather than modelID

* fix(llm): add llm_id for mcp-agent

* feature(llm): move network from sku to instance

* feature(llm): add LLMType for llm-image

* feature(llm): add gpuMemoryRequired & ollama-registry yaml

* feature(llm): add url-get interface

* feature(llm): support mcp in mcp-agent-chat

* fix(llm): abstract ollama registry
2026-01-19 18:06:18 +08:00
屈轩
5904eaf042 fix(region): vendor update (#24092) 2026-01-19 14:21:46 +08:00
Jian Qiu
378177ad2f fix: user filter revisit (#24089)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-19 10:51:20 +08:00
Zexi Li
86a6a816af fix(telegraf-raid-plugin): working for victoria metrics (#24085) 2026-01-15 17:20:39 +08:00
Jian Qiu
a321c89e5f fix: detailed apigateway auth failure log (#24077)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-15 10:13:28 +08:00
Zexi Li
dd76886d51 fix(host): compatible with telegraf 1.36 and add ipmi_sensor conf (#24082)
* fix(host): compatible with telegraf 1.36 and add ipmi_sensor conf

* feat(monitor): add ipmi_sensor metric
2026-01-15 10:06:58 +08:00
屈轩
29809ce265 fix(region): vendor update (#24080) 2026-01-14 14:05:28 +08:00
屈轩
eb33cdbe4a fix(glance): avoid context warnning (#24074) 2026-01-14 10:54:52 +08:00
屈轩
cfde0396c3 fix(region): avoid panic when update user resource (#24071) 2026-01-13 18:20:57 +08:00
屈轩
a640fb3d60 fix(common): skip octet-stream warnning (#24068) 2026-01-13 18:20:35 +08:00
Zexi Li
f1f66fbed1 feat(monitor): delta reducer (#24063) 2026-01-12 17:27:32 +08:00
屈轩
35649ce641 fix(region): remove useless mod (#24061) 2026-01-12 14:12:19 +08:00
cwz_eikoh
0ff02020e7 Automated cherry pick of #24025: feature(llm): add mcp-agent (#24026)
* feature(llm): add mcp-agent

* feature(llm): support openai in llm_client

* feature(llm): chat-stream demo
2026-01-12 10:46:06 +08:00
屈轩
e1e91c0248 fix(region): host schedtag sync (#24056) 2026-01-11 18:33:44 +08:00
屈轩
f9c73f53c3 fix(region): allow batch resize disk (#24050) 2026-01-09 14:04:52 +08:00
Zexi Li
7bd4869998 fix(monitor): top query of monitor_resource_alert (#24052) 2026-01-09 12:10:17 +08:00
屈轩
97becd57ba fix(monitor): optimized common alert list (#24043) 2026-01-09 10:09:53 +08:00
wanyaoqi
399bfcb2e2 fix(host): add query id on detect qemu machine info (#24046) 2026-01-09 08:24:42 +08:00
屈轩
3eba59982c fix(monitor): optimized monitor resource list (#24039) 2026-01-08 15:23:28 +08:00
屈轩
5e50483cbc fix(region): support order by snapshot (#24036) 2026-01-08 11:14:00 +08:00
Zexi Li
317497d6c2 fix(monitor): resource id deduplication of alert record (#24032) 2026-01-07 11:15:51 +08:00
屈轩
e7dee4e9a0 fix(monitor): show alert count (#24028) 2026-01-07 10:03:13 +08:00
Zexi Li
2a82c99942 feat(host): mount post overlay layers by shortest path order (#24012)
* fix(host): mount and umount order for post overlay

- support host_lower_map for post overlay image

* feat(host): tar dirs of pod with include patterns
2026-01-06 20:02:58 +08:00
Zexi Li
35b17d1d7c fix(monitor): fill resource ids of the cloud account (#24029) 2026-01-06 19:44:18 +08:00
wanyaoqi
518f81ba69 fix(region): guest batch create isolated devices add host lock (#24013) 2026-01-06 18:10:49 +08:00
Jian Qiu
8fb0236de5 fix: endpoint mode slave (#24023)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-06 18:05:27 +08:00
屈轩
c1cd91e01c fix(region): show pretty error (#24021) 2026-01-06 10:29:39 +08:00
屈轩
27500ca14e fix(cloudmon): optimized account balance metric collect (#24011) 2025-12-30 19:56:59 +08:00
屈轩
ec0d44e1bc fix(region): add billing resource check (#24008) 2025-12-30 18:47:27 +08:00
cwz_eikoh
0137096ba8 feature(mcp-server): add InitAuth & userCred (#24006) 2025-12-30 10:36:53 +08:00
wanyaoqi
6c66130f16 fix(region,host,host-deployer): add win11 tpm support (#23951) 2025-12-29 11:18:46 +08:00
wanyaoqi
cb155ebcbb fix(scheduler): correct mem_free = (mem_total - mem_reserved) * mem_cmtbound (#23983) 2025-12-29 11:17:38 +08:00
wanyaoqi
89c836518b fix(climc): host set memory commit bound incorrect params (#23974) 2025-12-29 11:02:19 +08:00
wanyaoqi
62ab0616ff fix(glance): image disk_format use String2ImageFormat (#23990) 2025-12-29 11:01:01 +08:00
Jian Qiu
572d83f146 fix: change OutOfResource http status code to 507 (#23987)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-29 10:59:10 +08:00
屈轩
e2bd696ac6 fix(monitor): alert filter by owner (#24001) 2025-12-29 10:15:45 +08:00
屈轩
faeb5685be fix(region): show host cpu and mem usage (#23998) 2025-12-25 21:58:00 +08:00
屈轩
49088da817 fix(region): ksyun create vm params (#23996) 2025-12-25 10:32:40 +08:00
屈轩
dd5dc038cd fix(region): vendor update (#23994) 2025-12-24 19:45:10 +08:00
屈轩
b8e70e1142 fix(region): update private cloud host cpu and mem usage by cloudmon (#23984) 2025-12-24 19:21:21 +08:00
Zexi Li
29dc02f484 fix(host): make disk mount point shared for unshared post overlay (#23980) 2025-12-24 15:33:31 +08:00
屈轩
4dd9e26225 fix(region): show guest nic index (#23958) 2025-12-24 11:33:36 +08:00
Zexi Li
17882cca3f fix(host): quote include paths when before executing tar (#23969) 2025-12-23 18:11:57 +08:00
Jian Qiu
d0383ff1ab feature: assume user login support (#23963)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-23 13:54:23 +08:00
Zexi Li
3293def16a feat(host): add debug info when restoring backup to disk (#23962) 2025-12-23 12:02:49 +08:00
wanyaoqi
e20f46f7ed Automated cherry pick of #23930: Automated cherry pick of #23725: feat(baremetal-agent): Linux PCIE disk support mdadm soft raid (#23931)
* feat(baremetal-agent): Linux PCIE disk support mdadm soft raid

* fix(baremeta-agent): soft raid support intel imsm

* fix: update baremetal-agent base
2025-12-22 13:29:25 +08:00
wanyaoqi
a8e8641c75 fix(scheduler,host): sort numa node by numa distance check memsize (#23922) 2025-12-22 11:43:51 +08:00
wanyaoqi
2085d9dfa5 fix(region): guest usage by arch (#23955) 2025-12-22 11:42:48 +08:00
Jian Qiu
2c45df0895 fix: host compat with ovs in container (#23945)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-22 11:41:01 +08:00
Jian Qiu
5a15d84685 fix: host flush addrs instead of reset interface (#23948)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-18 01:14:39 +08:00
屈轩
3e49aac8f6 fix(region): cloudpods pod (#23946) 2025-12-17 16:29:00 +08:00
cwz_eikoh
09b5ecbce0 Automated cherry pick of #23928: feature(llm): add llm-instant-model-import (#23929)
* feature(llm): add llm-instant-model-import

* fix(llm): can't delete llm while deploy faile

* feature(llm): add instant-model-import to instant-model-create
2025-12-17 13:34:07 +08:00
屈轩
8554c93b0f fix(region): disable sync schedtags (#23942) 2025-12-16 20:40:55 +08:00
屈轩
6b6147777c fix(region): disable cloudpods auto create project (#23937) 2025-12-15 15:51:38 +08:00
屈轩
ddcd72716c fix(region): add provider info for sync log (#23932) 2025-12-15 13:47:19 +08:00
Zexi Li
67d743296d fix(monitor): meter alert panic (#23920) 2025-12-12 10:20:13 +08:00
屈轩
4fbe43192d fix(region): aliyun system disk size (#23926) 2025-12-12 10:19:34 +08:00
Jian Qiu
16f15ac0fc fix: backup storage edit external url (#23916)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-09 19:43:54 +08:00
Jian Qiu
eca000b52e fix: splitable not function due to empty datefield (#23908)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-09 13:34:26 +08:00
屈轩
3a2ab9e73d fix(region): vendor update (#23904) 2025-12-07 16:00:55 +08:00
屈轩
7a5a2c549a fix(region): baidu storage info (#23902) 2025-12-05 16:20:46 +08:00
cwz_eikoh
9ac509e55b Automated cherry pick of #23898: Feature/pre quick model (#23899)
* feat: add preinstall for quick-models

* fix: drop error when duplicate blobs
2025-12-05 10:33:55 +08:00
Zexi Li
4ca1fbfda5 fix(host): ensure a single file dir when mounting (#23896) 2025-12-04 13:54:08 +08:00
cwz_eikoh
80287d6b4d Automated cherry pick of #23769: [Feature] llm model 使用 post_overlay 功能实现秒装挂载模型 (#23888)
* feat(llm): add probed-package

* feat(llm): add llm-save-instant-app

* feat(llm): add some llm-instant-app options

* fix(llm): change app to model

* fix(llm): rename origin model to sku

* feat(llm): add llm-quick-models

* fix(llm): saved paths for instant model

* fix(llm): fix quick-install-model

---------

Co-authored-by: Zexi Li <zexi.li@icloud.com>
2025-12-03 16:27:19 +08:00
Zexi Li
7015962121 fix(monitor): filter baremetal host for no data query (#23893) 2025-12-03 16:24:35 +08:00
Zexi Li
1a87bb18c9 fix(apigateway): load llm (#23886) 2025-12-03 16:21:04 +08:00
屈轩
af85cca1d6 fix(region): optimized backend sync (#23890) 2025-12-03 15:14:17 +08:00
屈轩
8d9740f149 fix(region): aliyun vnc addr (#23884) 2025-12-03 14:04:16 +08:00
Zexi Li
2dd1d6fc26 fix(host): remove empty files used bind mount (#23881) 2025-12-02 19:34:00 +08:00
wanyaoqi
ce338f180a fix(host,host-deployer): host-deployer add password quality check (#23875) 2025-12-02 17:02:34 +08:00
Zexi Li
6869eca040 feat(monitor): 支持指定过去时间段返回报警资源最多的top5监控策略 (#23878)
* feat(monitor): 支持指定过去时间段返回报警资源最多的top5监控策略

* feat(monitor): 支持指定过去时间段返回报警数量最多的top5资源

* feat(monitor): 支持指定过去时间段某监控策略下各监控指标报警资源最多的top5资源

* feat(monitor): 支持获取过去时间段各项目下报警资源数量
2025-12-02 15:47:54 +08:00
屈轩
4666b00bda fix: update host-deploy base image (#23871) 2025-12-01 11:41:13 +08:00
屈轩
154673e6a3 fix(region): vendor update (#23868) 2025-11-30 17:22:22 +08:00
Zexi Li
0cd633046f fix(monitor): filter alertrecords by alert_name and res_name (#23864) 2025-11-28 18:58:24 +08:00
屈轩
f0980d7817 fix(region): vendor update (#23859) 2025-11-27 20:35:44 +08:00
wanyaoqi
2b0a7ac265 Automated cherry pick of #23846: Fix/host misc fix (#23847)
* fix(host): host register return wrong error value

* fix(host): host handlers use gotypes check ret value is nil
2025-11-27 19:19:31 +08:00
Zexi Li
79166f9aaa fix(monitor): alert shield is not working (#23861) 2025-11-27 19:18:37 +08:00
屈轩
0ec78aaa8a fix(keystone): change token AuditIds width (#23851) 2025-11-27 17:19:37 +08:00
Zexi Li
8622137834 fix(monitor): threshold_range message (#23855) 2025-11-27 16:47:24 +08:00
Zexi Li
4a7b6af08a feat(monitor): support threashold range (#23849) 2025-11-27 14:59:55 +08:00
Zexi Li
41ba24f4b5 feat(climc): support --ouput option for pprof command (#23840) 2025-11-27 14:18:35 +08:00
屈轩
11dc0d46a2 fix(region): vendor update (#23844) 2025-11-26 16:57:01 +08:00
Jian Qiu
fbdf305ff5 fix: generic guest delete task (#23837)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-26 01:01:11 +08:00
wanyaoqi
2d30cb862f fix(region,host): perform screendump no save to s3 (#23827) 2025-11-26 01:00:38 +08:00
wanyaoqi
c712a848a5 fix(region): disk take snapshot check backing snapshot is merged (#23833) 2025-11-26 00:59:14 +08:00
屈轩
01c97c0df6 fix(region): support vmware resource pool (#23829) 2025-11-25 19:07:32 +08:00
Zexi Li
c3f9b88faa feat(monitor): get records of monitor_resource_alert (#23822) 2025-11-24 21:34:20 +08:00
屈轩
a49e7437bd fix(region): vendor update (#23820) 2025-11-24 14:20:51 +08:00
Jian Qiu
491cde2257 fix: validate policy role delete condition (#23813)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-21 12:04:20 +08:00
Zexi Li
b28bdf43e4 fix(monitor): alerting level (#23800) 2025-11-21 10:26:41 +08:00
Jian Qiu
4afbf46da1 fix: region-dns not support dameng dialect (#23805)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-21 09:55:20 +08:00
屈轩
6a0c361ea3 fix(region): snapshot policy resource purge (#23807) 2025-11-20 23:42:22 +08:00
Zexi Li
80b5a7c04a fix(monitor): title of notification by language context (#23788) 2025-11-20 20:11:34 +08:00
屈轩
729a523260 fix(monitor): avoid panic (#23795) 2025-11-20 18:43:12 +08:00
屈轩
3e7c73677e fix(host): format sLsusbTree field content json tag (#23791)
Co-authored-by: 云原生驿站 <33771248+CloudCourierStation@users.noreply.github.com>
2025-11-20 18:26:16 +08:00
Zexi Li
f12c22e7b6 fix(monitor): check if LastSendNotification is zero (#23781) 2025-11-20 18:03:45 +08:00
屈轩
2fee1b6aea fix(region): migrate snapshot policy resource (#23789) 2025-11-20 17:38:15 +08:00
屈轩
32d4820a63 fix(cloudmon): account balance metric with tenant_id (#23785) 2025-11-20 14:22:28 +08:00
屈轩
15c7a825bf fix(cloudmon): avoid undetected new resources (#23778) 2025-11-20 10:48:36 +08:00
Zexi Li
985995c684 fix(baremetal-agent): msdos typo in grub configuration (#23775) 2025-11-20 10:39:09 +08:00
屈轩
52f2d801c1 fix: support build rpm/deb of riscv64 (#23771)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-19 17:39:54 +08:00
屈轩
a0f9484770 fix: support risc-v (#23770) 2025-11-19 17:20:26 +08:00
Jian Qiu
19b0997ab6 fix: diskbackup fail to syncstatus on offline backend (#23765)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-19 10:48:51 +08:00
Jian Qiu
6274e21053 fix: export/import disk backup (#23760)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-18 23:49:39 +08:00
Zexi Li
3ba6c1b3ff fix(host): use directory of single file as post_overlay lower (#23756) 2025-11-18 16:34:48 +08:00
Zexi Li
9099f682fb feat(monitor): set alert_channel to metata (#23754) 2025-11-18 12:52:37 +08:00
屈轩
a0d28c214f fix(region): esxi vm folder (#23752) 2025-11-17 18:14:02 +08:00
屈轩
fccf389a53 fix(region): server sku create status (#23749) 2025-11-17 17:01:08 +08:00
wanyaoqi
8a68f5d7d4 feat(region,host): host dmesg collect (#23746) 2025-11-17 15:44:42 +08:00
Jian Qiu
51fddda1bd fix: filter schedtags by zones (#23743)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-15 18:30:33 +08:00
Jian Qiu
65e0f4414e feature: user expired_at attribute support (#23727)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-14 10:53:39 +08:00
Zexi Li
c33dc74019 feat(cloudcommon): add ExtraHook steps to joint model (#23722) 2025-11-14 10:50:39 +08:00
wanyaoqi
705fe7a5d9 fix(host): thrown errors on disk fromatfs (#23729) 2025-11-14 10:40:49 +08:00
Zexi Li
91617dc81b fix(host): SHostPingTask was stuck by calling docker command (#23732) 2025-11-13 20:18:55 +08:00
屈轩
f668f496dc fix(region): scope resource (#23736) 2025-11-13 14:43:45 +08:00
屈轩
69831485a3 feat: Cloudpods basic service image RISC-V support (#23724)
This patch enables cloudpos basic service image to be built on RISC-V
platforms and support build script to work on RISC-V platforms.

Signed-off-by: Jinyu Zhao <1813479822@qq.com>
Co-authored-by: Jinyu Zhao <1813479822@qq.com>
2025-11-12 11:44:05 +08:00
cwz_eikoh
8d4595be87 fix(region): add kvm_delete_task (#23698) 2025-11-11 16:32:33 +08:00
wanyaoqi
fcb72e304b fix(region,scheduler): check is BIOS boot request on uefi predicate (#23718) 2025-11-11 13:45:18 +08:00
Zexi Li
30b7deb9f5 fix(baremetal): power status of server is not synced (#23687) 2025-11-10 09:56:29 +08:00
Jian Qiu
a191da0a77 fix: log change bandwidth event (#23713)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-10 09:48:40 +08:00
Jian Qiu
dfbd89c9db fix: vm nic charge type support (#23703)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-07 10:53:04 +08:00
cwz_eikoh
f53caeb6d1 fix(region): add finish for DependencyTopoGraph (#23710) 2025-11-07 10:20:31 +08:00
cwz_eikoh
bf4f1755c8 fix(llm): don't rely on polling (#23709) 2025-11-07 10:19:37 +08:00
Zexi Li
9bb6e3eb1b fix(host): clear previous usage metrics when any container stopped of pod (#23704) 2025-11-06 20:55:43 +08:00
屈轩
33938c6c01 fix(torrent): vendor update for support risc-v (#23701) 2025-11-06 20:21:14 +08:00
屈轩
4f1bb2a871 fix(region): allow delete server sku (#23694) 2025-11-05 18:20:20 +08:00
屈轩
7abcd04f16 fix(region): add device for disk (#23691) 2025-11-05 16:23:29 +08:00
屈轩
2cae726280 fix(scheduler): sku predicate with empty zone id (#23685) 2025-11-04 20:56:34 +08:00
Zexi Li
16aa081789 fix(baremetal-agent): chose root disk by pci path (#23681) 2025-11-04 20:09:39 +08:00
Jian Qiu
45de538d15 fix: rename check when change project (#23677)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-04 16:08:09 +08:00
cwz_eikoh
a05b793b81 feat(region): pod containers start in dependency order (#23669) 2025-11-04 10:38:33 +08:00
屈轩
7df775f07c fix(region): optimized aws server sku sync (#23674) 2025-11-03 22:32:17 +08:00
屈轩
ec3c9f3a20 fix(region): metadata filter by value (#23671) 2025-11-03 19:24:33 +08:00
Zexi Li
e2e79cd7cc fix(host): upload container status when not created (#23666) 2025-11-03 15:53:44 +08:00
屈轩
68675541ff fix(region): optimzed server sku sync (#23663) 2025-11-03 15:13:45 +08:00
屈轩
9ee0e83747 fix(region): disk filter by server (#23659) 2025-11-01 13:32:27 +08:00
屈轩
4068843773 fix(region): optimized filter sku by zone (#23656) 2025-11-01 13:04:49 +08:00
屈轩
c4b719628b fix(region): vendor update (#23653) 2025-11-01 13:03:59 +08:00
cwz_eikoh
66afa2f141 Automated cherry pick of #23620: feat(llm): add network id and network type for llm-model (#23621)
* feat(llm): add network id and network type for llm-model

* fix(llm):portmapping of model network only works when network mode is hostlocal
2025-10-31 10:21:51 +08:00
Zexi Li
51bdf0c655 Automated cherry pick of #23642: fix(scheduler): enable profiling (#23647)
* fix(scheduler): enable profiling

* feat(scheduler): cache NetworkAdditionalWire
2025-10-31 10:19:50 +08:00
屈轩
5fc5c5b330 fix(region): sku cpu mem sync (#23649) 2025-10-30 22:33:39 +08:00
屈轩
1c61483bc1 fix(region): filter disks by server list (#23644) 2025-10-30 17:24:41 +08:00
屈轩
79c45568c7 fix(region): vendor update (#23639) 2025-10-30 10:06:23 +08:00
Zexi Li
002b37f6a1 fix(host): move the hostInstance.Init() step after InitAuth (#23624) 2025-10-29 14:00:33 +08:00
Jian Qiu
6a18b70168 fix: task remote notify (#23627)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-29 12:17:27 +08:00
屈轩
bbf0991bb3 fix(cmd): show mcp server update cmd (#23629) 2025-10-28 18:35:01 +08:00
屈轩
1052eb4451 fix(mcp): add dockerfile for mcp server (#23619) 2025-10-28 15:23:20 +08:00
屈轩
07ce88c828 fix(mcp): cherry pick 4.0 (#23617) 2025-10-28 15:22:48 +08:00
屈轩
29585a8af6 fix(region): set ksyun tag (#23611) 2025-10-24 22:54:09 +08:00
Zexi Li
06258859d8 chore(ci): turn off goimports-check rule (#23606) 2025-10-24 15:48:44 +08:00
Zexi Li
2bbd1f792c Automated cherry pick of #23282: [OSPP]feature: Auto deploy llm and dify (#23601)
* feat(llm): add llm-create

* fix(llm): fix llm-create, add llm-list & llm-show

* fix(llm): format file names

* fear(llm): add exec stream

* fear(llm): init llm model cache

* fix(llm): move llm model cache to LocalImageCache

* feat(llm): auto clean model cache

* fix(llm): auto clean tmp model cache

* feat(dify): init dify-create

* fix(dify): change dify default registry

* feat: support create model with gguf file

* feat(llm): support more modelfile option for gguf file

* feat(dify): init user customize dify parameters

* feat: update llm as a service in climc

* fix: delete llm from region service

* feat: init llm service (with error)

* fix: resolve errors (task cant callback yet)

* feat: add PerformRequestHostActionByOtherService for container

* fix: make llm service usable

* feat: delete llm and dify after guest deleted

* feat(llm): add llm-image

* feat(llm): add llm-model

* feat: mv old llm to ollama

* feat(llm): init llm-batch-create(can not run)

* fix(llm): make llm-create usable

* fix(llm): add pull-model step

* feat(llm): add list and delete

* fix(llm): ollama pull official model don't rely on host & region's code any more

* feat(llm): add dify-model

* fix: remove llm's code in host & compute

* fix: remove remain code in compute

* feat(llm): Abstract out and reuse the llm_model logic

* feat(llm): abstract llm_base from llm

* fix(llm): make dify usable

* feat(llm): add sync_dify_images.sh

* fix(llm): format import

* feat(llm): support start & stop for llm and dify

* feat(llm): add model-update

* fix(llm): gendocgo

---------

Co-authored-by: cwz <cwz_eikoh@163.com>
2025-10-24 13:29:40 +08:00
Jian Qiu
56b41893ec fix: rpm/deb support postinst/preinst/prerm/postrm hooks (#23596)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-23 01:03:18 +08:00
Jian Qiu
cb0729f672 fix: suport bulding multi-arch rpm deb (#23570)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-22 23:53:16 +08:00
屈轩
e6ec61cab1 fix(keystone): fetch domain user count (#23591) 2025-10-22 16:25:54 +08:00
wanyaoqi
35e34f019a fix(region,host,scheduler): add check kvm cpu max on cpu predicate (#23538) 2025-10-22 15:07:22 +08:00
Zexi Li
b352d0cc92 feat(region,host): support nvidia GPU CDI configuration (#23566) 2025-10-22 15:04:08 +08:00
cwz_eikoh
56e938ee2e feat(container): container-restart (#23588) 2025-10-22 14:59:49 +08:00
屈轩
a9649db617 fix(region): support ocean base (#23587) 2025-10-22 14:43:32 +08:00
屈轩
b1ef423c2a fix(region): disable cloudprovider when sync lost (#23582) 2025-10-22 11:30:23 +08:00
屈轩
8da753833d fix(region): vendor update (#23579) 2025-10-22 11:12:17 +08:00
Zexi Li
16b3d220f4 feat(region): allow containers to be created with auto_start param (#23572) 2025-10-21 17:20:52 +08:00
屈轩
dc5884b361 fix(region): adjust the ip_addr character length (#23563) 2025-10-21 10:45:11 +08:00
Jian Qiu
77c471322a fix: container memory.high ratio support (#23558)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-21 09:32:57 +08:00
屈轩
584b3291cd fix(glance): add notify for image create (#23553) 2025-10-16 14:30:48 +08:00
wanyaoqi
f5a6465629 fix(webconsole): baremteasl ipmi sol instance_name hide password (#23533) 2025-10-16 00:02:42 +08:00
wanyaoqi
de05e8cc4a fix(host): host probe isoalted device return jsonarray (#23544) 2025-10-16 00:01:36 +08:00
屈轩
a839607802 fix(region): valid essd pl0 disk resize (#23546) 2025-10-15 17:25:06 +08:00
屈轩
6251e28e52 fix(region): vendor update (#23540) 2025-10-15 10:57:52 +08:00
屈轩
3591e9a15f fix(region): support change storage type (#23530) 2025-10-14 16:59:21 +08:00
屈轩
84e8b83aab fix(region): healt status (#23525) 2025-10-13 18:51:04 +08:00
屈轩
cd3190d80f fix(keystone): distribute permissions when the organization changes (#23502) 2025-10-13 18:49:45 +08:00
屈轩
b60346b97f fix(region): private zone create status (#23521) 2025-10-13 18:05:27 +08:00
wanyaoqi
d3c64b8054 fix(host): ensure host wire marshal nil value (#23507) 2025-10-12 11:04:35 +08:00
屈轩
914c1a1971 fix(region): server sku create with region id (#23509) 2025-10-11 16:54:47 +08:00
wanyaoqi
13ce2252ce fix(region,glance,host-deployer): guest image support bios boot mode detect (#23375) 2025-10-11 10:20:54 +08:00
Zexi Li
3bdfb00850 fix(baremetal): ensure the execution of the BaremetalServerDestroyTask (#23497) 2025-10-09 17:07:35 +08:00
Jian Qiu
bc7cc1ad07 fix: ignore e2fsck errors if retcode < 4 (#23489)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-09 16:31:40 +08:00
wanyaoqi
dd7602e628 fix(host): disk resize error input params (#23493) 2025-10-09 13:27:44 +08:00
Jian Qiu
7fe4ac72fe fix: network manager keyfile static routes (#23480)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-08 13:18:34 +08:00
Jian Qiu
55e586121d fix: support network manager connection profiles (#23468)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-03 09:25:14 +08:00
Jian Qiu
144ee48cec fix: default cloud region init error (#23475)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-03 06:34:24 +08:00
屈轩
b3a3d170e2 fix(region): vendor update (#23459) 2025-09-30 15:09:43 +08:00
屈轩
ebdcabe330 fix(region): host order by virt cpu (#23457) 2025-09-30 13:19:16 +08:00
Jian Qiu
e504d0d4e3 fix: hostman master nic may be nil (#23450)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-30 11:18:23 +08:00
Jian Qiu
00ee68c716 fix: s3 common options (#23444)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-29 19:22:25 +08:00
Jian Qiu
c6bf60722b fix: disable password history unique check by default (#23438)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-29 15:47:40 +08:00
wanyaoqi
8e6e30d57f fix(region,baremetal): ipv6 baremetal register support (#23422) 2025-09-29 15:22:22 +08:00
Jian Qiu
1f31c00819 fix: backup task worker count in host configmap (#23427)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-29 15:20:38 +08:00
屈轩
a704ab1cea fix(cloudevent): options changed with etcd (#23433) 2025-09-29 12:24:15 +08:00
屈轩
b90abee236 fix(region): vendor update (#23416) 2025-09-28 18:04:03 +08:00
wanyaoqi
ee471da787 fix(host-deployer): update host-deployer-base to 1.4.11 (#23413) 2025-09-28 17:26:03 +08:00
Zexi Li
4e1d8f2a98 fix(region,host): sync server status by upload guest status api (#23408) 2025-09-28 17:24:04 +08:00
屈轩
65492d196c fix(region): vendor update (#23405) 2025-09-28 14:58:55 +08:00
wanyaoqi
af73e7e93a Automated cherry pick of #23374: fix(region,host): guest add vnc screen dump support (#23377)
* 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:06:12 +08:00
wanyaoqi
59089c6792 Automated cherry pick of #23386: fix(host-deployer): allow growpart on primary partition (#23394)
* fix(host): init cgroup ignore disable cgroup option

* fix(host-deployer): allow growpart on primary partition
2025-09-27 12:02:06 +08:00
Zexi Li
9a19621da0 fix(host): unmount post overlay dir without accquire cached image (#23402) 2025-09-27 07:43:35 +08:00
屈轩
85ad508d83 fix(region): vendor update (#23398) 2025-09-26 18:05:24 +08:00
屈轩
e67f8392a7 fix(region): support cnware (#23389) 2025-09-26 14:45:37 +08:00
屈轩
c9ece3e7de fix(region): vendor update (#23383) 2025-09-26 13:53:39 +08:00
wanyaoqi
b6329b5c23 fix(host-deployer): loop dev resize diskfs umounted and f2fs support (#23358) 2025-09-24 18:52:48 +08:00
Zexi Li
b7a3ed9e27 fix(host): clear the rootfs of container before starting (#23361) 2025-09-24 18:52:06 +08:00
Jian Qiu
d591b7991b fix: network filter by ip error for dameng (#23364)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-24 18:45:07 +08:00
Jian Qiu
e05112b3f6 fix: auto cleanup obsolete password records (#23371)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-24 18:35:38 +08:00
屈轩
bef839cc7b fix(region): vendor update (#23368) 2025-09-24 17:22:23 +08:00
Zexi Li
6c7bb1a1b1 feat(region,host): clean no persistent rootfs (#23354) 2025-09-22 18:10:12 +08:00
屈轩
efe0d135b2 fix(region): add expired release notify hour options (#23351) 2025-09-22 10:58:13 +08:00
Jian Qiu
185332fa28 fix: host backup task worker limit (#23347)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-22 09:48:20 +08:00
Jian Qiu
64fa9f1675 fix: linux sshd_config support (#23342)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-20 00:39:27 +08:00
Zexi Li
60a57b1e1b fix(scheduler): watch serversku (#23328) 2025-09-19 23:49:32 +08:00
屈轩
8ac435af8e fix(region): rds backup sync (#23306) 2025-09-19 23:47:32 +08:00
wanyaoqi
c436fde002 fix(host,host-deployer): support lvm disk resize (#23334)
- add resize lvm disk support
- support qga online resize disk partitions and filesystems
2025-09-19 23:46:03 +08:00
Jian Qiu
f4bcb7ffdf fix: check os_arch when server rebuilding root (#23338)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-19 23:44:31 +08:00
屈轩
38d1d0f766 fix(region): disk reset webhook (#23326) 2025-09-18 15:08:21 +08:00
屈轩
f8001de546 fix(notify): optimized workwx access token expired time (#23323) 2025-09-18 14:55:18 +08:00
Zexi Li
bd731ca958 fix(monitor): diffTagKeys are empty when only one series in results (#23311) 2025-09-18 07:49:17 +08:00
屈轩
6c4a1a3628 fix: upgrade goimports (#23321) 2025-09-17 22:08:03 +08:00
屈轩
5387fc03f8 fix(region): remove debug sql (#23318) 2025-09-17 16:54:47 +08:00
屈轩
37c3db52b9 fix(cloudmon): alert metric with tenant id (#23315) 2025-09-17 16:40:21 +08:00
屈轩
976f0f0bf4 fix(climc): sku create params (#23301) 2025-09-15 15:33:40 +08:00
wanyaoqi
f446f86e9f fix(region): virtual isolated device balance on guest start (#23049) 2025-09-15 11:58:23 +08:00
屈轩
4428791397 fix(region): support gcp shared vpc and image (#23296) 2025-09-12 23:03:31 +08:00
Zexi Li
314fb8f08e feat(host): hide host files mounted to container (#23293) 2025-09-12 18:55:06 +08:00
屈轩
331231ce1a fix(monitor): history alert report (#23280) 2025-09-12 15:27:20 +08:00
Zexi Li
a8e4ecfa5a fix(host,region): container rootfs use sub directory (#23290) 2025-09-12 15:08:07 +08:00
Zexi Li
51bec5644e fix(monitor): fetch total alert resources from monitor_resource_alert (#23275) 2025-09-10 19:17:29 +08:00
屈轩
092a0c2239 fix(region): update cloudprovider external id (#23272) 2025-09-10 18:59:47 +08:00
Jian Qiu
82bfb4cea1 fix: ipv6 ra should be sent periodically (#23259)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-10 18:59:09 +08:00
Jian Qiu
e35ca851a7 fix: image self check status (#23250)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-10 18:57:27 +08:00
屈轩
aba6378177 fix(region): support hyperdisk for gcp (#23269) 2025-09-10 15:34:34 +08:00
Zexi Li
abda8b0400 fix(climc): monitor-alertrecords-total-alert command (#23266) 2025-09-10 14:24:52 +08:00
屈轩
606112ea44 fix(region): sync cloudpods ipmi ip addr (#23264) 2025-09-09 20:52:56 +08:00
屈轩
aca997796d fix(region): cloudpods ipmi info sync (#23262) 2025-09-09 19:27:52 +08:00
屈轩
df7d2d3d80 fix(region): sync cloudpods baremetal isolated device (#23257) 2025-09-09 18:40:38 +08:00
屈轩
42fb3e1327 fix(region): sync cloudpods host storage info (#23255) 2025-09-09 16:00:02 +08:00
屈轩
031e54b81e fix(region): retention server by tag (#23248) 2025-09-08 17:59:59 +08:00
屈轩
f990fe0ba3 fix(region): support retention server by tags (#23246) 2025-09-08 16:27:31 +08:00
屈轩
28dff24e44 fix(region): support retention server by tag (#23244) 2025-09-08 15:45:34 +08:00
屈轩
932e12ae87 fix: upgrade go 1.24 (#23242) 2025-09-05 18:26:42 +08:00
屈轩
7e60f49d4a fix(region): snapshot policy unbind disks (#23239) 2025-09-04 16:57:58 +08:00
屈轩
cbe77a29e2 fix(region): sync prepaid disk expired time (#23236) 2025-09-04 16:47:09 +08:00
屈轩
9ea05affbf fix(region): add disk change billing type log (#23232) 2025-09-03 20:16:38 +08:00
屈轩
56825a3cd9 fix(region): add kafka and mongodb capability (#23229) 2025-09-03 19:44:34 +08:00
屈轩
0e04ce4371 fix(region): distinct cloudprovider fields (#23227) 2025-09-03 15:03:18 +08:00
wanyaoqi
fe36e13dc7 fix(host): live migrate compat ipv6 (#23214) 2025-09-03 05:49:54 +08:00
Jian Qiu
fdf9195e8c fix: fail to delete cas idp due to readonly domain (#23217)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-03 05:48:43 +08:00
Jian Qiu
f72104ce60 fix: image s3 direct download option (#23220)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-03 05:47:32 +08:00
Jian Qiu
73ddbd4048 fix: network filter by ipv6 address (#23223)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-03 05:46:44 +08:00
屈轩
2f474ff911 fix(region): support more scheme keypair (#23196) 2025-09-02 14:45:03 +08:00
Zexi Li
3edd8dd65b feat(host): add SdnFetchDataFromComputeService option (#23207) 2025-09-01 23:15:40 +08:00
屈轩
cbf4310cab fix(region): avoid change to the same config sku not effective (#23203) 2025-09-01 11:43:01 +08:00
Jian Qiu
f2d77ad487 fix: too many recursive locks when batch create (#23198)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-29 23:08:07 +08:00
wanyaoqi
f491efc498 fix(host): update nic desc on nic changed (#23180) 2025-08-28 10:07:18 +08:00
wanyaoqi
bd719d99c0 feat(region,hostdeployer): add f2fs feature support (#23183) 2025-08-28 10:05:51 +08:00
屈轩
9f037c1baf fix(region): add cloud_env filter for cachedimages (#23191) 2025-08-27 18:34:36 +08:00
Jian Qiu
9b6a13037c fix: guest ipv6 vip (#23187)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-27 18:07:44 +08:00
Jian Qiu
3b6949fe78 fix: dhcpv6 should nack confirm if addr changed (#23169)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-26 15:35:31 +08:00
wanyaoqi
023309c1cf fix(region,host): ipv6 change addr (#23171) 2025-08-26 15:34:27 +08:00
屈轩
7bfdae3c45 fix(keystone): show ldap url (#23174) 2025-08-26 14:28:39 +08:00
屈轩
6ea9447a92 fix(keystone): upgrade ldap version (#23166) 2025-08-26 13:28:40 +08:00
Jian Qiu
cef3b9effb fix: deploy gai.conf if both v4 and v6 present (#23161)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-25 18:19:27 +08:00
Zexi Li
e30d669d19 feat(host): support single file to use post overlay (#23159) 2025-08-25 11:48:01 +08:00
屈轩
38872edae2 fix(region): optimized cached image list (#23154) 2025-08-22 15:43:23 +08:00
wanyaoqi
cff38d74ec feat(region,host,host-deployer): f2fs filesystem support (#23118) 2025-08-22 09:06:31 +08:00
wanyaoqi
f1f01ea823 fix(host): run ifdown script on guest delete (#23102) 2025-08-22 09:03:54 +08:00
Zexi Li
66587b4e52 fix(region): update the image status to save_fail when OnImageSavedFailed (#23140) 2025-08-21 18:12:24 +08:00
wanyaoqi
206a4b5b19 fix(scheduler): add session usage timeout options (#23143) 2025-08-21 18:10:51 +08:00
屈轩
90f479bafc fix(region): dns zone registrar charset (#23150) 2025-08-21 11:34:42 +08:00
屈轩
1df9c11501 fix(region): add change_config status for aigateway (#23138) 2025-08-20 17:05:34 +08:00
屈轩
79561cd8ef fix(region): avoid update guest disable_delete attribute error when host id is empty (#23135) 2025-08-20 16:21:24 +08:00
Zexi Li
435344ee1d fix(baremetal): update the grub auto configuration to fix the aarch64 disk boot (#23132) 2025-08-20 15:11:31 +08:00
屈轩
15d079f966 fix(region): sync lb eip (#23125) 2025-08-20 14:13:59 +08:00
Zexi Li
90aef7ef0c feat(region): fix ISO size display (#23128)
SGuestcdrom.Size is Byte, not MB

Co-authored-by: happygame <happygame1024@gmail.com>
2025-08-20 12:08:23 +08:00
Zexi Li
390feec8ec fix(baremetal-agent): error occurred when removing logical volumes on the arm64 host (#23122) 2025-08-20 12:00:19 +08:00
屈轩
911694c9fe fix(region): sync dns zone ns info (#23116) 2025-08-19 17:28:32 +08:00
屈轩
73199002c3 fix(region): sync eip associate resource (#23112) 2025-08-19 14:54:49 +08:00
屈轩
0dc21f1b69 fix(region): allow update vpc network cidr (#23110) 2025-08-19 14:38:53 +08:00
屈轩
f593f7f660 fix(region): add storage filter for snapshot (#23108) 2025-08-18 14:57:55 +08:00
wanyaoqi
046a6ac6cb fix(host): persistent ceph config for qemu connection (#23089) 2025-08-16 14:47:00 +08:00
Jian Qiu
7733907f9b fix: webconsole skip refererer check by default (#23092)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-16 14:45:45 +08:00
wanyaoqi
b43953fc29 fix(vpcagent): dhcp enable default gateway on default network (#23097) 2025-08-16 14:44:39 +08:00
屈轩
5f708fe816 fix(scheduledtask): force sync account (#23085) 2025-08-14 19:36:10 +08:00
Zexi Li
69056db01a fix(region): filter host by ips (#23083) 2025-08-14 18:35:28 +08:00
wanyaoqi
d48bab9ddd Automated cherry pick of #23072: fix(host): cephutil and nbd ipv6 compat (#23073)
* fix(region,host,host-image): host-image and qemu-nbd compat ipv6

* fix(host,host-deployer): cephutils add ipv6 compat
2025-08-14 18:34:44 +08:00
屈轩
d10a322aec fix(region): server snapshot policy (#23078) 2025-08-14 10:42:35 +08:00
屈轩
f694fead2e fix(region): dns record policy type (#23076) 2025-08-13 17:49:22 +08:00
屈轩
d4b04f3f2e fix(region): The eip displays the internal ip address of the virtual machine (#23068) 2025-08-12 09:59:08 +08:00
wanyaoqi
6d633b5647 feat(host): container cpufreq realtime simulate (#23051) 2025-08-11 10:24:28 +08:00
Jian Qiu
b7870e0453 fix: ipv6 compatibility issues fixes 20250809 (#23061)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-10 10:07:50 +08:00
Jian Qiu
4eb90fc442 fix: task obj_type and object nullable and default empty (#23059)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-10 08:46:59 +08:00
wanyaoqi
35093fb7a7 fix(host): lvm guest reload disk before delete snapshot (#23053) 2025-08-08 20:57:24 +08:00
Jian Qiu
9a3871014e fix: filter guest by multiple ips with exact match (#23039)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-08 17:56:10 +08:00
Zexi Li
b4e3d17178 fix(host): 修复 loop 设备被其它进程创建而导致分配失败的问题 (#23041) 2025-08-08 17:51:20 +08:00
Jian Qiu
4fa4cadb69 fix: host metrics tag add hypervisor (#23034)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-07 22:26:11 +08:00
Jian Qiu
d0ec6885d6 fix: ipv6-only mode compatibility fixes (#23031)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-06 22:02:08 +08:00
屈轩
634bdf7b90 fix(region): support lb health check sync status (#23029) 2025-08-06 17:37:44 +08:00
屈轩
117efad40d fix(region): disk update tag (#23025) 2025-08-06 15:52:11 +08:00
Jian Qiu
35aaafc09f fix: always update hostname for rhel-like os (#23017)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-06 01:06:23 +08:00
wanyaoqi
421a3e9e87 fix(region,host): host nic add default secret ipv4 address (#23015) 2025-08-02 23:07:07 +08:00
Jian Qiu
fbefeae06f fix: host network ipv6 support (#23013)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-02 12:15:07 +08:00
Zexi Li
ef04ac2dac feat(region): list gpu by index and device_minor (#23012) 2025-08-01 18:46:22 +08:00
屈轩
52d54cfc00 fix(region): support lb health check (#23009) 2025-08-01 18:38:41 +08:00
Zexi Li
33936c937c feat(region,host): upload index and minor info of a nvidia GPU (#23005) 2025-08-01 10:36:11 +08:00
Zexi Li
3b2632fb26 feat(region,host): auto create the file or dir of hostPath (#23001) 2025-07-31 14:01:06 +08:00
屈轩
412413c2f5 fix(region): cloudflare redirect pool (#22998) 2025-07-30 20:17:44 +08:00
屈轩
0970725598 fix(region): cloudflare lb backend operation (#22996) 2025-07-30 19:02:30 +08:00
屈轩
1012991176 fix(region): support cloudflare lb (#22993) 2025-07-30 14:51:48 +08:00
Jian Qiu
120725c311 fix: unify guest sync status and upload status procedure (#22983)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-30 10:38:11 +08:00
Jian Qiu
ea88b81f3f fix: inconsist checksum between image and its same format subimage (#22987)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-30 01:44:10 +08:00
wanyaoqi
c26ad31c8d fix(host,glance): only target qcow2 set cluster size on image convert (#22979) 2025-07-30 00:43:15 +08:00
Jian Qiu
4b0f3b4dd1 fix: glance converts all queued subimages, regardless of format (#22971)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-29 10:26:09 +08:00
wanyaoqi
5a3bc2acb6 fix(host): set qemuimg convert cluster_size 64k on compat image (#22965) 2025-07-29 00:01:10 +08:00
Jian Qiu
4080c2ddfb fix: set default worker parameter (#22958)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-28 14:12:18 +08:00
Jian Qiu
10a2c41d37 fix: host clean image with regards of container image deps (#22955)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-26 08:50:17 +08:00
wanyaoqi
a196b19b0c fix(region): iso boot do not check boot mode (#22950) 2025-07-26 02:26:55 +08:00
wanyaoqi
50519e9099 fix(host): host init no numa node (#22945) 2025-07-25 00:32:50 +08:00
屈轩
44c487eeb1 fix(region): init guest secgroup (#22941) 2025-07-24 17:15:56 +08:00
Zexi Li
1a7327c244 feat(host): 保存容器 volume 镜像时设置 min_disk 大小 (#22932) 2025-07-23 20:24:38 +08:00
屈轩
f5839b560e fix(region): add guest billing type for disk (#22936) 2025-07-23 18:53:48 +08:00
wanyaoqi
3e0231ae31 fix(region): ipv6 change ipaddr (#22924) 2025-07-23 09:29:18 +08:00
屈轩
003de57c91 fix(region): host order (#22927) 2025-07-22 15:20:01 +08:00
屈轩
ddb64eaf2e fix(region): vendor update (#22920) 2025-07-21 17:33:36 +08:00
屈轩
8248bcd67e fix(region): support ssl delete (#22912) 2025-07-16 19:55:21 +08:00
Jian Qiu
39a3918bb8 fix: dhcpv6 client id change by slice overwritten (#22906)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-16 16:19:27 +08:00
屈轩
47d9f2f434 fix(region): add is expired for certificate (#22908) 2025-07-16 15:36:00 +08:00
Zexi Li
5bdf4d1d30 fix(scheduler): netinterface cache is not informed (#22901) 2025-07-15 19:59:43 +08:00
Jian Qiu
3e5e6e175c fix: deploy ipv6 scripts fixes (#22900)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-15 18:59:42 +08:00
wanyaoqi
42e58b4996 feat(region,host-deployer): ipv6 only guest support (#22897) 2025-07-15 16:21:49 +08:00
wanyaoqi
a071cd2287 fix(host): check storage id is correct on src migrate prepare (#22892)
correct disk storage id on dest migrate prepare
2025-07-15 16:12:57 +08:00
屈轩
66748dbfcd fix(region): ssl create with zone info (#22889) 2025-07-14 18:32:15 +08:00
屈轩
d27c9be330 fix(region): ssl certificate create (#22887) 2025-07-14 16:06:22 +08:00
Jian Qiu
ea8f6c8221 fix: host metrics error for missing ip (#22883)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-12 18:00:46 +08:00
Jian Qiu
c6f84dfa94 fix: dhcpv6 support phase 3 (#22881)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-12 12:10:31 +08:00
屈轩
382c2bc6cd fix(region): add sort for host (#22877) 2025-07-11 19:08:59 +08:00
Zexi Li
598f68a7e9 fix(region): allow stopping the container in probe_failed status (#22873) 2025-07-11 10:42:07 +08:00
Jian Qiu
967d52f874 fix: host no default routes due to empty ipv6 addr (#22871)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-10 22:34:07 +08:00
wanyaoqi
d1dcfc9ed3 fix(region): do not set guest to resuce status on guest running (#22867) 2025-07-10 22:11:11 +08:00
屈轩
ebd7298d0d fix(region): 修复本地到期释放功能和资源同步冲突 (#22860) 2025-07-10 19:37:58 +08:00
Jian Qiu
992c5f498e fix: dhcpv6 support, phase 2 (#22852)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-09 14:41:34 +08:00
wanyaoqi
570b371290 fix(host): add check mem dev is null on guest setup (#22848) 2025-07-09 14:16:08 +08:00
屈轩
0b6a23e2fb fix(region): 避免删除虚拟机时,未能正常删除后挂载的磁盘 (#22841) 2025-07-07 14:46:10 +08:00
Zexi Li
da501a34d8 feat(host): support pod post cleanup configuration (#22839) 2025-07-04 17:12:22 +08:00
屈轩
34fd2c5ca4 fix(region): create disk with tags (#22833) 2025-07-04 17:08:05 +08:00
屈轩
afe4afe095 fix(region): vendor update (#22828) 2025-07-03 15:16:35 +08:00
屈轩
9121720e21 fix: compatible with other os netutils (#22826) 2025-07-03 15:01:44 +08:00
Jian Qiu
b527b1ad6b fix: dhcpv6 support, initial support (#22823)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-03 14:37:17 +08:00
屈轩
bdcbc15cf5 fix(region): vendor update for sync mongodb ip addr (#22817) 2025-07-03 05:33:12 +08:00
wanyaoqi
397f165d37 fix(host): set arm guest max mems to host mem (#22814) 2025-07-03 05:32:20 +08:00
wanyaoqi
f29a1d8567 fix(host): enable qemu cap detect (#22799) 2025-07-03 05:30:45 +08:00
wanyaoqi
47a9fa3505 fix(region): host calculate set mem_cmt_bound 1 on host enable hugepage (#22810) 2025-07-03 05:29:20 +08:00
wanyaoqi
7df2a43d22 fix(host): qemuimg convert add cluster_size (#22792) 2025-07-03 05:27:35 +08:00
屈轩
826f4df8f7 fix(region): vendor update (#22806) 2025-07-02 21:01:57 +08:00
屈轩
7cee63907b fix(esxi-agent): avoid esxi cache image error (#22803) 2025-07-02 19:25:32 +08:00
Zexi Li
0e50049ab1 fix(host): adjuest max loop device count to 512 (#22788) 2025-07-01 15:25:26 +08:00
屈轩
975f4ed864 fix(region): add ai gateway (#22785) 2025-06-27 22:38:21 +08:00
屈轩
5643619a7c fix(region): vendor update for cdn attribute (#22778) 2025-06-24 17:43:09 +08:00
屈轩
3e35ea56df fix(notify): support dingtalk robot sign (#22767) 2025-06-23 16:59:40 +08:00
屈轩
1ba251f053 fix(cloudmon): cloudpods collect metric interval (#22764) 2025-06-23 16:17:24 +08:00
屈轩
25d1b699c9 fix(region): vendor update for aliyun alb and nlb (#22762) 2025-06-23 10:30:26 +08:00
屈轩
19143c134a fix(region): sync remove backend group (#22759) 2025-06-20 19:38:27 +08:00
Zexi Li
27a8e098d6 feat(region,host): support port mapping rule (#22756) 2025-06-20 19:17:04 +08:00
屈轩
cb12c9fe1c fix(region): support skip sync server by tag value (#22754) 2025-06-20 18:40:35 +08:00
屈轩
fc2603ce4d fix(region): vendor update (#22750) 2025-06-20 18:12:44 +08:00
Jian Qiu
d9c5d5657e fix: task filter by owner sql revisit (#22746)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-20 16:06:27 +08:00
屈轩
b6b5c6041b fix(region): ssl certificate purge (#22743) 2025-06-19 17:53:10 +08:00
Jian Qiu
c1345560bb fix: use goid to identify differnt goroutine (#22740)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-19 14:50:47 +08:00
屈轩
8448395003 fix(region): waf rule create (#22738) 2025-06-18 20:06:16 +08:00
Zexi Li
5058f02538 Automated cherry pick of #22729: Monitor worker alert (#22730)
* fix(monitor): GetMetricMeasurement 接口只查询过去30m的数据

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

* fix(monitor): wildchar of alert group by field
2025-06-18 14:25:43 +08:00
屈轩
31b766a7d6 fix(region): lb listener rule associate backend group (#22734) 2025-06-18 14:15:01 +08:00
Zexi Li
650acf4ea9 fix: panic when there is no secondary IP on the host. (#22726)
Co-authored-by: glzjin <glzjin2015@gmail.com>
2025-06-17 11:15:01 +08:00
屈轩
1322a21445 fix(region): vendor update (#22725) 2025-06-16 20:07:32 +08:00
屈轩
fb26af0566 fix(region): vendor update for lb multi eip sync (#22720) 2025-06-16 17:17:27 +08:00
wanyaoqi
af0559ac35 fix(region,host): add auto merge snapshots options, preallocation options (#22713) 2025-06-13 15:19:50 +08:00
Zexi Li
72f68dd541 fix(host): dirty shutdown pod is not auto started (#22705) 2025-06-10 10:18:31 +08:00
Jian Qiu
ae09aa3c82 fix: remove cgo deps for ioctl (#22701)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-07 08:42:14 +08:00
屈轩
b677cef407 fix(region): vendor update (#22698) 2025-06-06 19:22:45 +08:00
屈轩
9ae9879c56 fix(region): enable cloud dns record (#22695) 2025-06-06 18:32:01 +08:00
Jian Qiu
2f8c719f03 fix: http perf stats monitor (#22689)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-06 18:12:16 +08:00
Zexi Li
712059cedb fix(host): marshal update status input inside error (#22692) 2025-06-06 17:27:51 +08:00
屈轩
4bbc651732 fix(region): waf rule enable disable (#22688) 2025-06-06 14:53:25 +08:00
Jian Qiu
24e525926b fix: update vendor release/4.0 20250606 (#22685)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-06 14:23:50 +08:00
wanyaoqi
119140fe93 fix(host): pass decoded userdata to host-deployer (#22681) 2025-06-05 23:50:51 +08:00
屈轩
1b45c3d174 fix(region): vendor update (#22678) 2025-06-05 19:28:02 +08:00
Zexi Li
9675f1d4e4 fix(host): change mount context timeout to 30s (#22676) 2025-06-05 18:40:30 +08:00
Jian Qiu
e7e13552d9 fix: cloudmon high cpu loads for bucket probing (#22658)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-05 17:51:26 +08:00
屈轩
91ad8f038e fix(region): vendor update (#22670) 2025-06-04 17:37:36 +08:00
Zexi Li
c5e70ed1aa fix(scheduler): wrong sort order of instance group selection (#22666) 2025-06-04 14:27:30 +08:00
Zexi Li
cdd46c490d feat(host): containerd snapshot rootfs service (#22661) 2025-06-04 11:00:42 +08:00
Zexi Li
1d69a15372 fix(host): sync container crash status (#22655) 2025-06-03 20:16:12 +08:00
Zexi Li
5237beb197 fix(host): retry stopping container forcibly (#22650) 2025-06-03 17:12:07 +08:00
Zexi Li
ffdf7a3a6e fix(host): losetup package initialization order (#22652) 2025-06-03 13:39:30 +08:00
Jian Qiu
c835c87afc fix: update vendor to fix keystone user join project not found (#22645)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-31 18:47:54 +08:00
Jian Qiu
58e2ea41af fix: disk statu sync recover (#22633)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-31 09:04:25 +08:00
Jian Qiu
addbe7f9ea fix: bucket perform mon random string generation consume high cpu load (#22639)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-31 09:03:21 +08:00
wanyaoqi
618722bc16 fix(host): change log level to debug on get numa node faild (#22641) 2025-05-31 09:01:55 +08:00
Zexi Li
fd0c96e6f9 refactor(region,host): container status management (#22635) 2025-05-30 17:48:42 +08:00
wanyaoqi
5a17a9e37b feat(host-deployer): deploy vlan subinterface on baremetal hypervisor (#22629)
- host-deployer add deploy vlan subinterface on baremetal hypervisor
- fix baremetal-agent cache image parse input data
2025-05-30 10:32:01 +08:00
wanyaoqi
44ed13473a feat(region,host,host-deployer): support set uefi boot order (#22560) 2025-05-30 10:31:03 +08:00
wanyaoqi
d8b00188a0 feat(region,host): qga deploy network config on attach nics (#22548) 2025-05-30 10:29:48 +08:00
屈轩
0b61ca0432 fix(region): vendor update (#22624) 2025-05-29 11:23:02 +08:00
屈轩
b9a9151555 fix(region): secgroup rule filter (#22619) 2025-05-28 18:38:37 +08:00
wanyaoqi
17db7be134 fix(host): qemu extra params format (#22609) 2025-05-27 13:34:48 +08:00
屈轩
892431d5b9 fix(region): update qcloud storage type (#22615) 2025-05-27 12:44:12 +08:00
屈轩
3d36c293e5 fix(region): add region driver for cloudflare (#22606) 2025-05-26 16:22:25 +08:00
Jian Qiu
3ff50f0d11 fix: tar ignore error revisit (#22604)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-26 12:35:10 +08:00
Jian Qiu
6144325daf fix: container save image with leading prefix (#22602)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-26 12:34:48 +08:00
Zexi Li
bf3b83870c fix: ignore init loop device error (#22601)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-26 11:36:09 +08:00
wanyaoqi
62b7eea828 fix(host): check min_free_kbytes size is enough (#22592) 2025-05-24 01:11:09 +08:00
Zexi Li
4e07811e2f fix(monitor): not filter status tag key (#22596) 2025-05-23 09:59:43 +08:00
Zexi Li
f819e021b3 feat(host): loop device manager (#22590) 2025-05-22 13:24:24 +08:00
屈轩
3224eac821 fix(cloudmon): add vm_ip metric for vm (#22586) 2025-05-22 10:53:59 +08:00
屈轩
a1fce125da fix(cloudmon): vm metrics with ips (#22583) 2025-05-22 10:41:11 +08:00
屈轩
aa0a6b58d3 fix(region): add filter for secgroup rule (#22580) 2025-05-21 19:27:29 +08:00
屈轩
0c9a44e279 fix(region): add account info for sec rules (#22577) 2025-05-21 18:40:18 +08:00
Zexi Li
4dd92825a8 fix(host): ignore internal stopped event of primary container (#22574) 2025-05-21 16:23:17 +08:00
屈轩
30a319fe5e fix(region): allow create public server sku (#22571) 2025-05-21 14:43:28 +08:00
Zexi Li
faf35a6879 fix(host): status of stopping primary container (#22568) 2025-05-21 12:23:33 +08:00
屈轩
4520b54a5b fix(region): init aliyun storage medium type (#22564) 2025-05-20 21:48:33 +08:00
wanyaoqi
fa53aea075 fix error when create vm with ceph disk (#22561)
Co-authored-by: liangkaijun <liangkaijun52013@gmail.com>
2025-05-20 21:28:00 +08:00
Jian Qiu
36b5532b04 feature: monitor bucket formance and resource status (#22553)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-19 22:28:32 +08:00
Zexi Li
01ab43941e fix(host): clean loop device before deleting (#22558) 2025-05-19 19:47:28 +08:00
屈轩
249569be9f fix(region): user sync with ctx (#22555) 2025-05-19 18:09:26 +08:00
Jian Qiu
db0b275772 fix: host files not initialized when host reboot (#22551)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-19 01:57:58 +08:00
wanyaoqi
e6bb86c934 fix: vendor update 2505013 (#22521) 2025-05-19 01:50:32 +08:00
屈轩
c53f707089 fix(region): vendor update (#22544) 2025-05-16 11:19:49 +08:00
屈轩
ef36176130 fix(region): guest disk iops (#22542) 2025-05-15 15:46:12 +08:00
屈轩
edd11ea1cd fix(region): show correct disk iops (#22538) 2025-05-15 12:48:51 +08:00
屈轩
4ad7d635bc fix(region): change disk billing type (#22533) 2025-05-15 11:48:26 +08:00
Zexi Li
18604b46b1 feat(region,host): change ownership of post overlay merged dir (#22525) 2025-05-13 19:52:52 +08:00
屈轩
4609c543c9 fix(region): add dns brand (#22523) 2025-05-13 16:30:57 +08:00
屈轩
779559dbdc fix(region): add proxied for dns record (#22514) 2025-05-12 17:52:46 +08:00
Zexi Li
27c6c82b82 fix(monitor): return measurements info from db directly (#22512) 2025-05-12 17:17:36 +08:00
屈轩
fa99905bf6 fix(common): avoid empty context (#22509) 2025-05-12 16:21:18 +08:00
屈轩
608e4edb4e fix(region): add cloudflare const (#22507) 2025-05-12 14:10:58 +08:00
屈轩
43c646b537 fix(notify): support notify with robotids (#22503) 2025-05-09 21:23:07 +08:00
屈轩
ad798d7bbe fix(notify): optimized notify error msg (#22501) 2025-05-09 17:35:17 +08:00
屈轩
238458066a fix(region): vendor update (#22498) 2025-05-09 14:56:01 +08:00
屈轩
90a8b10401 fix(common): obj id cache (#22495) 2025-05-09 14:50:24 +08:00
Jian Qiu
46195f72ee fix: hostfile delete validation (#22493)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-08 23:50:06 +08:00
屈轩
05829a225a fix(region): vendor update (#22491) 2025-05-08 18:36:31 +08:00
屈轩
f0858ce4d2 fix(common): policy tag filter cache (#22485) 2025-05-08 15:56:57 +08:00
Jian Qiu
cc3477415d fix: host files support (#22481)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-07 11:28:47 +08:00
9690 changed files with 5035557 additions and 196164 deletions

View File

@@ -7,7 +7,7 @@ jobs:
requires:
- check
docker:
- image: yunion/centos-build:go-1.21.10-0
- image: yunion/alpine-build:3.22.0-go-1.24.6-1
environment:
ONECLOUD_CI_BUILD: "1"

View File

@@ -13,13 +13,13 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Install check tools
shell: bash
run: |
set -o xtrace
git clone --branch yun --depth 4 https://github.com/yousong/tools && cd tools
git clone --branch master --depth 4 https://github.com/yunionio/tools && cd tools
go build ./cmd/goimports && sudo cp goimports /usr/bin/ && cd .. && rm -rf tools
git clone --depth 4 https://github.com/yousong/y18n && cd y18n
go build . && sudo cp y18n /usr/bin && cd .. && rm -rf y18n

View File

@@ -22,7 +22,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -84,9 +84,6 @@ vet:
# cmd/esxi-agent: prepare_dir
# CGO_ENABLED=0 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
cmd/host: prepare_dir
CGO_ENABLED=1 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
cmd/%: prepare_dir
CGO_ENABLED=0 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
@@ -99,21 +96,6 @@ deb/%: cmd/%
pkg/%: prepare_dir
$(GO_INSTALL) $(REPO_PREFIX)/$@
rpm/fetcherfs: cmd/fetcherfs
docker run --rm \
--name docker-centos-build-fetcherfs \
-v $(CURDIR):/data \
registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 \
/bin/bash -c "VERSION=3.6 /data/build/build.sh fetcherfs /opt/yunion/fetchclient/bin"
deb/fetcherfs: rpm/fetcherfs
#VERSION=3.6 $(DEB_BUILD_SCRIPT) fetcherfs /opt/yunion/fetchclient/bin
docker run --rm \
--name docker-debian-build-fetcherfs \
-v $(CURDIR):/data \
registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0 \
/data/build/convert_rpm2deb.sh
build:
$(MAKE) $(cmdTargets)
@@ -184,7 +166,8 @@ goimports-check:
echo "$@: working tree modified (possibly by goimports)" >&2 ; \
echo "$@: " >&2 ; \
echo "$@: import spec should be grouped in order: std, 3rd-party, yunion.io/x, yunion.io/x/onecloud" >&2 ; \
echo "$@: see \"yun\" branch at https://github.com/yousong/tools" >&2 ; \
echo "$@: goimports should be installed by: \
echo "$@: git clone --depth 4 https://github.com/yunionio/tools && cd tools && go install ./cmd/goimports ; \
false ; \
fi
.PHONY: goimports-check
@@ -253,7 +236,7 @@ hostdeployer-grpc-gen:
check: fmt-check
check: gendocgo-check
check: goimports-check
#check: goimports-check
#check: vet-check
#check: y18n-check
.PHONY: check
@@ -277,22 +260,18 @@ dep:
@echo "$$depDeprecated"
@$(MAKE) mod
RELEASE_BRANCH:=master
RELEASE_BRANCH:=release/4.0.2
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
define helpText
Build with docker
make docker-centos-build F='-j4'
make docker-centos-build F='-j4 cmd/region cmd/climc'
make docker-centos-build-stop
make docker-alpine-build F='-j4'
make docker-alpine-build F='-j4 cmd/host cmd/host-deployer'
make docker-alpine-build-stop
@@ -344,7 +323,7 @@ image:
.PHONY: image
image-telegraf-raid-plugin:
VERSION=release-1.6.5 ARCH=all make image telegraf-raid-plugin
VERSION=v4.0-20260115.0 GOOS=linux ARCH=all make image telegraf-raid-plugin
%:
@:

View File

@@ -8,8 +8,7 @@ endif
ModBaseName:=$(notdir $(ModName))
DockerImageRegistry?=registry.cn-beijing.aliyuncs.com
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.19.0-go-1.21.10-0
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:go-1.21.10-0
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.2-go-1.24.9-0
EnvIf=$(if $($(1)),$(1)=$($(1)))
@@ -29,27 +28,6 @@ endef
tmpName=$(ModBaseName)-$(shell date +"%Y%m%d.%H%M%S%3N")
docker-centos-build: export dockerCentOSBuildCmd:=$(call dockerCentOSBuildCmd,$(F))
docker-centos-build:
docker rm --force docker-centos-build-$(tmpName) &>/dev/null || true
docker run \
--rm \
--name docker-centos-build-$(tmpName) \
-v $(CURDIR):/root/go/src/yunion.io/x/$(ModBaseName) \
-v $(CURDIR)/_output/centos-build:/root/go/src/yunion.io/x/$(ModBaseName)/_output \
-v $(CURDIR)/_output/centos-build/_cache:/root/.cache \
$(DockerImageCentOSBuild) \
/bin/bash -c "$$dockerCentOSBuildCmd"
ls -lh _output/centos-build/bin
# NOTE we need a way to stop and remove the container started by docker-build.
# No --tty, --stop-signal won't work
docker-centos-build-stop:
docker stop --time 0 docker-centos-build-$(tmpName) || true
.PHONY: docker-centos-build
.PHONY: docker-centos-build-stop
define dockerAlpineBuildCmd
set -o xtrace

View File

@@ -36,6 +36,12 @@ fi
. $ROOT/vars
BUILDROOT=$(mktemp -d 2>/dev/null || mktemp -d -t 'yunion')
function cleanup {
rm -rf "$BUILDROOT"
echo "Deleted temp working directory $BUILDROOT"
}
# register the cleanup function to be called on the EXIT signal
trap cleanup EXIT
echo "Build root ${BUILDROOT}"
@@ -104,41 +110,87 @@ if [ -d $ROOT/root ]; then
rsync -a $ROOT/root/ \$RPM_BUILD_ROOT
fi
%pre
%pre" > $SPEC_FILE
if [ -f $ROOT/preinst ]; then
cat $ROOT/preinst >> $SPEC_FILE
else
echo "
%if %{use_systemd}
getent group %{owner} >/dev/null || /usr/sbin/groupadd -r %{owner}
getent passwd %{owner} >/dev/null || /usr/sbin/useradd -r -s /sbin/nologin -d %{homedir} -M -g %{owner} %{owner}
%endif
" >> $SPEC_FILE
fi
%post
echo "
%post" >> $SPEC_FILE
if [ -f $ROOT/postinst ]; then
cat $ROOT/postinst >> $SPEC_FILE
else
echo "
%if %{use_systemd}
mkdir -p /var/run/%{owner}
chown -R %{owner}:%{owner} /var/run/%{owner}
/usr/bin/systemctl preset %{pkgname}.service >/dev/null 2>&1 ||:
%endif
" >> $SPEC_FILE
fi
%preun
echo "
%preun" >> $SPEC_FILE
if [ -f $ROOT/prerm ]; then
cat $ROOT/prerm >> $SPEC_FILE
else
echo "
%if %{use_systemd}
/usr/bin/systemctl --no-reload disable %{pkgname}.service >/dev/null 2>&1 || :
/usr/bin/systemctl stop %{pkgname}.service >/dev/null 2>&1 ||:
%endif
" >> $SPEC_FILE
fi
%postun
echo "
%postun" >> $SPEC_FILE
if [ -f $ROOT/postrm ]; then
cat $ROOT/postrm >> $SPEC_FILE
else
echo "
%if %{use_systemd}
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 ||:
%endif
" >> $SPEC_FILE
fi
echo -n "
%files
%doc
$BIN_PATH/$PKG
$(for b in $EXTRA_BINS; do echo $BIN_PATH/$b; done)
" > $SPEC_FILE
" >> $SPEC_FILE
for b in $EXTRA_BINS; do
echo $BIN_PATH/$b >> $SPEC_FILE
done
if [ -d $ROOT/root/ ]; then
find $ROOT/root/ -type f | sed -e "s:$ROOT/root::g" >> $SPEC_FILE
fi
rpmbuild --define "_topdir $BUILDROOT" -bb $SPEC_FILE
TARGET=
case "$GOARCH" in
"arm64" | "aarch64" | "arm")
TARGET="--target aarch64-redhat-linux"
;;
"amd64" | "x86" | "i686" | "i386" | "x86_64")
TARGET="--target x86_64-redhat-linux"
;;
"riscv64")
TARGET="--target riscv64-linux"
;;
esac
rpmbuild --define "_topdir $BUILDROOT" -bb $SPEC_FILE $TARGET
find $RPM_DIR -type f | while read f; do
d="$(dirname "$f")"
@@ -146,5 +198,3 @@ find $RPM_DIR -type f | while read f; do
mkdir -p "$d"
cp $f $d
done
rm -fr $BUILDROOT

View File

@@ -35,14 +35,48 @@ fi
. $ROOT/vars
case $(uname -m) in
x86_64)
CURRENT_ARCH=amd64
;;
aarch64)
CURRENT_ARCH=arm64
;;
riscv64)
CURRENT_ARCH=riscv64
;;
esac
if [[ -n "$GOARCH" ]]; then
case "$GOARCH" in
"arm64" | "arm" | "aarch64")
CURRENT_ARCH="arm64"
;;
"x86" | "x86_64" | "i686" | "i386" | "amd64")
CURRENT_ARCH="amd64"
;;
"riscv64")
CURRENT_ARCH="riscv64"
;;
esac
fi
if [ -z "$VERSION" ]; then
TAG=$(git describe --abbrev=0 --tags || echo 000000)
VERSION=${TAG/\//-}
VERSION=${VERSION/v/}
VERSION=${VERSION/master-/}
fi
RELEASE=`date +"%y%m%d%H"`
FULL_VERSION=$VERSION-$RELEASE
BUILDROOT=$OUTPUT_DIR/yunion-$1-$FULL_VERSION
BUILDROOT=$OUTPUT_DIR/yunion-${PKG}-${FULL_VERSION}_${CURRENT_ARCH}
function cleanup {
rm -rf "$BUILDROOT"
echo "Deleted temp working directory $BUILDROOT"
}
# register the cleanup function to be called on the EXIT signal
trap cleanup EXIT
rm -rf $BUILDROOT
mkdir -p $BUILDROOT/DEBIAN
mkdir -p $BUILDROOT/$BIN_PATH
@@ -52,27 +86,90 @@ if [ -d $ROOT/root ]; then
cp -rf $ROOT/root/* $BUILDROOT/
fi
echo "Build root ${BUILDROOT}"
case $(uname -m) in
x86_64)
CURRENT_ARCH=amd64
;;
aarch64)
CURRENT_ARCH=arm64
;;
esac
echo "Package: yunion-$1
echo "Package: yunion-$PKG
Version: $FULL_VERSION
Section: base
Priority: optional
Architecture: $CURRENT_ARCH
Maintainer: wanyaoqi@yunionyun.com
Description: Yunion $1
" > $BUILDROOT/DEBIAN/control
Description: $DESCRIPTION" > $BUILDROOT/DEBIAN/control
if [ ${#REQUIRES[@]} -gt 0 ]; then
DEPS=$(IFS=, ; echo "${REQUIRES[*]}")
echo "Depends: $DEPS" >> $BUILDROOT/DEBIAN/control
fi
chmod 0755 $BUILDROOT/DEBIAN/control
cat $BUILDROOT/DEBIAN/control
dpkg-deb --build $BUILDROOT
echo "#!/bin/bash
" > $BUILDROOT/DEBIAN/preinst
if [ -f $ROOT/preinst ]; then
cat $ROOT/preinst >> $BUILDROOT/DEBIAN/preinst
else
if [ "$SERVICE" == "yes" ] && [ -n "$OWNER" ]; then
echo "
getent group ${OWNER} >/dev/null || /usr/sbin/groupadd -r ${OWNER}
getent passwd ${OWNER} >/dev/null || /usr/sbin/useradd -r -s /sbin/nologin -d /home/${OWNER} -M -g ${OWNER} ${OWNER}
" >> $BUILDROOT/DEBIAN/preinst
fi
fi
chmod 0755 $BUILDROOT/DEBIAN/preinst
echo "#!/bin/bash
" > $BUILDROOT/DEBIAN/postinst
if [ -f $ROOT/postinst ]; then
cat $ROOT/postinst >> $BUILDROOT/DEBIAN/postinst
else
if [ "$SERVICE" == "yes" ]; then
echo "
/usr/bin/systemctl preset yunion-${PKG}.service >/dev/null 2>&1 ||:
" >> $BUILDROOT/DEBIAN/postinst
fi
fi
chmod 0755 $BUILDROOT/DEBIAN/postinst
echo "#!/bin/bash
" > $BUILDROOT/DEBIAN/prerm
if [ -f $ROOT/prerm ]; then
cat $ROOT/prerm >> $BUILDROOT/DEBIAN/prerm
else
if [ "$SERVICE" == "yes" ]; then
echo "
/usr/bin/systemctl --no-reload disable yunion-${PKG}.service >/dev/null 2>&1 || :
/usr/bin/systemctl stop yunion-${PKG}.service >/dev/null 2>&1 ||:
" >> $BUILDROOT/DEBIAN/prerm
fi
fi
chmod 0755 $BUILDROOT/DEBIAN/prerm
echo "#!/bin/bash
" > $BUILDROOT/DEBIAN/postrm
if [ -f $ROOT/postrm ]; then
cat $ROOT/postrm >> $BUILDROOT/DEBIAN/postrm
else
if [ "$SERVICE" == "yes" ]; then
echo "
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 ||:
" >> $BUILDROOT/DEBIAN/postrm
fi
fi
chmod 0755 $BUILDROOT/DEBIAN/postrm
dpkg-deb --build $BUILDROOT
case "$CURRENT_ARCH" in
"amd64")
DSTARCH="x86_64"
;;
"arm64")
DSTARCH="aarch64"
;;
"riscv64")
DSTARCH="riscv64"
;;
esac
mkdir -p ${OUTPUT_DIR}/${DSTARCH}
mv ${BUILDROOT}.deb ${OUTPUT_DIR}/${DSTARCH}/

View File

@@ -1,7 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.1.3
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:3.22.2-0
# https://github.com/yunionio/telegraf/blob/yn-release-1.36/Makefile.yn#L28
# install playbook and telegraf 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
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.3 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.3 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
ADD ./_output/alpine-build/bin/ansibleserver /opt/yunion/bin/ansibleserver

View File

@@ -1,8 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.15.4-0
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"
LABEL maintainer="Yousong Zhou <zhouyousong@yunionyun.com>"
ENV TZ UTC
ENV TZ="UTC"
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
@@ -13,6 +13,7 @@ RUN set -x \
&& apk add openssh-client \
&& apk add sshpass \
&& apk add py3-pip \
&& apk add py3-paramiko \
&& apk add tzdata git ca-certificates
RUN apk add --no-cache openssh openssl curl rsync pv mariadb-client
@@ -21,8 +22,10 @@ RUN apk add --no-cache --virtual .build-dependencies \
# ansible should be installed
# after setuptools and wheel
RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED
RUN pip3 install -U pip setuptools wheel \
&& pip3 install paramiko mysqlclient pywinrm \
&& pip3 install mysqlclient pywinrm \
&& pip3 install 'ansible<=9.0.0' \
&& apk del --no-network .build-dependencies \
&& rm -rf /root/.cache /root/.cargo /var/cache/apk/*

View File

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

View File

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

View File

@@ -1,8 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.9-20231219.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.9-20251215.0
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
RUN mkdir -p /opt/yunion/bin
ENV TZ UTC
ENV TZ="UTC"
ADD ./_output/alpine-build/bin/baremetal-agent /opt/yunion/bin/baremetal-agent

View File

@@ -1,7 +1,6 @@
#FROM --platform=linux/amd64 registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
#RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
#RUN yum install -y http://192.168.23.50:8083/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v3.10.8-20231215.0 as yunionos
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v4.0.0-20251201.0 as yunionos
FROM centos:8 as grub-stage
@@ -28,9 +27,9 @@ RUN cp /root/grub_arm64.efi /tftp
RUN cp -rf /usr/lib/grub/arm64-efi /tftp/grub
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3-3.13.5
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
RUN mkdir -p /opt/yunion/bin
@@ -70,6 +69,8 @@ COPY --from=yunionos /yunionos/x86_64/kernel /opt/cloud/yunion/baremetal
COPY --from=yunionos /yunionos/x86_64/initramfs /opt/cloud/yunion/baremetal
COPY --from=yunionos /yunionos/aarch64/kernel /opt/cloud/yunion/baremetal/kernel_aarch64
COPY --from=yunionos /yunionos/aarch64/initramfs /opt/cloud/yunion/baremetal/initramfs_aarch64
COPY --from=yunionos /yunionos/riscv64/kernel /opt/cloud/yunion/baremetal/kernel_riscv64
COPY --from=yunionos /yunionos/riscv64/initramfs /opt/cloud/yunion/baremetal/initramfs_riscv64
# TODO: syslinux firmwares should removed in future
COPY --from=yunionos /yunionos/x86_64/isolinux.bin /opt/cloud/yunion/baremetal

View File

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

View File

@@ -4,9 +4,9 @@ ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
ENV TZ="Asia/Shanghai"
RUN mkdir -p /opt/yunion/bin

View File

@@ -0,0 +1,24 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
ENV TZ="Asia/Shanghai"
RUN mkdir -p /opt/yunion/bin
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
RUN apk add --no-cache bash bash-completion tzdata ca-certificates vim ipmitool ceph-common dropbear shadow && \
rm -rf /var/cache/apk/*
RUN usermod --shell /bin/bash root
RUN curl -L https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN mkdir -p /opt/yunion/bin

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
RUN mkdir -p /etc/yunion/data/

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
# registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0
FROM debian:10
FROM debian:trixie
RUN apt update && apt install -y alien

View File

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

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
ADD ./_output/alpine-build/bin/dhcprelay /opt/yunion/bin/dhcprelay

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
ADD ./_output/alpine-build/bin/esxi-agent /opt/yunion/bin/esxi-agent

View File

@@ -1,23 +0,0 @@
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
LABEL maintainer="Rain Zheng <zhengyu@yunion.com>"
# openssh-client, for ansible ssh connection
# git, ca-certificates, for fetching ansible roles
RUN set -x \
&& apk update \
&& apk add git \
&& rm -rf /var/cache/apk/*
# install default playbook and 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
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,5 +1,5 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/glance-base:v0.0.1
FROM registry.cn-beijing.aliyuncs.com/yunionio/glance-base:3.22.2-0
ENV TZ UTC
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/glance /opt/yunion/bin/glance

View File

@@ -1,5 +1,7 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:20210815.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:3.22.2-0
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
RUN apk add --no-cache s3fs-fuse --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
RUN apk add --no-cache s3fs-fuse

View File

@@ -22,44 +22,25 @@
#
# The Alpine Linux image that should be used as the basis for the guacd image
ARG ALPINE_BASE_IMAGE=latest
FROM alpine:${ALPINE_BASE_IMAGE} AS builder
ARG ALPINE_BASE_IMAGE=3.22.2
ARG TARGETPLATFORM
# The target architecture of the build. Valid values are "ARM" and "X86". By
# default, this is detected automatically.
ARG BUILD_ARCHITECTURE
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
# The number of processes that may run simultaneously during the build. By
# default, this is detected automatically.
ARG BUILD_JOBS
# Install build dependencies
RUN apk add --no-cache \
autoconf \
automake \
build-base \
cairo-dev \
cmake \
cunit-dev \
git \
grep \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
make \
openssl1.1-compat-dev \
pango-dev \
pulseaudio-dev \
util-linux-dev
# Copy source to container for sake of build
# The directory that will house the guacamole-server source during the build
ARG BUILD_DIR=/tmp/guacamole-server
ARG GUAC_VER=1.5.3
RUN git clone --branch=${GUAC_VER} https://github.com/apache/guacamole-server.git /tmp/guacamole-server
#
# Base directory for installed build artifacts.
#
# NOTE: Due to limitations of the Docker image build process, this value is
# duplicated in an ARG in the second stage of the build.
#
# FreeRDP version (default to version 2)
ARG FREERDP_VERSION=2
# The final install location for guacamole-server and all dependencies. NOTE:
# This value is hard-coded in the entrypoint. Any change to this value must be
# propagated there.
ARG PREFIX_DIR=/opt/guacamole
#
@@ -67,11 +48,12 @@ ARG PREFIX_DIR=/opt/guacamole
# library (these can be overridden at build time if a specific version is
# needed)
#
ARG WITH_FREERDP='2(\.\d+)+'
ARG WITH_FREERDP="${FREERDP_VERSION}(\.\d+)+"
ARG WITH_LIBSSH2='libssh2-\d+(\.\d+)+'
ARG WITH_LIBTELNET='\d+(\.\d+)+'
ARG WITH_LIBVNCCLIENT='LibVNCServer-\d+(\.\d+)+'
ARG WITH_LIBWEBSOCKETS='v\d+(\.\d+)+'
ARG WITH_GUACAMOLE_SERVER='\d+(\.\d+)+'
#
# Default build options for each core protocol support library, as well as
@@ -79,6 +61,8 @@ ARG WITH_LIBWEBSOCKETS='v\d+(\.\d+)+'
# options are needed)
#
ARG FREERDP_ARM_OPTS=""
ARG FREERDP_OPTS="\
-DBUILTIN_CHANNELS=OFF \
-DCHANNEL_URBDRC=OFF \
@@ -89,22 +73,25 @@ ARG FREERDP_OPTS="\
-DWITH_CUPS=OFF \
-DWITH_DIRECTFB=OFF \
-DWITH_FFMPEG=OFF \
-DWITH_FUSE=OFF \
-DWITH_GSM=OFF \
-DWITH_GSSAPI=OFF \
-DWITH_IPP=OFF \
-DWITH_JPEG=ON \
-DWITH_KRB5=ON \
-DWITH_LIBSYSTEMD=OFF \
-DWITH_MANPAGES=OFF \
-DWITH_OPENH264=OFF \
-DWITH_OPENSSL=ON \
-DWITH_OSS=OFF \
-DWITH_PCSC=OFF \
-DWITH_PKCS11=OFF \
-DWITH_PULSE=OFF \
-DWITH_SERVER=OFF \
-DWITH_SERVER_INTERFACE=OFF \
-DWITH_SHADOW_MAC=OFF \
-DWITH_SHADOW_X11=OFF \
-DWITH_SSE2=ON \
-DWITH_SWSCALE=OFF \
-DWITH_WAYLAND=OFF \
-DWITH_X11=OFF \
-DWITH_X264=OFF \
@@ -116,21 +103,47 @@ ARG FREERDP_OPTS="\
-DWITH_XRENDER=OFF \
-DWITH_XTEST=OFF \
-DWITH_XV=OFF \
-DWITH_ZLIB=ON"
-DCMAKE_CXX_FLAGS=-Wno-incompatible-pointer-types \
-DCMAKE_C_FLAGS=-Wno-incompatible-pointer-types \
-DWITH_ZLIB=ON"
ARG FREERDP_X86_OPTS=""
ARG GUACAMOLE_SERVER_ARM_OPTS=""
ARG GUACAMOLE_SERVER_OPTS="\
--disable-guaclog"
--disable-guaclog \
CPPFLAGS=-Wno-error=deprecated-declarations"
ARG GUACAMOLE_SERVER_X86_OPTS=""
ARG GUACAMOLE_SERVER_UNKNOWN_OPTS=""
ARG LIBSSH2_ARM_OPTS=""
ARG LIBSSH2_OPTS="\
-DBUILD_EXAMPLES=OFF \
-DBUILD_SHARED_LIBS=ON"
ARG LIBSSH2_X86_OPTS=""
ARG LIBTELNET_ARM_OPTS=""
ARG LIBTELNET_OPTS="\
--disable-static \
--disable-util"
ARG LIBTELNET_X86_OPTS=""
ARG LIBVNCCLIENT_ARM_OPTS=""
ARG LIBVNCCLIENT_OPTS=""
ARG LIBVNCCLIENT_X86_OPTS=""
ARG LIBWEBSOCKETS_ARM_OPTS=""
ARG LIBWEBSOCKETS_OPTS="\
-DDISABLE_WERROR=ON \
-DLWS_WITHOUT_SERVER=ON \
@@ -141,45 +154,179 @@ ARG LIBWEBSOCKETS_OPTS="\
-DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
-DLWS_WITH_STATIC=OFF"
# Build guacamole-server and its core protocol library dependencies
RUN echo "$TARGETPLATFORM"
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; \
then FREERDP_OPTS="${FREERDP_OPTS} -DWITH_SSE2=ON" && echo "SSE2 active"; \
else FREERDP_OPTS="${FREERDP_OPTS} -DWITH_SSE2=OFF" && echo "SSE2 disabled"; \
fi && ${BUILD_DIR}/src/guacd-docker/bin/build-all.sh
ARG LIBWEBSOCKETS_X86_OPTS=""
#
# Base builder image that will be used by subsequent build stages, including
# for building dependencies of guacamole-server.
#
FROM alpine:${ALPINE_BASE_IMAGE} AS builder
ARG BUILD_DIR
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
# Install build dependencies
RUN apk add \
autoconf \
automake \
build-base \
cairo-dev \
cjson-dev \
cmake \
cunit-dev \
git \
grep \
krb5-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
make \
openssl-dev \
pango-dev \
pulseaudio-dev \
sdl2-dev \
sdl2_ttf-dev \
util-linux-dev
ARG GUAC_VER=1.6.0
RUN git clone --branch=${GUAC_VER} https://github.com/apache/guacamole-server.git ${BUILD_DIR}
#
# Build dependency: libssh2
#
FROM builder AS libssh2
ARG BUILD_DIR
ARG LIBSSH2_ARM_OPTS
ARG LIBSSH2_OPTS
ARG LIBSSH2_X86_OPTS
ARG PREFIX_DIR
ARG WITH_LIBSSH2
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBSSH2" \
"https://github.com/libssh2/libssh2"
#
# Build dependency: libtelnet
#
FROM builder AS libtelnet
ARG BUILD_DIR
ARG LIBTELNET_ARM_OPTS
ARG LIBTELNET_OPTS
ARG LIBTELNET_X86_OPTS
ARG PREFIX_DIR
ARG WITH_LIBTELNET
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBTELNET" \
"https://github.com/seanmiddleditch/libtelnet"
#
# Build dependency: libvncclient
#
FROM builder AS libvncclient
ARG BUILD_DIR
ARG LIBVNCCLIENT_ARM_OPTS
ARG LIBVNCCLIENT_OPTS
ARG LIBVNCCLIENT_X86_OPTS
ARG PREFIX_DIR
ARG WITH_LIBVNCCLIENT
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBVNCCLIENT" \
"https://github.com/LibVNC/libvncserver"
#
# Build dependency: libwebsockets
#
FROM builder AS libwebsockets
ARG BUILD_DIR
ARG LIBWEBSOCKETS_ARM_OPTS
ARG LIBWEBSOCKETS_OPTS
ARG LIBWEBSOCKETS_X86_OPTS
ARG PREFIX_DIR
ARG WITH_LIBWEBSOCKETS
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBWEBSOCKETS" \
"https://github.com/warmcat/libwebsockets"
#
# Build dependency: FreeRDP
#
FROM builder AS freerdp
ARG BUILD_DIR
ARG FREERDP_ARM_OPTS
ARG FREERDP_OPTS
ARG FREERDP_X86_OPTS
ARG PREFIX_DIR
ARG WITH_FREERDP
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "FREERDP" \
"https://github.com/FreeRDP/FreeRDP"
#
# STAGE 7: Collect dependencies built by previous stages and build
# guacamole-server.
#
FROM builder AS guacamole-server
ARG BUILD_DIR
ARG FREERDP_VERSION
ARG GUACAMOLE_SERVER_ARM_OPTS
ARG GUACAMOLE_SERVER_UNKNOWN_OPTS
ARG GUACAMOLE_SERVER_OPTS
ARG GUACAMOLE_SERVER_X86_OPTS
ARG PREFIX_DIR
ARG WITH_GUACAMOLE_SERVER
# Copy dependencies built in previous stages
COPY --from=freerdp ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=libssh2 ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=libtelnet ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=libvncclient ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=libwebsockets ${PREFIX_DIR} ${PREFIX_DIR}
# Use guacamole-server source from build context
COPY --from=builder ${BUILD_DIR} ${BUILD_DIR}
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "GUACAMOLE_SERVER" "${BUILD_DIR}"
# Determine location of the FREERDP library based on the version.
ARG FREERDP_LIB_PATH=${PREFIX_DIR}/lib/freerdp${FREERDP_VERSION}
# Record the packages of all runtime library dependencies
RUN ${BUILD_DIR}/src/guacd-docker/bin/list-dependencies.sh \
${PREFIX_DIR}/sbin/guacd \
${PREFIX_DIR}/lib/libguac-client-*.so \
${PREFIX_DIR}/lib/freerdp2/*guac*.so \
${FREERDP_LIB_PATH}/*guac*.so \
> ${PREFIX_DIR}/DEPENDENCIES
#
# STAGE 8: Final, runtime image.
#
# Use same Alpine version as the base for the runtime image
FROM alpine:${ALPINE_BASE_IMAGE}
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
#
# Base directory for installed build artifacts. See also the
# CMD directive at the end of this build stage.
#
# NOTE: Due to limitations of the Docker image build process, this value is
# duplicated in an ARG in the first stage of the build.
#
ARG PREFIX_DIR=/opt/guacamole
# Runtime environment
ENV LC_ALL=C.UTF-8
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib
ENV GUACD_LOG_LEVEL=info
FROM alpine:${ALPINE_BASE_IMAGE} AS runtime
ARG PREFIX_DIR
ARG BUILD_DIR
# Copy build artifacts into this stage
COPY --from=builder ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=guacamole-server ${PREFIX_DIR} ${PREFIX_DIR}
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
RUN cat ${PREFIX_DIR}/DEPENDENCIES
# Bring runtime environment up to date and install runtime dependencies
RUN apk add --no-cache \
ca-certificates \
font-noto-cjk \
ghostscript \
netcat-openbsd \
shadow \
@@ -189,6 +336,10 @@ RUN apk add --no-cache \
util-linux-login && \
xargs apk add --no-cache < ${PREFIX_DIR}/DEPENDENCIES
# Runtime environment
ENV LC_ALL=C.UTF-8
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib
# Checks the operating status every 5 minutes with a timeout of 5 seconds
HEALTHCHECK --interval=5m --timeout=5s CMD nc -z 127.0.0.1 4822 || exit 1
@@ -197,8 +348,6 @@ ARG UID=1000
ARG GID=1000
RUN groupadd --gid $GID guacd
RUN useradd --system --create-home --shell /sbin/nologin --uid $UID --gid $GID guacd
RUN mkdir -p /opt/cloudpods
RUN chown -R guacd:guacd /opt/cloudpods
# Run with user guacd
USER guacd
@@ -206,9 +355,6 @@ USER guacd
# Expose the default listener port
EXPOSE 4822
# Start guacd, listening on port 0.0.0.0:4822
#
# Note the path here MUST correspond to the value specified in the
# PREFIX_DIR build argument.
#
CMD /opt/guacamole/sbin/guacd -b 0.0.0.0 -L $GUACD_LOG_LEVEL -f
COPY --from=guacamole-server ${BUILD_DIR}/src/guacd-docker/bin/entrypoint.sh /opt/guacamole/
#COPY
ENTRYPOINT [ "/opt/guacamole/entrypoint.sh" ]

View File

@@ -1,8 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.7.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.9.0
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
ENV TZ UTC
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/host /opt/yunion/bin/host

View File

@@ -1,9 +1,9 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.4.9
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.5.8
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
ENV TZ UTC
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin
ADD ./_output/centos-build/bin/host-deployer /opt/yunion/bin/host-deployer
ADD ./_output/alpine-build/bin/host-deployer /opt/yunion/bin/host-deployer

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
ADD ./_output/alpine-build/bin/host-health /opt/yunion/bin/host-health

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
FROM alpine:3.19
FROM alpine:3.22.2
ARG TARGETPLATFORM
ARG BUILDPLATFORM
@@ -6,4 +6,4 @@ ARG TARGETARCH
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
RUN apk update && apk add curl android-tools && rm -rf /var/cache/apk/*
RUN curl https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl
RUN curl -L https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl

View File

@@ -1,8 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/lbagent-base:v0.0.4
FROM registry.cn-beijing.aliyuncs.com/yunionio/lbagent-base:v0.0.5
MAINTAINER "Yousong Zhou <zhouyousong@yunion.cn>"
LABEL maintainer="Yousong Zhou <zhouyousong@yunion.cn>"
ENV TZ UTC
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/lbagent /opt/yunion/bin/lbagent

View File

@@ -1,12 +1,12 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-2
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-5
MAINTAINER "Jian QIU <qiujian@yunion.cn>"
LABEL maintainer="Jian QIU <qiujian@yunion.cn>"
ENV TZ UTC
ENV TZ="UTC"
ENV GOPATH=/root/go
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
RUN sed -i 's!v3.20/!v3.22/!g' /etc/apk/repositories
RUN set -x \
&& apk update \

View File

@@ -0,0 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
ADD ./_output/alpine-build/bin/llm /opt/yunion/bin/llm

View File

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

View File

@@ -0,0 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
ADD ./_output/alpine-build/bin/mcp-server /opt/yunion/bin/mcp-server

View File

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

View File

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

View File

@@ -1,9 +1,9 @@
# TODO: use 3.14 will lead 'apk add qemu-img fail on arm64'
FROM alpine:3.13.5
FROM alpine:3.22.1
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
ENV TZ UTC
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin

View File

@@ -1,8 +1,8 @@
FROM alpine:3.15.4
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
ENV TZ UTC
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin

View File

@@ -0,0 +1,13 @@
FROM alpine:3.22.2
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
RUN apk update && \
apk add --no-cache tzdata curl busybox-extras tcpdump strace ca-certificates && \
rm -rf /var/cache/apk/*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,10 +1,6 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
# HACK: use v3.14 alpine mirror to upgrade qemu-img
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
RUN apk update && \
apk add --no-cache qemu-img && \

View File

@@ -1,7 +1,7 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.10.5-1
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-5
MAINTAINER "Yousong Zhou <zhouyousong@yunion.cn>"
LABEL maintainer="Yousong Zhou <zhouyousong@yunion.cn>"
ENV TZ UTC
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/vpcagent /opt/yunion/bin/vpcagent

View File

@@ -1,5 +1,3 @@
# FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20230731.2
# FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20240514.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20240909.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:3.22.2-1
ADD ./_output/alpine-build/bin/webconsole /opt/yunion/bin/webconsole

View File

@@ -1,8 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/kubectl:1.22.9
FROM registry.cn-beijing.aliyuncs.com/yunionio/kubectl:3.22.2-1
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
ENV TZ UTC
ENV TZ="UTC"
RUN mkdir -p /opt/yunion/bin

View File

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

View File

@@ -1,6 +1,6 @@
REGISTRY ?= "registry.cn-beijing.aliyuncs.com/yunionio"
DOCKER_BUILD = docker build -t $(REGISTRY)
DOCKER_BUILDX = docker buildx build --platform linux/arm64,linux/amd64 --push -t $(REGISTRY)
DOCKER_BUILDX = docker buildx build --platform linux/arm64,linux/amd64,linux/riscv64 --push -t $(REGISTRY)
debian10-base:
@@ -9,73 +9,73 @@ debian10-base:
ONECLOUD_BASE_VERSION = v0.3-3.13.5
ONECLOUD_BASE_VERSION_3-15-4 = v3.15.4-0
ONECLOUD_BASE_VERSION_3-22-2 = 3.22.2-0
onecloud-base:
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION) -f ./Dockerfile.onecloud-base .
onecloud-base-3-15-4:
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION_3-15-4) -f ./Dockerfile.onecloud-base-3-15-4 .
onecloud-base-3-22-2:
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION_3-22-2) -f ./Dockerfile.onecloud-base-3-22-2 .
ANSIBLESERVER_BASE = v1.1.3
ANSIBLESERVER_BASE = 3.22.2-0
ansibleserver-base:
$(DOCKER_BUILDX)/ansibleserver-base:$(ANSIBLESERVER_BASE) -f ./Dockerfile.ansibleserver-base .
CLIMC_BASE_VERSION = 20230731.5
CLIMC_BASE_VERSION_3-22-2 = 3.22.2-2
climc-base:
docker buildx build --platform linux/arm64,linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/climc-base:$(CLIMC_BASE_VERSION) -f ./Dockerfile.climc-base .
$(DOCKER_BUILDX)/climc-base:$(CLIMC_BASE_VERSION) -f ./Dockerfile.climc-base .
KUBECTL_VERSION = 1.22.9
climc-base-3-22-2:
$(DOCKER_BUILDX)/climc-base:$(CLIMC_BASE_VERSION_3-22-2) -f ./Dockerfile.climc-base-3-22-2 .
KUBECTL_VERSION_3-22-2 = 3.22.2-1
kubectl:
docker buildx build --platform linux/arm64,linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/kubectl:$(KUBECTL_VERSION) -f ./Dockerfile.kubectl .
$(DOCKER_BUILDX)/kubectl:$(KUBECTL_VERSION_3-22-2) -f ./Dockerfile.kubectl .
WEBCONSOLE_BASE_VERSION = 20240909.0
WEBCONSOLE_BASE_VERSION_3-22-2 = 3.22.2-1
webconsole-base:
$(DOCKER_BUILDX)/webconsole-base:$(WEBCONSOLE_BASE_VERSION) -f ./Dockerfile.webconsole-base .
$(DOCKER_BUILDX)/webconsole-base:$(WEBCONSOLE_BASE_VERSION_3-22-2) -f ./Dockerfile.webconsole-base .
BAREMETAL_BASE_VERSION = v0.3.9-20231219.1
BAREMETAL_BASE_VERSION = v0.3.9-20251112.1
FEDORA_RISCV64_VERSION = 42
fedora-riscv64-base:
wget -q https://dl.fedoraproject.org/pub/alt/risc-v/release/$(FEDORA_RISCV64_VERSION)/Container/riscv64/images/Fedora-Container-Base-Generic-$(FEDORA_RISCV64_VERSION).20250414-8635a3a5bfcd.riscv64.oci.tar.xz && \
xz -d Fedora-Container-Base-Generic-$(FEDORA_RISCV64_VERSION).20250414-8635a3a5bfcd.riscv64.oci.tar.xz && \
skopeo copy oci-archive:Fedora-Container-Base-Generic-$(FEDORA_RISCV64_VERSION).20250414-8635a3a5bfcd.riscv64.oci.tar docker-daemon:fedora-riscv64:$(FEDORA_RISCV64_VERSION) && \
rm -f Fedora-Container-Base-Generic-$(FEDORA_RISCV64_VERSION).20250414-8635a3a5bfcd.riscv64.oci.tar
baremetal-base-riscv: fedora-riscv64-base
$(DOCKER_BUILDX)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base-riscv .
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
baremetal-base:
$(DOCKER_BUILDX)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base .
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
TORRENT_VERSION = 20210815.0
TORRENT_VERSION_3-22-2 = 3.22.2-0
torrent:
$(DOCKER_BUILDX)/torrent:$(TORRENT_VERSION) -f ./Dockerfile.torrent .
GLANCE_BASE_VERSION = v0.0.1
GLANCE_BASE_VERSION_3-22-2 = 3.22.2-0
glance-base:
$(DOCKER_BUILDX)/glance-base:$(GLANCE_BASE_VERSION) -f ./Dockerfile.glance-base .
FILE_REPO_VERSION = v0.5.4
glance-base-3-22-2:
$(DOCKER_BUILDX)/glance-base:$(GLANCE_BASE_VERSION_3-22-2) -f ./Dockerfile.glance-base .
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)
host-image:
docker pull $(HOST_IMAGE_NAME)-amd64 --platform amd64
docker pull $(HOST_IMAGE_NAME)-arm64 --platform arm64
docker manifest create $(HOST_IMAGE_NAME) \
$(HOST_IMAGE_NAME)-amd64 \
$(HOST_IMAGE_NAME)-arm64
docker manifest annotate $(HOST_IMAGE_NAME) $(HOST_IMAGE_NAME)-amd64 --arch amd64
docker manifest annotate $(HOST_IMAGE_NAME) $(HOST_IMAGE_NAME)-arm64 --arch arm64
docker manifest push $(HOST_IMAGE_NAME)
LBAGENT_BASE_VERSION = v0.0.3
LBAGENT_BASE_VERSION = v0.0.5
lbagent-base:
$(DOCKER_BUILDX)/lbagent-base:$(LBAGENT_BASE_VERSION) -f ./Dockerfile.lbagent-base .
GUACD_VERSION=1.5.3
GUACD_VERSION=1.6.0
guacd:
docker buildx build --platform linux/arm64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-arm64 -f ./Dockerfile.guacd .
docker buildx build --platform linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-amd64 -f ./Dockerfile.guacd .
docker buildx imagetools create -t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION) \
registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-amd64 \
registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-arm64
$(DOCKER_BUILDX)/guacd:$(GUACD_VERSION) -f ./Dockerfile.guacd .

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.19.0-go-1.21.10-0 as build
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.22.2-go-1.24.9-0 AS build
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN mkdir -p /root/go/src/yunion.io/x/onecloud
@@ -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.7.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.9.0
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
ENV TZ UTC
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

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:1.0-5 as build
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.22.2-go-1.24.9-0 AS build
ARG TARGETPLATFORM
ARG BUILDPLATFORM
@@ -6,13 +6,11 @@ RUN mkdir -p /root/go/src/yunion.io/x/onecloud
COPY . /root/go/src/yunion.io/x/onecloud
RUN cd /root/go/src/yunion.io/x/onecloud && make cmd/torrent
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
# HACK: use v3.14 alpine mirror to upgrade qemu-img
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
RUN apk update && \
apk add --no-cache qemu-img && \

View File

@@ -1,5 +1,5 @@
DESCRIPTION="Yunion Cloud Image Service"
REQUIRES=(
yunion-qemu-2.12.1
yunion-qemu-4.2.0
)

View File

@@ -1,9 +1,11 @@
{{.title}}
策略名称: {{.name}}
触发时间: {{.start_time}}
报警级别: {{.level}}
触发条件: {{.description | unescaped}}
报警数量:{{len .matches}}
触发条件:{{if eq (len .matches) 1}} {{(index .matches 0).condition | unescaped}}{{else}}
{{- range .matches}}- {{.condition | unescaped}}
{{- end}}{{end}}
{{if .reason}}报警原因: {{.reason}}
{{end}}报警数量:{{len .matches}}
资源名称:{{.resource_name}}
详情地址: {{.web_url}}

View File

@@ -88,8 +88,19 @@
</tr>
<tr>
<td class="td">策略详情:</td>
<td>{{.description}}</td>
<td>
{{- range $i, $m := .matches -}}
{{- if $i}}<br/>{{end -}}
{{- $m.condition | unescaped -}}
{{- end -}}
</td>
</tr>
{{if .reason}}
<tr>
<td class="td">报警原因:</td>
<td>{{.reason}}</td>
</tr>
{{end}}
</table>
<table class="table" style="padding-top: 6px; padding-bottom: 10px;">
<tr>

View File

@@ -1,9 +1,11 @@
{{.title}}
AlertName: {{.name}}
Time: {{.start_time}}
Level: {{.level}}
TriggerCondition: {{.description | unescaped}}
AlertCount: {{len .matches}}
TriggerCondition:{{if eq (len .matches) 1}} {{(index .matches 0).condition | unescaped}}{{else}}
{{- range .matches}}- {{.condition | unescaped}}
{{- end}}{{end}}
{{if .reason}}Reason: {{.reason}}
{{end}}AlertCount: {{len .matches}}
ResourceName: {{.resource_name}}
WebUrl: {{.web_url}}

View File

@@ -88,8 +88,19 @@
</tr>
<tr>
<td class="td">Strategy details</td>
<td>{{.description}}</td>
<td>
{{- range $i, $m := .matches -}}
{{- if $i}}<br/>{{end -}}
{{- $m.condition | unescaped -}}
{{- end -}}
</td>
</tr>
{{if .reason}}
<tr>
<td class="td">Reason</td>
<td>{{.reason}}</td>
</tr>
{{end}}
</table>
<table class="table" style="padding-top: 6px; padding-bottom: 10px;">
<tr>

View File

@@ -1 +1 @@
{{.title}}
{{monitorTitle .}}

View File

@@ -1 +1 @@
{{.title}}
{{monitorTitle .}}

View File

@@ -1 +1 @@
{{.title}}
{{monitorTitle .}}

View File

@@ -1 +1 @@
{{.title}}
{{monitorTitle .}}

View File

@@ -30,6 +30,7 @@ import (
_ "yunion.io/x/onecloud/cmd/climc/shell/identity"
_ "yunion.io/x/onecloud/cmd/climc/shell/image"
_ "yunion.io/x/onecloud/cmd/climc/shell/k8s"
_ "yunion.io/x/onecloud/cmd/climc/shell/llm"
_ "yunion.io/x/onecloud/cmd/climc/shell/logger"
_ "yunion.io/x/onecloud/cmd/climc/shell/misc"
_ "yunion.io/x/onecloud/cmd/climc/shell/monitor"

View File

@@ -0,0 +1,31 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/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() {
cmd := shell.NewResourceCmd(&modules.AiGateways).WithKeyword("ai-gateway")
cmd.List(&compute.AiGatewayListOptions{})
cmd.Delete(&options.BaseIdOptions{})
cmd.Create(&compute.AiGatewayCreateOptions{})
cmd.Perform("syncstatus", &options.BaseIdOptions{})
cmd.Perform("change-config", &compute.AiGatewayChangeConfigOptions{})
}

View File

@@ -15,6 +15,11 @@
package compute
import (
"fmt"
"os"
"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"
@@ -39,6 +44,16 @@ func init() {
dbCmd.Create(&compute.DiskBackupCreateOptions{})
dbCmd.Perform("recovery", &compute.DiskBackupRecoveryOptions{})
dbCmd.Perform("syncstatus", &compute.DiskBackupSyncstatusOptions{})
dbCmd.GetWithCustomOptionShow("export-info", func(info jsonutils.JSONObject, opts shell.IGetOpt) {
args := opts.(*compute.DiskBackupExportOptions)
if args.Output != "" {
os.WriteFile(args.Output, []byte(info.String()), 0644)
fmt.Printf("Exported to %s\n", args.Output)
} else {
printObject(info)
}
}, &compute.DiskBackupExportOptions{})
dbCmd.PerformClass("import", &compute.DiskBackupImportOptions{})
ibCmd := shell.NewResourceCmd(&modules.InstanceBackups)
ibCmd.List(&compute.InstanceBackupListOptions{})

View File

@@ -19,178 +19,71 @@ import (
"io"
"os"
"yunion.io/x/cloudmux/pkg/multicloud/objectstore"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/util/fileutils"
"yunion.io/x/pkg/util/printutils"
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/mcclient"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
"yunion.io/x/onecloud/pkg/mcclient/options"
computeoptions "yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
type BucketListOptions struct {
options.BaseListOptions
DistinctField string `help:"query specified distinct field"`
}
R(&BucketListOptions{}, "bucket-list", "List all buckets", func(s *mcclient.ClientSession, args *BucketListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
if len(args.DistinctField) > 0 {
params.Add(jsonutils.NewString(args.DistinctField), "extra_field")
result, err := modules.Buckets.Get(s, "distinct-field", params)
if err != nil {
return err
}
fmt.Println(result)
return nil
}
result, err := modules.Buckets.List(s, params)
if err != nil {
return err
}
printList(result, modules.Buckets.GetColumns(s))
return nil
})
type BucketIdOptions struct {
ID string `help:"ID or name of bucket"`
}
R(&BucketIdOptions{}, "bucket-show", "Id details of bucket", func(s *mcclient.ClientSession, args *BucketIdOptions) error {
result, err := modules.Buckets.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&BucketIdOptions{}, "bucket-syncstatus", "Sync bucket statust", func(s *mcclient.ClientSession, args *BucketIdOptions) error {
result, err := modules.Buckets.PerformAction(s, args.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketUpdateOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
Name string `help:"new name of bucket" json:"name"`
Desc string `help:"Description of bucket" json:"description" token:"desc"`
}
R(&BucketUpdateOptions{}, "bucket-update", "update bucket", func(s *mcclient.ClientSession, args *BucketUpdateOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Buckets.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketDeleteOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketDeleteOptions{}, "bucket-delete", "delete bucket", func(s *mcclient.ClientSession, args *BucketDeleteOptions) error {
result, err := modules.Buckets.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketCreateOptions struct {
NAME string `help:"name of bucket" json:"name"`
CLOUDREGION string `help:"location of bucket" json:"cloudregion"`
MANAGER string `help:"cloud provider" json:"manager"`
StorageClass string `help:"bucket storage class"`
Acl string `help:"bucket ACL"`
}
R(&BucketCreateOptions{}, "bucket-create", "Create a bucket", func(s *mcclient.ClientSession, args *BucketCreateOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
result, err := modules.Buckets.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketListObjectsOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
Prefix string `help:"List objects with prefix"`
Recursive bool `help:"List objects recursively"`
Limit int `help:"maximal items per request"`
PagingMarker string `help:"paging marker"`
}
R(&BucketListObjectsOptions{}, "bucket-object-list", "List objects in a bucket", func(s *mcclient.ClientSession, args *BucketListObjectsOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
result, err := modules.Buckets.GetSpecific(s, args.ID, "objects", params)
if err != nil {
return err
}
cmd := shell.NewResourceCmd(&modules.Buckets)
cmd.List(&computeoptions.BucketListOptions{})
cmd.GetProperty(&computeoptions.BucketGetPropertyOptions{})
cmd.Show(&computeoptions.BucketIdOptions{})
cmd.Perform("syncstatus", &computeoptions.BucketIdOptions{})
cmd.Update(&computeoptions.BucketUpdateOptions{})
cmd.Delete(&computeoptions.BucketIdOptions{})
cmd.Create(&computeoptions.BucketCreateOptions{})
cmd.GetWithCustomOptionShow("objects", func(data jsonutils.JSONObject, args shell.IGetOpt) {
listResult := printutils.ListResult{}
err = result.Unmarshal(&listResult)
err := data.Unmarshal(&listResult)
if err != nil {
return err
return
}
printList(&listResult, []string{})
return nil
})
}, &computeoptions.BucketListObjectsOptions{})
cmd.Perform("delete", &computeoptions.BucketDeleteObjectsOptions{})
cmd.Perform("makedir", &computeoptions.BucketMakeDirOptions{})
cmd.Perform("temp-url", &computeoptions.BucketPresignObjectsOptions{})
cmd.Perform("acl", &computeoptions.BucketSetAclOptions{})
cmd.GetWithCustomOptionShow("acl", func(data jsonutils.JSONObject, args shell.IGetOpt) {
printObject(data)
}, &computeoptions.BucketAclOptions{})
cmd.Perform("sync", &computeoptions.BucketSyncOptions{})
cmd.Perform("limit", &computeoptions.BucketLimitOptions{})
cmd.GetWithCustomOptionShow("access-info", func(data jsonutils.JSONObject, args shell.IGetOpt) {
printObject(data)
}, &computeoptions.BucketAccessInfoOptions{})
cmd.Perform("metadata", &computeoptions.BucketSetMetadataOptions{})
cmd.Perform("set-website", &computeoptions.BucketSetWebsiteOption{})
cmd.GetWithCustomOptionShow("website", func(data jsonutils.JSONObject, args shell.IGetOpt) {
printObject(data)
}, &computeoptions.BucketGetWebsiteConfOption{})
cmd.Perform("delete-website", &computeoptions.BucketDeleteWebsiteConfOption{})
cmd.Perform("set-cors", &computeoptions.BucketSetCorsOption{})
cmd.GetWithCustomOptionShow("cors", func(data jsonutils.JSONObject, args shell.IGetOpt) {
printObject(data)
}, &computeoptions.BucketGetCorsOption{})
cmd.Perform("delete-cors", &computeoptions.BucketDeleteCorsOption{})
cmd.Perform("set-referer", &computeoptions.BucketSetRefererOption{})
cmd.GetWithCustomOptionShow("referer", func(data jsonutils.JSONObject, args shell.IGetOpt) {
printObject(data)
}, &computeoptions.BucketGetRefererOption{})
cmd.GetWithCustomOptionShow("cdn-domain", func(data jsonutils.JSONObject, args shell.IGetOpt) {
printObject(data)
}, &computeoptions.BucketGetCdnDomainOption{})
cmd.GetWithCustomOptionShow("policy", func(data jsonutils.JSONObject, args shell.IGetOpt) {
printObject(data)
}, &computeoptions.BucketGetPolicyOption{})
cmd.Perform("set-policy", &computeoptions.BucketSetPolicyOption{})
cmd.Perform("delete-policy", &computeoptions.BucketDeletePolicyOption{})
type BucketDeleteObjectsOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
KEYS []string `help:"List of objects to delete"`
}
R(&BucketDeleteObjectsOptions{}, "bucket-object-delete", "Delete objects in a bucket", func(s *mcclient.ClientSession, args *BucketDeleteObjectsOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Buckets.PerformAction(s, args.ID, "delete", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketMakeDirOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
KEY string `help:"DIR key to create"`
}
R(&BucketMakeDirOptions{}, "bucket-mkdir", "Mkdir in a bucket", func(s *mcclient.ClientSession, args *BucketMakeDirOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Buckets.PerformAction(s, args.ID, "makedir", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketUploadObjectsOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
KEY string `help:"Key of object to upload"`
Path string `help:"Path to file to upload" required:"true"`
ContentLength int64 `help:"Content lenght (bytes)" default:"-1"`
StorageClass string `help:"storage CLass"`
Acl string `help:"object acl." choices:"private|public-read|public-read-write"`
objectstore.ObjectHeaderOptions
}
R(&BucketUploadObjectsOptions{}, "bucket-object-upload", "Upload an object into a bucket", func(s *mcclient.ClientSession, args *BucketUploadObjectsOptions) error {
R(&computeoptions.BucketUploadObjectsOptions{}, "bucket-object-upload", "Upload an object into a bucket", func(s *mcclient.ClientSession, args *computeoptions.BucketUploadObjectsOptions) error {
var body io.Reader
if len(args.Path) > 0 {
file, err := os.Open(args.Path)
@@ -223,332 +116,36 @@ func init() {
return nil
})
type BucketPresignObjectsOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
KEY string `help:"Key of object to upload"`
Method string `help:"Request method" choices:"GET|PUT|DELETE"`
ExpireSeconds int `help:"expire in seconds" default:"60"`
}
R(&BucketPresignObjectsOptions{}, "bucket-object-tempurl", "Get temporal URL for an object in a bucket", func(s *mcclient.ClientSession, args *BucketPresignObjectsOptions) error {
params, err := options.StructToParams(args)
R(&computeoptions.BucketPerfMonOptions{}, "bucket-perf-mon", "Bucket performance monitor", func(s *mcclient.ClientSession, args *computeoptions.BucketPerfMonOptions) error {
result, err := modules.Buckets.Get(s, args.ID, nil)
if err != nil {
return err
}
result, err := modules.Buckets.PerformAction(s, args.ID, "temp-url", params)
bucketDetails := compute.BucketDetails{}
err = result.Unmarshal(&bucketDetails)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetAclOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
ACL string `help:"ACL to set" choices:"default|private|public-read|public-read-write" json:"acl"`
Key []string `help:"Optional object key" json:"key"`
}
R(&BucketSetAclOptions{}, "bucket-set-acl", "Set ACL of bucket or object", func(s *mcclient.ClientSession, args *BucketSetAclOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Buckets.PerformAction(s, args.ID, "acl", params)
bucket, err := modules.GetIBucket(s.GetContext(), s, &bucketDetails)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketAclOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
Key string `help:"Optional object key"`
}
R(&BucketAclOptions{}, "bucket-acl", "Get ACL of bucket or object", func(s *mcclient.ClientSession, args *BucketAclOptions) error {
params, err := options.StructToParams(args)
payload, err := fileutils.GetSizeBytes(args.Payload, 1024)
if err != nil {
return err
}
result, err := modules.Buckets.GetSpecific(s, args.ID, "acl", params)
stats, err := modules.ProbeBucketStats(s.GetContext(), bucket, "test", int64(payload))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSyncOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
StatsOnly bool `help:"sync statistics only"`
}
R(&BucketSyncOptions{}, "bucket-sync", "Sync bucket", func(s *mcclient.ClientSession, args *BucketSyncOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
result, err := modules.Buckets.PerformAction(s, args.ID, "sync", params)
if err != nil {
return err
}
printObject(result)
return nil
})
fmt.Printf("Upload delay %f ms throughput %f MB/s\n", stats.UploadDelayMs(), stats.UploadThroughputMbps(payload/1024/1024))
fmt.Printf("Download delay %f ms throughput %f MB/s\n", stats.DownloadDelayMs(), stats.DownloadThroughputMbps(payload/1024/1024))
fmt.Printf("Delete delay %f ms\n", stats.DeleteDelayMs())
type BucketLimitOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
SizeBytes int64 `help:"size limit in bytes"`
ObjectCount int64 `help:"object count limit"`
}
R(&BucketLimitOptions{}, "bucket-limit", "Set limit of bucket", func(s *mcclient.ClientSession, args *BucketLimitOptions) error {
limit := jsonutils.Marshal(args)
params := jsonutils.NewDict()
params.Set("limit", limit)
result, err := modules.Buckets.PerformAction(s, args.ID, "limit", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketAccessInfoOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketAccessInfoOptions{}, "bucket-access-info", "Show backend access info of a bucket", func(s *mcclient.ClientSession, args *BucketAccessInfoOptions) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "access-info", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetMetadataOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
Key []string `help:"Optional object key" json:"key"`
objectstore.ObjectHeaderOptions
}
R(&BucketSetMetadataOptions{}, "bucket-set-metadata", "Set metadata of object", func(s *mcclient.ClientSession, args *BucketSetMetadataOptions) error {
input := api.BucketMetadataInput{}
input.Key = args.Key
input.Metadata = args.ObjectHeaderOptions.Options2Header()
err := input.Validate()
if err != nil {
return err
}
result, err := modules.Buckets.PerformAction(s, args.ID, "metadata", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetWebsiteOption struct {
ID string `help:"ID or name of bucket" json:"-"`
// 主页
Index string `help:"main page"`
// 错误时返回的文档
ErrorDocument string `help:"error return"`
// http或https
Protocol string `help:"force https" choices:"http|https"`
}
R(&BucketSetWebsiteOption{}, "bucket-set-website", "Set bucket website", func(s *mcclient.ClientSession, args *BucketSetWebsiteOption) error {
conf := api.BucketWebsiteConf{
Index: args.Index,
ErrorDocument: args.ErrorDocument,
Protocol: args.Protocol,
}
result, err := modules.Buckets.PerformAction(s, args.ID, "set-website", jsonutils.Marshal(conf))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetWebsiteConfOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetWebsiteConfOption{}, "bucket-get-website", "Get bucket website", func(s *mcclient.ClientSession, args *BucketGetWebsiteConfOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "website", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketDeleteWebsiteConfOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketDeleteWebsiteConfOption{}, "bucket-delete-website", "Delete bucket website", func(s *mcclient.ClientSession, args *BucketDeleteWebsiteConfOption) error {
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-website", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetCorsOption struct {
ID string `help:"ID or name of bucket" json:"-"`
AllowedMethods []string `help:"allowed http method" choices:"PUT|GET|POST|DELETE|HEAD"`
// 允许的源站,可以设为*
AllowedOrigins []string
AllowedHeaders []string
MaxAgeSeconds int
ExposeHeaders []string
RuleId string
}
R(&BucketSetCorsOption{}, "bucket-set-cors", "Set bucket cors", func(s *mcclient.ClientSession, args *BucketSetCorsOption) error {
rule := api.BucketCORSRule{
AllowedOrigins: args.AllowedOrigins,
AllowedMethods: args.AllowedMethods,
AllowedHeaders: args.AllowedHeaders,
MaxAgeSeconds: args.MaxAgeSeconds,
ExposeHeaders: args.ExposeHeaders,
Id: args.RuleId,
}
rules := api.BucketCORSRules{Data: []api.BucketCORSRule{rule}}
result, err := modules.Buckets.PerformAction(s, args.ID, "set-cors", jsonutils.Marshal(rules))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetCorsOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetCorsOption{}, "bucket-get-cors", "Get bucket cors", func(s *mcclient.ClientSession, args *BucketGetCorsOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "cors", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketDeleteCorsOption struct {
ID string `help:"ID or name of bucket" json:"-"`
Id []string `"help:Id of rules to delete"`
}
R(&BucketDeleteCorsOption{}, "bucket-delete-cors", "Delete bucket cors", func(s *mcclient.ClientSession, args *BucketDeleteCorsOption) error {
input := api.BucketCORSRuleDeleteInput{}
input.Id = args.Id
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-cors", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetRefererOption struct {
ID string `help:"ID or name of bucket" json:"-"`
// 域名列表
DomainList []string
// 是否允许空referer 访问
AllowEmptyRefer bool `help:"all empty refer access"`
Enabled bool
RerererType string `help:"Referer type" choices:"Black-List|White-List"`
}
R(&BucketSetRefererOption{}, "bucket-set-referer", "Set bucket referer", func(s *mcclient.ClientSession, args *BucketSetRefererOption) error {
conf := api.BucketRefererConf{
Enabled: args.Enabled,
AllowEmptyRefer: args.AllowEmptyRefer,
RefererType: args.RerererType,
DomainList: args.DomainList,
}
result, err := modules.Buckets.PerformAction(s, args.ID, "set-referer", jsonutils.Marshal(conf))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetRefererOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetRefererOption{}, "bucket-get-referer", "get bucket referer", func(s *mcclient.ClientSession, args *BucketGetRefererOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "referer", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetCdnDomainOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetRefererOption{}, "bucket-get-cdn-domain", "get bucket cdn domain", func(s *mcclient.ClientSession, args *BucketGetRefererOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "cdn-domain", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetPolicyOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetPolicyOption{}, "bucket-get-policy", "get bucket policy", func(s *mcclient.ClientSession, args *BucketGetPolicyOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "policy", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetPolicyOption struct {
ID string `help:"ID or name of bucket" json:"-"`
// 格式主账号id:子账号id
PrincipalId []string `help:"ext account id, accountId:subaccountId"`
// Read|ReadWrite|FullControl
CannedAction string `help:"authority action" choice:"Read|FullControl"`
// Allow|Deny
Effect string `help:"allow or deny" choice:"Allow|Deny"`
// 被授权的资源地址
ResourcePath []string
// ip 条件
IpEquals []string
IpNotEquals []string
}
R(&BucketSetPolicyOption{}, "bucket-set-policy", "set bucket policy", func(s *mcclient.ClientSession, args *BucketSetPolicyOption) error {
opts := api.BucketPolicyStatementInput{}
opts.CannedAction = args.CannedAction
opts.Effect = args.Effect
opts.IpEquals = args.IpEquals
opts.IpNotEquals = args.IpNotEquals
opts.ResourcePath = args.ResourcePath
opts.PrincipalId = args.PrincipalId
result, err := modules.Buckets.PerformAction(s, args.ID, "set-policy", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketDeletePolicyOption struct {
ID string `help:"ID or name of bucket" json:"-"`
Id []string
}
R(&BucketDeletePolicyOption{}, "bucket-delete-policy", "delete bucket policy", func(s *mcclient.ClientSession, args *BucketDeletePolicyOption) error {
input := api.BucketPolicyDeleteInput{}
input.Id = args.Id
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-policy", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -28,4 +28,8 @@ func init() {
cmd.Update(&compute.CDNDomainUpdateOptions{})
cmd.Delete(&options.BaseIdOptions{})
cmd.Create(&compute.CDNDomainCreateOptions{})
cmd.Perform("clear-cache", &compute.CDNClearCacheOptions{})
cmd.Perform("change-config", &compute.CDNChangeConfigOptions{})
cmd.Perform("delete-custom-hostname", &compute.CDNDeleteCustomHostnameOptions{})
cmd.Get("custom-hostnames", &compute.CDNCustomHostnameOptions{})
}

View File

@@ -62,6 +62,8 @@ func init() {
cmd.CreateWithKeyword("create-qingcloud", &options.SQingCloudCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-oracle", &options.SOracleCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-cephfs", &options.SCephFSCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-cnware", &options.SCNwareCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-oceanbase", &options.SOceanbaseCloudAccountCreateOptions{})
cmd.UpdateWithKeyword("update-vmware", &options.SVMwareCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-aliyun", &options.SAliyunCloudAccountUpdateOptions{})
@@ -88,6 +90,8 @@ func init() {
cmd.UpdateWithKeyword("update-baidu", &options.SBaiduCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-cucloud", &options.SCucloudCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-qingcloud", &options.SQingCloudCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-cnware", &options.SCNwareCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-oceanbase", &options.SOceanbaseCloudAccountUpdateOptions{})
cmd.Perform("update-credential", &options.CloudaccountUpdateCredentialOptions{})
@@ -117,6 +121,7 @@ func init() {
cmd.PerformWithKeyword("update-credential-baidu", "update-credential", &options.SBaiduCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-cucloud", "update-credential", &options.SCucloudCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-qingcloud", "update-credential", &options.SQingCloudCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-cnware", "update-credential", &options.SCNwareCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-google", "test-connectivity", &options.SGoogleCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-vmware", "test-connectivity", &options.SVMwareCloudAccountUpdateCredentialOptions{})
@@ -133,6 +138,7 @@ func init() {
cmd.PerformWithKeyword("test-connectivity-ctyun", "test-connectivity", &options.SCtyunCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-jdcloud", "test-connectivity", &options.SJDcloudCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-cloudpods", "test-connectivity", &options.SCloudpodsCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-oceanbase", "test-connectivity", &options.SOceanbaseCloudAccountUpdateCredentialOptions{})
cmd.Perform("enable", &options.SCloudAccountIdOptions{})
cmd.Perform("disable", &options.SCloudAccountIdOptions{})

View File

@@ -43,6 +43,7 @@ func init() {
cmd.BatchDelete(new(options.ContainerDeleteOptions))
cmd.BatchPerform("stop", new(options.ContainerStopOptions))
cmd.BatchPerform("start", new(options.ContainerStartOptions))
cmd.BatchPerform("restart", new(options.ContainerRestartOptions))
cmd.BatchPerform("syncstatus", new(options.ContainerIdsOptions))
cmd.Perform("save-volume-mount-image", new(options.ContainerSaveVolumeMountImage))
cmd.Perform("exec-sync", new(options.ContainerExecSyncOptions))

View File

@@ -42,30 +42,18 @@ import (
func init() {
cmd := shell.NewResourceCmd(&modules.Disks)
cmd.List(&compute_options.DiskListOptions{})
cmd.Show(&compute_options.DiskIdOptions{})
cmd.Perform("public", &compute_options.DiskIdOptions{})
cmd.Perform("private", &compute_options.DiskIdOptions{})
cmd.Perform("syncstatus", &compute_options.DiskIdOptions{})
cmd.Perform("change-owner-candidate-domains", &compute_options.DiskIdOptions{})
cmd.Perform("disk-cancel-delete", &compute_options.DiskIdOptions{})
cmd.Perform("set-class-metadata", &options.ResourceMetadataOptions{})
cmd.Perform("rebuild", &compute_options.DiskRebuildOptions{})
cmd.Perform("migrate", &compute_options.DiskMigrateOptions{})
cmd.Perform("reset-template", &compute_options.DiskResetTemplateOptions{})
type DiskDetailOptions struct {
ID string `help:"ID or Name of disk"`
}
R(&DiskDetailOptions{}, "disk-show", "Show details of disk", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
disk, e := modules.Disks.Get(s, args.ID, nil)
if e != nil {
return e
}
printObject(disk)
return nil
})
R(&DiskDetailOptions{}, "disk-cancel-delete", "Cancel pending delete disks", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
disk, e := modules.Disks.PerformAction(s, args.ID, "cancel-delete", nil)
if e != nil {
return e
}
printObject(disk)
return nil
})
cmd.Perform("change-billing-type", new(compute_options.DiskChangeBillingTypeOptions))
cmd.Perform("change-storage-type", &compute_options.DiskChangeStorageTypeOptions{})
type DiskDeleteOptions struct {
ID []string `help:"ID of disks to delete" metavar:"DISK"`
@@ -95,25 +83,7 @@ func init() {
return nil
})
R(&DiskDetailOptions{}, "disk-public", "Make a disk public", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
disk, e := modules.Disks.PerformAction(s, args.ID, "public", nil)
if e != nil {
return e
}
printObject(disk)
return nil
})
R(&DiskDetailOptions{}, "disk-private", "Make a disk private", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
disk, e := modules.Disks.PerformAction(s, args.ID, "private", nil)
if e != nil {
return e
}
printObject(disk)
return nil
})
R(&DiskDetailOptions{}, "disk-metadata", "Get metadata of a disk", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
R(&compute_options.DiskIdOptions{}, "disk-metadata", "Get metadata of a disk", func(s *mcclient.ClientSession, args *compute_options.DiskIdOptions) error {
meta, e := modules.Disks.GetMetadata(s, args.ID, nil)
if e != nil {
return e
@@ -122,20 +92,11 @@ func init() {
return nil
})
R(&DiskDetailOptions{}, "disk-syncstatus", "Sync status for disk", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
ret, e := modules.Disks.PerformAction(s, args.ID, "syncstatus", nil)
if e != nil {
return e
}
printObject(ret)
return nil
})
type DiskUpdateOptions struct {
ID string `help:"ID or name of disk"`
Name string `help:"New name of disk"`
Desc string `help:"Description" metavar:"DESCRIPTION"`
AutoDelete string `help:"enable/disable auto delete of disk" choices:"enable|disable"`
AutoDelete string `help:"Set disk auto_delete (true/false or enable/disable)" choices:"true|false|enable|disable"`
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"`
@@ -150,7 +111,7 @@ func init() {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if len(args.AutoDelete) > 0 {
if args.AutoDelete == "enable" {
if args.AutoDelete == "enable" || args.AutoDelete == "true" {
params.Add(jsonutils.JSONTrue, "auto_delete")
} else {
params.Add(jsonutils.JSONFalse, "auto_delete")
@@ -299,7 +260,7 @@ func init() {
return nil
})
R(&DiskDetailOptions{}, "disk-change-owner-candidate-domains", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
R(&compute_options.DiskIdOptions{}, "disk-change-owner-candidate-domains", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *compute_options.DiskIdOptions) error {
result, err := modules.Disks.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err

View File

@@ -0,0 +1,31 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
computemodules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
cmd := shell.NewResourceCmd(&computemodules.HostFiles)
cmd.List(&compute.HostFileListOptions{})
cmd.Create(&compute.HostFileCreateOptions{})
cmd.Show(&compute.HostFileShowOptions{})
cmd.Update(&compute.HostFileUpdateOptions{})
cmd.Edit(&compute.HostFileEditOptions{})
cmd.Delete(&compute.HostFileDeleteOptions{})
}

View File

@@ -55,8 +55,8 @@ 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("set-commit-bound", &compute.HostSetCommitBoundOptions{})
cmd.BatchPerform("enable", &options.BaseIdsOptions{})
cmd.BatchPerform("disable", &options.BaseIdsOptions{})
cmd.BatchPerform("syncstatus", &options.BaseIdsOptions{})
@@ -67,10 +67,12 @@ func init() {
cmd.BatchPerform("unreserve-cpus", &options.BaseIdsOptions{})
cmd.BatchPerform("auto-migrate-on-host-down", &compute.HostAutoMigrateOnHostDownOptions{})
cmd.BatchPerform("restart-host-agent", &options.BaseIdsOptions{})
cmd.BatchPerform("set-host-files", &compute.HostSetHostFilesOptions{})
cmd.Get("ipmi", &options.BaseIdOptions{})
cmd.Get("vnc", &options.BaseIdOptions{})
cmd.Get("app-options", &options.BaseIdOptions{})
cmd.Get("isolated-device-numa-stats", &compute.HostIsolatedDeviceNumaStatsOptions{})
cmd.GetWithCustomShow("worker-stats", func(data jsonutils.JSONObject) {
stats, _ := data.GetArray("workers")
printList(&printutils.ListResult{Data: stats}, nil)
@@ -93,6 +95,9 @@ func init() {
fmt.Println("error", err)
}
}, &options.BaseIdOptions{})
cmd.GetWithCustomShow("host-files", func(data jsonutils.JSONObject) {
printObject(data)
}, &options.BaseIdOptions{})
R(&compute.HostShowOptions{}, "host-show", "Show details of a host", func(s *mcclient.ClientSession, args *compute.HostShowOptions) error {
params, err := args.Params()
@@ -259,8 +264,10 @@ func init() {
INDEX int64 `help:"nic index"`
Type string `help:"Nic type" choices:"admin|ipmi"`
IpAddr string `help:"IP address"`
Ip6Addr string `help:"IPv6 address"`
Bridge string `help:"Bridge of hostwire"`
Interface string `help:"Interface name, eg:eth0, en0"`
VlanId int `help:"Vlan ID"`
}
R(&HostAddNetIfOptions{}, "host-add-netif", "Host add a NIC", func(s *mcclient.ClientSession, args *HostAddNetIfOptions) error {
params := jsonutils.NewDict()
@@ -274,12 +281,16 @@ func init() {
if len(args.IpAddr) > 0 {
params.Add(jsonutils.NewString(args.IpAddr), "ip_addr")
}
if len(args.Ip6Addr) > 0 {
params.Add(jsonutils.NewString(args.Ip6Addr), "ip6_addr")
}
if len(args.Bridge) > 0 {
params.Add(jsonutils.NewString(args.Bridge), "bridge")
}
if len(args.Interface) > 0 {
params.Add(jsonutils.NewString(args.Interface), "interface")
}
addVlanIdToParams(params, args.VlanId)
result, err := modules.Hosts.PerformAction(s, args.ID, "add-netif", params)
if err != nil {
return err
@@ -289,12 +300,14 @@ func init() {
})
type HostRemoveNetIfOptions struct {
ID string `help:"ID or Name of host"`
MAC string `help:"MAC of NIC to remove"`
ID string `help:"ID or Name of host"`
MAC string `help:"MAC of NIC to remove"`
VlanId int `help:"Vlan Id"`
}
R(&HostRemoveNetIfOptions{}, "host-remove-netif", "Remove NIC from host", func(s *mcclient.ClientSession, args *HostRemoveNetIfOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.MAC), "mac")
addVlanIdToParams(params, args.VlanId)
result, err := modules.Hosts.PerformAction(s, args.ID, "remove-netif", params)
if err != nil {
return err
@@ -306,15 +319,22 @@ func init() {
type HostEnableNetIfOptions struct {
ID string `help:"ID or Name of host"`
MAC string `help:"MAC of NIC to enable"`
Ip string `help:"IP address"`
Ip string `help:"IPv4 address"`
Ip6 string `help:"IPv6 address"`
Network string `help:"network to connect"`
Reserved bool `help:"fetch IP from reserved pool"`
VlanId int `help:"Vlan ID"`
}
R(&HostEnableNetIfOptions{}, "host-enable-netif", "Enable a network interface for a host", func(s *mcclient.ClientSession, args *HostEnableNetIfOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.MAC), "mac")
if len(args.Ip) > 0 {
params.Add(jsonutils.NewString(args.Ip), "ip_addr")
}
if len(args.Ip6) > 0 {
params.Add(jsonutils.NewString(args.Ip6), "ip6_addr")
}
if len(args.Ip) > 0 || len(args.Ip6) > 0 {
if args.Reserved {
params.Add(jsonutils.JSONTrue, "reserve")
}
@@ -322,6 +342,7 @@ func init() {
if len(args.Network) > 0 {
params.Add(jsonutils.NewString(args.Network), "network")
}
addVlanIdToParams(params, args.VlanId)
result, err := modules.Hosts.PerformAction(s, args.ID, "enable-netif", params)
if err != nil {
return err
@@ -334,6 +355,7 @@ func init() {
ID string `help:"ID or Name of host"`
MAC string `help:"MAC of NIC to disable"`
Reserve bool `help:"Reserve the IP address"`
VlanId int `help:"Vlan Id"`
}
R(&HostDisableNetIfOptions{}, "host-disable-netif", "Disable a network interface", func(s *mcclient.ClientSession, args *HostDisableNetIfOptions) error {
params := jsonutils.NewDict()
@@ -341,6 +363,7 @@ func init() {
if args.Reserve {
params.Add(jsonutils.JSONTrue, "reserve")
}
addVlanIdToParams(params, args.VlanId)
result, err := modules.Hosts.PerformAction(s, args.ID, "disable-netif", params)
if err != nil {
return err
@@ -682,3 +705,9 @@ func init() {
},
)
}
func addVlanIdToParams(params *jsonutils.JSONDict, vlanId int) {
if vlanId > 1 {
params.Add(jsonutils.NewInt(int64(vlanId)), "vlan_id")
}
}

View File

@@ -0,0 +1,31 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
options "yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
cmd := shell.NewResourceCmd(&modules.LoadbalancerHealthChecks).WithKeyword("lb-health-check")
cmd.List(&options.LoadbalancerHealthCheckListOptions{})
cmd.Show(&options.LoadbalancerHealthCheckIdOptions{})
cmd.Create(&options.LoadbalancerHealthCheckCreateOptions{})
cmd.Delete(&options.LoadbalancerHealthCheckIdOptions{})
cmd.Update(&options.LoadbalancerHealthCheckUpdateOptions{})
cmd.Perform("syncstatus", &options.LoadbalancerHealthCheckIdOptions{})
}

View File

@@ -37,7 +37,7 @@ func init() {
return nil
})
R(&options.TagListOptions{}, "tag-list", "List tags", func(s *mcclient.ClientSession, opts *options.TagListOptions) error {
R(&options.TagListOptions{}, "service-metadata-list", "List service metadata", func(s *mcclient.ClientSession, opts *options.TagListOptions) error {
var mod modulebase.IResourceManager
switch opts.Service {
case "compute":

View File

@@ -98,6 +98,22 @@ func init() {
return nil
})
type NetworkCreate3Options struct {
compute_options.NetworkCreateOptions `start_ip->positional:"false" end_ip->positional:"false" net_mask->positional:"false"`
}
R(&NetworkCreate3Options{}, "network-create3", "Create a dual-stack virtual network", func(s *mcclient.ClientSession, args *NetworkCreate3Options) error {
params, err := args.Params()
if err != nil {
return err
}
net, err := modules.Networks.Create(s, params)
if err != nil {
return err
}
printObject(net)
return nil
})
type NetworkSplitOptions struct {
NETWORK string `help:"ID or name of network to split"`
IP string `help:"Start ip of the split network"`
@@ -234,7 +250,7 @@ func init() {
fmt.Println("[Slave Addresses]")
for _, addr := range netIf.GetSlaveAddresses() {
fmt.Printf("%s/%s\n", addr[0], addr[1])
fmt.Printf("%s/%d\n", addr.Addr, addr.MaskLen)
}
fmt.Println("[Routes]")
for _, r := range netIf.GetRouteSpecs() {

View File

@@ -32,7 +32,11 @@ func init() {
cmd.Perform("syncstatus", &options.SecgroupIdOptions{})
cmd.Perform("private", &options.SecgroupIdOptions{})
cmd.Perform("add-rule", &options.SecgroupsAddRuleOptions{})
cmd.Perform("clone", &options.SecgroupCloneOptions{})
cmd.Perform("change-owner", &options.SecgroupChangeOwnerOptions{})
cmd.Perform("import-rules", &options.SecgroupImportRulesOptions{})
cmd.PerformClass("clean", &options.SecgroupCleanOptions{})
scmd := shell.NewResourceCmd(&modules.Servernetworksecgroups)
scmd.List(&options.ServerNetworkSecgroupListOptions{})
}

View File

@@ -23,14 +23,20 @@ import (
"yunion.io/x/pkg/util/printutils"
"yunion.io/x/pkg/util/regutils"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudcommon/cmdline"
"yunion.io/x/onecloud/pkg/mcclient"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
"yunion.io/x/onecloud/pkg/mcclient/options"
compute_options "yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
cmd := shell.NewResourceCmd(&modules.ServerNetworkTrafficLogs)
cmd.List(new(compute_options.ServerNetworkTrafficLogListOptions))
type ServerNetworkListOptions struct {
options.BaseListOptions
Server string `help:"ID or Name of Server"`
@@ -165,8 +171,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{}
@@ -177,6 +184,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

@@ -30,6 +30,7 @@ import (
"yunion.io/x/pkg/util/printutils"
"yunion.io/x/onecloud/cmd/climc/shell"
billing_api "yunion.io/x/onecloud/pkg/apis/billing"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
@@ -124,12 +125,18 @@ func init() {
cmd.Perform("set-nic-traffic-limit", &options.ServerNicTrafficLimitOptions{})
cmd.Perform("add-sub-ips", &options.ServerAddSubIpsOptions{})
cmd.Perform("update-sub-ips", &options.ServerUpdateSubIpsOptions{})
cmd.BatchPerform("restore-virtual-isolated-devices", &options.ServerIdsOptions{})
cmd.BatchPerform("set-os-info", &options.ServerSetOSInfoOptions{})
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.BatchPerform("set-tpm", &options.ServerSetTpmOptions{})
cmd.Perform("set-kickstart", &options.ServerKickstartConfigOptions{})
cmd.Perform("delete-kickstart", &options.ServerIdOptions{})
cmd.Perform("kickstart-complete", &options.ServerKickstartCompleteOptions{})
cmd.Get("kickstart", new(options.ServerIdOptions))
cmd.Get("vnc", new(options.ServerVncOptions))
cmd.Get("desc", new(options.ServerIdOptions))
cmd.Get("status", new(options.ServerIdOptions))
@@ -143,6 +150,13 @@ 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.Get("numa-info", new(options.ServerIdOptions))
cmd.BatchPerform("screen-dump", new(options.ServerIdsOptions))
cmd.Perform("set-network-num-queues", new(options.ServerSetNetworkNumQueues))
cmd.Perform("set-network-secgroup", new(options.ServerNetworkSecGroupsOptions))
cmd.Perform("add-network-secgroup", new(options.ServerNetworkSecGroupsOptions))
cmd.Perform("revoke-network-secgroup", new(options.ServerNetworkSecGroupsOptions))
cmd.GetProperty(&options.ServerStatusStatisticsOptions{})
cmd.GetProperty(&options.ServerProjectStatisticsOptions{})
@@ -184,59 +198,6 @@ func init() {
return nil
})
/*R(&options.ServerBatchMetadataOptions{}, "server-batch-update-user-tag", "add tags for some server", func(s *mcclient.ClientSession, opts *options.ServerBatchMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Servers.PerformClassAction(s, "batch-user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ServerBatchMetadataOptions{}, "server-batch-replace-user-tag", "Set tags for some server", func(s *mcclient.ClientSession, opts *options.ServerBatchMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Servers.PerformClassAction(s, "batch-set-user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ResourceMetadataOptions{}, "server-update-user-tag", "Set tag of a server", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Servers.PerformAction(s, opts.ID, "user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ResourceMetadataOptions{}, "server-update-user-tag", "Set tag of a server", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Servers.PerformAction(s, opts.ID, "set-user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
*/
R(&baseoptions.ResourceMetadataOptions{}, "server-set-metadata", "Set raw metadata of a server", func(s *mcclient.ClientSession, opts *baseoptions.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
@@ -257,7 +218,7 @@ func init() {
params.Name = opts.NAME
params.AutoStart = opts.AutoStart
params.Eip = opts.Eip
params.EipChargeType = opts.EipChargeType
params.EipChargeType = billing_api.ParseNetChargeType(opts.EipChargeType)
params.EipBw = opts.EipBw
server, err := modules.Servers.Create(s, params.JSON(params))

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

@@ -33,6 +33,7 @@ func init() {
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

@@ -24,6 +24,7 @@ import (
func init() {
cmd := shell.NewResourceCmd(&modules.SslCerticicate).WithKeyword("ssl-certificate")
cmd.List(&compute.SslCertificateListOptions{})
cmd.Create(&compute.SslCertificateCreateOptions{})
cmd.Show(&options.BaseShowOptions{})
cmd.Delete(&options.BaseIdOptions{})
}

View File

@@ -74,12 +74,7 @@ func init() {
if info.StorageType != "rbd" {
return errors.Errorf("invalid storage_type %s", info.StorageType)
}
cli, err := cephutils.NewClient(
info.StorageConf.MonHost,
info.StorageConf.Key,
info.StorageConf.Pool,
info.StorageConf.EnableMessengerV2,
)
cli, err := cephutils.NewClient(info.StorageConf.MonHost, info.StorageConf.Key, info.StorageConf.Pool, info.StorageConf.EnableMessengerV2, 0, 0, 0)
if err != nil {
return errors.Wrap(err, "cephutils.NewClient")
}

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