mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-31 01:35:56 +08:00
fix(esxi-agent): vendor update for rebuild root fail (#24379)
This commit is contained in:
@@ -93,12 +93,12 @@ require (
|
||||
k8s.io/client-go v0.19.3
|
||||
k8s.io/cluster-bootstrap v0.19.3
|
||||
moul.io/http2curl/v2 v2.3.0
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260207041956-da3a0922f930
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260302154719-700087d8e8c0
|
||||
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0
|
||||
yunion.io/x/jsonutils v1.0.1-0.20250507052344-1abcf4f443b1
|
||||
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91
|
||||
yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900
|
||||
yunion.io/x/pkg v1.10.4-0.20260127060125-8939521ef75e
|
||||
yunion.io/x/pkg v1.10.4-0.20260224071200-5c269fa62429
|
||||
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1
|
||||
yunion.io/x/sqlchemy v1.1.3-0.20251231025938-b0a38f6e9fab
|
||||
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c
|
||||
|
||||
@@ -1272,8 +1272,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260207041956-da3a0922f930 h1:DI/+a2IrI5XcbgnjAnXzGWo9dZo2U2CTN8WSRQAhaDM=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260207041956-da3a0922f930/go.mod h1:GdAwZ78fiqj13i2r1zNuE/D6YOlhh2q4jZjuyHiZTq8=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260302154719-700087d8e8c0 h1:hnvmvVoG17bWehEA6633+5P3hqyHI3MphgHbDPY4zEc=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260302154719-700087d8e8c0/go.mod h1:GdAwZ78fiqj13i2r1zNuE/D6YOlhh2q4jZjuyHiZTq8=
|
||||
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0 h1:msG4SiDSVU7CrXH06WuHlNEZXIooTcmNbfrIGHuIHBU=
|
||||
yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
|
||||
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
|
||||
@@ -1287,8 +1287,8 @@ yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900 h1:Hu/4ERvoWaN6aiFs4h4/yvVB
|
||||
yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900/go.mod h1:0vLkNEhlmA64HViPBAnSTUMrx5QP1CLsxXmxDKQ80tc=
|
||||
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
|
||||
yunion.io/x/pkg v1.10.4-0.20260127060125-8939521ef75e h1:py5Kd6cgP6pxB9pSc4ry/gnmA6rJZwMVOnAjra4sb2g=
|
||||
yunion.io/x/pkg v1.10.4-0.20260127060125-8939521ef75e/go.mod h1:0Bwxqd9MA3ACi119/l02FprY/o9gHahmYC2bsSbnVpM=
|
||||
yunion.io/x/pkg v1.10.4-0.20260224071200-5c269fa62429 h1:yskc2HFnBZXEzfYeQBFdL2gXzVfdPQ8yT4qVDyuhajM=
|
||||
yunion.io/x/pkg v1.10.4-0.20260224071200-5c269fa62429/go.mod h1:0Bwxqd9MA3ACi119/l02FprY/o9gHahmYC2bsSbnVpM=
|
||||
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1 h1:1KJ3YYinydPHpDEQRXdr/T8SYcKZ5Er+m489H+PnaQ4=
|
||||
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
|
||||
yunion.io/x/sqlchemy v1.1.3-0.20251231025938-b0a38f6e9fab h1:5m/bSzW3uTAk83rp9eethbYsxJFYInFVeU1RDkteW4E=
|
||||
|
||||
Vendored
+2
-2
@@ -1589,7 +1589,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
|
||||
# sigs.k8s.io/yaml v1.2.0
|
||||
## explicit; go 1.12
|
||||
sigs.k8s.io/yaml
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260207041956-da3a0922f930
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260302154719-700087d8e8c0
|
||||
## explicit; go 1.21
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
@@ -1697,7 +1697,7 @@ yunion.io/x/log/hooks
|
||||
yunion.io/x/ovsdb/cli_util
|
||||
yunion.io/x/ovsdb/schema/ovn_nb
|
||||
yunion.io/x/ovsdb/types
|
||||
# yunion.io/x/pkg v1.10.4-0.20260127060125-8939521ef75e
|
||||
# yunion.io/x/pkg v1.10.4-0.20260224071200-5c269fa62429
|
||||
## explicit; go 1.18
|
||||
yunion.io/x/pkg/appctx
|
||||
yunion.io/x/pkg/errors
|
||||
|
||||
+10
-5
@@ -1196,13 +1196,13 @@ func (svm *SVirtualMachine) createDriverAndDisk(ctx context.Context, ds *SDatast
|
||||
}, true)
|
||||
}
|
||||
|
||||
func (svm *SVirtualMachine) getDatastoreAndRootImagePath() (string, *SDatastore, error) {
|
||||
func (svm *SVirtualMachine) getDatastoreAndRootImagePath(suffixCheck bool) (string, *SDatastore, error) {
|
||||
layoutEx := svm.getLayoutEx()
|
||||
if layoutEx == nil || len(layoutEx.File) == 0 {
|
||||
return "", nil, fmt.Errorf("invalid LayoutEx")
|
||||
}
|
||||
for _, f := range layoutEx.File {
|
||||
if !strings.HasSuffix(f.Name, ".vmdk") {
|
||||
if suffixCheck && !strings.HasSuffix(f.Name, ".vmdk") {
|
||||
continue
|
||||
}
|
||||
file := f.Name
|
||||
@@ -1223,13 +1223,18 @@ func (svm *SVirtualMachine) getDatastoreAndRootImagePath() (string, *SDatastore,
|
||||
if datastore == nil {
|
||||
return "", nil, fmt.Errorf("can't find storage associated with vm %q", svm.GetName())
|
||||
}
|
||||
return datastore.getPathString(datastore.cleanPath(file)), datastore, nil
|
||||
if strings.HasSuffix(f.Name, ".vmdk") {
|
||||
return datastore.getPathString(datastore.cleanPath(file)), datastore, nil
|
||||
}
|
||||
path := datastore.cleanPath(file)
|
||||
vmDir := strings.Split(path, "/")[0]
|
||||
return datastore.getPathString(fmt.Sprintf("%s/%s.vmdk", vmDir, vmDir)), datastore, nil
|
||||
}
|
||||
return "", nil, fmt.Errorf("can't find root image path")
|
||||
}
|
||||
|
||||
func (svm *SVirtualMachine) GetRootImagePath() (string, error) {
|
||||
path, _, err := svm.getDatastoreAndRootImagePath()
|
||||
path, _, err := svm.getDatastoreAndRootImagePath(true)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -1237,7 +1242,7 @@ func (svm *SVirtualMachine) GetRootImagePath() (string, error) {
|
||||
}
|
||||
|
||||
func (svm *SVirtualMachine) CopyRootDisk(ctx context.Context, imagePath string) (string, error) {
|
||||
newImagePath, datastore, err := svm.getDatastoreAndRootImagePath()
|
||||
newImagePath, datastore, err := svm.getDatastoreAndRootImagePath(false)
|
||||
if err != nil {
|
||||
return "", errors.Wrapf(err, "GetRootImagePath")
|
||||
}
|
||||
|
||||
+2
-2
@@ -189,8 +189,8 @@ var imageVersions = map[string][]string{
|
||||
// OpenSUSE:补充Leap版本,SUSE补充SLES主版本
|
||||
OS_DIST_OPEN_SUSE: {"11", "12", "13", "42", "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6"},
|
||||
OS_DIST_SUSE: {"10", "11", "12", "15", "15 SP1", "15 SP2", "15 SP3", "15 SP4", "15 SP5"},
|
||||
// Debian:补充从6到最新的12,覆盖所有稳定版
|
||||
OS_DIST_DEBIAN: {"6", "7", "8", "9", "10", "11", "12"},
|
||||
// Debian:补充从6到最新的13,覆盖所有稳定版
|
||||
OS_DIST_DEBIAN: {"6", "7", "8", "9", "10", "11", "12", "13"},
|
||||
// CoreOS:补充Container Linux和Fedora CoreOS的主要版本
|
||||
OS_DIST_CORE_OS: {"7", "200", "213", "224", "234", "246", "251", "3033"},
|
||||
// 欧拉OS:补充openEuler和EulerOS完整版本
|
||||
|
||||
Reference in New Issue
Block a user