Commit Graph

65 Commits

Author SHA1 Message Date
wanyaoqi
1e0c76bdb0 fix(host-deployer): run guest on host and ignore no config file
Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
2023-12-12 14:56:35 +08:00
wanyaoqi
c9f6484cd1 fix(host-deployer): disconnect fix and concurrence control 2023-12-07 16:06:35 +08:00
wanyaoqi
35e11967a4 fix:(host-deployer): arm guest add gic version 2023-12-07 10:39:56 +08:00
wanyaoqi
0692c20341 fix(host-deployer): qemu deployer without kvm support (#18875) 2023-12-05 07:07:47 +08:00
wanyaoqi
c3743b57f3 fix(host-deployer): update base image and fix return errors 2023-12-04 01:54:58 +08:00
wanyaoqi
b58cd52d30 Automated cherry pick of #18822: Automated cherry pick of #18821: Feat/deploy guest (#18823)
* feat(region): add guest rescue api && download initrd from baremetal tftp server && add baremetal agent ip finder & update pic address & support ip kernel config.

* feat(host-deployer): use qemu-kvm as default deploy dirver

---------

Co-authored-by: boironic@gmail.com <boironic@gmail.com>
2023-11-30 16:50:18 +08:00
guoguangwu
e4b396e870 chore: unnecessary use of fmt.Sprintf d
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-11-12 21:08:23 +08:00
Zexi Li
e2969ee45c Merge pull request #18584 from wanyaoqi/fix/host-deployer-connect-lock
fix(host-deployer): use sync.lock on nbd connect/disconnect
2023-11-07 15:40:13 +08:00
wanyaoqi
b1ef71f82c fix(host-deployer): use sync.lock on nbd connect/disconnect 2023-11-07 15:28:20 +08:00
wanyaoqi
e5549057d6 fix(host-deployer): detach nbd device do not block main thread (#18578) 2023-11-07 07:22:26 +08:00
wanyaoqi
78080ff321 fix(host-deployer): clean nbd mount on host-deployer start 2023-11-01 21:26:25 +08:00
Jian Qiu
4e9828ee15 fix: xfs zerofree (experimental) (#18501)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2023-11-01 09:41:07 +08:00
wanyaoqi
1569dca33b fix(host-deployer): lvm deactivate vg in use 2023-08-15 23:19:20 +08:00
wanyaoqi
10ad5615bf fix(host-deployer): fix lvm disk concurrent mount
Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
2023-08-14 23:20:10 +08:00
Jian Qiu
21716cefb5 fix: remove mutual dependency of cloudmux on onecloud (#15621)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-12-27 01:21:26 +08:00
Qiu Jian
11d734f2d0 fix: do not resize partition of unsupported fs 2022-09-28 23:03:10 +08:00
wanyaoqi
37390fc095 fix(host-deployer): mount kvm rootfs
NewAggregate return nil when len(errs) == 0.

Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
2022-07-28 20:48:38 +08:00
屈轩
974ced404e fix(host-deployer): ignore root fs mount error (#14285) 2022-05-22 17:18:52 +08:00
Jian Qiu
69b4901bb6 fix: ignore no partition error for initial deployment (#14220)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-05-08 23:42:29 +08:00
Jian Qiu
a393b65903 fix: save guest image with empty partition fail (#14189)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-05-02 16:29:27 +08:00
Jian Qiu
4375bad382 fix: deploy encrypted disk (#14187)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-05-02 09:07:03 +08:00
Jian Qiu
2dd1aeb8aa fix: mount disk readonly (#13152)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2022-04-28 09:26:45 +08:00
ioito
96b98e9746 fix(host): mount disk error 2022-04-24 11:22:23 +08:00
Qiu Jian
d9a2c291b5 fix: support qemu 4.2.0 2022-01-26 13:45:10 +08:00
rainzm
5fe399bfdd feat(region): use resizepart directly 2021-12-13 14:21:01 +08:00
rainzm
f9a0f956f7 fix(hostdeployer): Operate with the original name when vgrename fails 2021-12-07 20:21:58 +08:00
Qu Xuan
1f90b5aa7f fix(host): xfs unlock 2021-10-13 19:15:12 +08:00
rainzm
a545ad10e1 fix(host-deployer): ensure the success of vgrenam 2021-09-16 17:43:19 +08:00
rainzm
454ebe49e1 feat(host-deployer): try again if the partition cannot be found 2021-09-16 17:38:35 +08:00
Zexi Li
46c77129e9 fix(vendor): use creack/pty v1.1.11 to adapt go 1.15 2021-08-26 11:40:50 +08:00
rainzm
de60724ba9 feat(hostdeployer): find vg name and id via pv 2021-08-24 11:28:52 +08:00
panda
1248b88c75 fix(host-deployer): XFS uuid冲突 无法 mount
pkg/hostman/diskutils/fsutils/fsutils.go

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

 - 批量创建虚拟机, 虚拟机磁盘为xfs, 多台虚拟机调度到同一宿主机时
   DeployGuestFs 无法 chroot password root
2021-08-19 14:41:31 +08:00
zhaoxiangchun
8fa4e577dd feat(cloudmon): add cloudmon component 2021-07-16 12:20:52 +08:00
rainzm
0a75aaad6e fix(host-deployer): make SKVMGuestLVMPartition work fine
1. add needChangeName to indicate whether to change the name when
   putting down
2. remove unnecessary IsVgActice
3. findPartitions from /dev/{vgname}/{lvname} or
   /dev/mapper/{vgname}-{lvname}
2021-07-08 18:15:56 +08:00
Qiu Jian
179562bc40 fix: do not use ntfsresize to resize NTFS partition
This makes resizing windows 2003 ntfs partition non-functional
2021-07-02 09:13:37 +08:00
Zexi Li
d146d72284 Merge pull request #11413 from swordqiu/hotfix/qj-support-windows-2003
fix: support windows 2003
2021-06-17 10:18:27 +08:00
Qiu Jian
56025bc557 fix: support windows 2003 2021-06-17 09:44:47 +08:00
Qiu Jian
4e65ec00c4 fix: do not resize LVM paritition and skip and return success 2021-06-17 01:53:09 +08:00
Zexi Li
768ab3036f fix(host-deployer): mkfs.ext4 add '-T largefile' option 2021-04-12 21:30:27 +08:00
Zexi Li
bf13a14ed5 fix(host): ignore parted resize disk unknown partition table error 2021-03-23 10:00:27 +08:00
Zexi Li
b72f60f340 fix(hostdeployer): windows rootfs umount leak 2021-03-02 09:51:41 +08:00
Qiu Jian
63bbd5c343 fix(host-deployer): mount may fail to lock /etc/mtab, add retrier 2021-02-22 09:18:27 +08:00
wanyaoqi
eb79cc79ee fix(host-deployer): add retry on check is vgactived 2021-01-07 19:20:21 +08:00
wanyaoqi
948f926bf6 feat(host-deployer): add deploy driver libguestfs
Add drvier libguestfs to support deploy more operator system,
you can use it by edit host config file add 'image_deploy_driver: libguestfs'.
By the default host-deploy support run three guestfish at the same time.
And host deployer will recycle free guestfish every ten minitues.

cherrypick: release/3.6
2020-12-08 17:49:44 +08:00
rainzm
22cec0964e feat(hostdeployer): support resizefs for esxi disk 2020-11-17 14:48:26 +08:00
wanyaoqi
1fc5bac7fa fix host deployer base image 2020-09-21 17:28:50 +08:00
wanyaoqi
945fac0a4b fix host error output 2020-09-07 21:06:59 +08:00
wanyaoqi
7dcb240940 vmware disk support deploy lvm partition 2020-09-01 20:43:55 +08:00
Rain Zheng
e393f3ee21 Fix problem of esxi (#7661)
* fix(esxi): Fetch full templates of datastoreImageCache

Datastore 和 DatastoreImageCache 是一对一的关系。
每一个 Datastore 可能有多个对应的 Host,所以 GetIIMages 里面获取
Templates 的逻辑应该尝试去获取所有 Host 的 Templates。

* fix(host-deployer): Exit correctly after mounting

MountRootfs的返回值为nil时,还是需要Umount的操作来正确退出(比如VDDK)。
VDDK的Mount分为两步,第一步会挂在remote
disk到fuse下,然后挂载fuse/xxx/flat
到块设备上。第一步成功,第二部失败也应该正确退出。

* fix(host-deployer): Kill process

* opt(host-deployer): Increase timeout of waiting mount

* opt(host-deployer): Add debug log print command to mount

* fix(esxi): Support multi agent in different zone
2020-09-01 10:47:39 +08:00
wanyaoqi
2cdfed2cab fix cache non lvm disks (#7459) 2020-08-01 21:10:02 +08:00