mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix(region): 修复同步dns解析不生效问题 (#14560)
This commit is contained in:
@@ -675,8 +675,9 @@ func CompareDnsRecordSet(iRecords []ICloudDnsRecordSet, local []DnsRecordSet, de
|
||||
remoteRecord, ok := remoteMaps[key]
|
||||
if ok {
|
||||
record.ExternalId = remoteRecord.ExternalId
|
||||
remoteRecord.Id = record.Id
|
||||
if !record.Equals(remoteRecord) {
|
||||
updated = append(updated, record)
|
||||
updated = append(updated, remoteRecord)
|
||||
} else {
|
||||
common = append(common, record)
|
||||
}
|
||||
|
||||
@@ -61,6 +61,12 @@ func (self *DnsZoneSyncstatusTask) OnInit(ctx context.Context, obj db.IStandalon
|
||||
if caches[i].Status != status {
|
||||
caches[i].SetStatus(self.GetUserCred(), status, "")
|
||||
}
|
||||
if len(caches) == 1 {
|
||||
account, _ := caches[i].GetCloudaccount()
|
||||
if account != nil {
|
||||
dnsZone.SyncDnsRecordSets(ctx, self.GetUserCred(), account.Provider, iZone)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ import (
|
||||
|
||||
func init() {
|
||||
type DnsProductListOptions struct {
|
||||
PageNumber int `help:"page size"`
|
||||
PageSize int `help:"page PageSize"`
|
||||
PageNumber int `help:"page size" default:"1"`
|
||||
PageSize int `help:"page PageSize" default:"20"`
|
||||
}
|
||||
shellutils.R(&DnsProductListOptions{}, "dnsproduct-list", "List dnsproduct", func(cli *aliyun.SRegion, args *DnsProductListOptions) error {
|
||||
//products, e := cli.GetClient().DescribeDnsProductInstances(args.PageNumber, args.PageSize)
|
||||
@@ -51,8 +51,8 @@ func init() {
|
||||
})
|
||||
|
||||
type DomianListOptions struct {
|
||||
PageNumber int `help:"page size"`
|
||||
PageSize int `help:"page PageSize"`
|
||||
PageNumber int `help:"page size" default:"1"`
|
||||
PageSize int `help:"page PageSize" default:"20"`
|
||||
}
|
||||
shellutils.R(&DomianListOptions{}, "domain-list", "List Domain", func(cli *aliyun.SRegion, args *DomianListOptions) error {
|
||||
sdomains, e := cli.GetClient().DescribeDomains(args.PageNumber, args.PageSize)
|
||||
@@ -100,8 +100,8 @@ func init() {
|
||||
|
||||
type SDomainRecordListOptions struct {
|
||||
DOMAINNAME string
|
||||
PageNumber int `help:"page size"`
|
||||
PageSize int `help:"page PageSize"`
|
||||
PageNumber int `help:"page size" default:"1"`
|
||||
PageSize int `help:"page PageSize" default:"20"`
|
||||
}
|
||||
shellutils.R(&SDomainRecordListOptions{}, "domainrecord-list", "List domainrecord", func(cli *aliyun.SRegion, args *SDomainRecordListOptions) error {
|
||||
srecords, e := cli.GetClient().DescribeDomainRecords(args.DOMAINNAME, args.PageNumber, args.PageSize)
|
||||
|
||||
Reference in New Issue
Block a user