mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-30 18:23:35 +08:00
redis update tags fix
This commit is contained in:
@@ -3024,7 +3024,7 @@ func (self *SManagedVirtualizationRegionDriver) RequestRemoteUpdateElasticcache(
|
||||
|
||||
iElasticcache, err := iRegion.GetIElasticcacheById(elasticcache.ExternalId)
|
||||
oldTags, err := iElasticcache.GetTags()
|
||||
if err != nil {
|
||||
if err != nil && errors.Cause(err) != cloudprovider.ErrNotFound {
|
||||
return nil, errors.Wrap(err, "iElasticcache.GetTags()")
|
||||
}
|
||||
tags, err := elasticcache.GetAllUserMetadata()
|
||||
|
||||
@@ -945,6 +945,7 @@ func (instance *SElasticcache) GetTags() (map[string]string, error) {
|
||||
return nil, errors.Wrap(err, "instance.region.ListResourceTags")
|
||||
}
|
||||
if _, ok := tags[instance.GetId()]; !ok {
|
||||
log.Debugf("SElasticcache.GetTags %s, tags %#v", instance.GetId(), tags)
|
||||
return nil, cloudprovider.ErrNotFound
|
||||
}
|
||||
return *tags[instance.GetId()], nil
|
||||
|
||||
Reference in New Issue
Block a user