mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
fix(esxi-agent): vendor update for rebuild root fail (#24378)
This commit is contained in:
@@ -26,6 +26,7 @@ require (
|
||||
github.com/gin-gonic/gin v1.7.7
|
||||
github.com/go-ldap/ldap/v3 v3.1.5
|
||||
github.com/go-yaml/yaml v2.1.0+incompatible
|
||||
github.com/golang-plus/errors v1.0.0
|
||||
github.com/golang-plus/uuid v1.0.0
|
||||
github.com/golang/mock v1.4.4
|
||||
github.com/golang/protobuf v1.5.4
|
||||
@@ -103,12 +104,12 @@ require (
|
||||
k8s.io/cri-api v0.28.15
|
||||
k8s.io/klog/v2 v2.20.0
|
||||
moul.io/http2curl/v2 v2.3.0
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260207041949-3fbec8cd3bc8
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260302154622-580e79b71c0d
|
||||
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
|
||||
@@ -235,7 +236,6 @@ require (
|
||||
github.com/godbus/dbus/v5 v5.0.4 // indirect
|
||||
github.com/gofrs/uuid v4.1.0+incompatible // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-plus/errors v1.0.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/btree v1.1.2 // indirect
|
||||
|
||||
@@ -1665,8 +1665,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.20260207041949-3fbec8cd3bc8 h1:bc4rHevOngt6ubqmUIhCFK2ZzfAInd+xlPMehSusiSY=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260207041949-3fbec8cd3bc8/go.mod h1:aWRX5Phwz3nbHUNnIAm1oVogjguXPYDDgCOy/9Hnnvk=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260302154622-580e79b71c0d h1:OZVpLNmOHnsbmqjfFvRVPYTwZ0kQFA4Q4/iiK6sTfJs=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260302154622-580e79b71c0d/go.mod h1:aWRX5Phwz3nbHUNnIAm1oVogjguXPYDDgCOy/9Hnnvk=
|
||||
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=
|
||||
@@ -1680,8 +1680,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
@@ -2251,7 +2251,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.20260207041949-3fbec8cd3bc8
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260302154622-580e79b71c0d
|
||||
## explicit; go 1.24
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
@@ -2363,7 +2363,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