mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #16213 from swordqiu/automated-cherry-pick-of-#16212-upstream-release-3.10
Automated cherry pick of #16212: fix: minor fixes 20230313
This commit is contained in:
@@ -437,5 +437,5 @@ func FetchNotifyAdminRecipients(ctx context.Context, region string, users []stri
|
||||
func NotifyVmIntegrity(ctx context.Context, name string) {
|
||||
data := jsonutils.NewDict()
|
||||
data.Add(jsonutils.NewString(name), "name")
|
||||
SystemExceptionNotifyWithResult(ctx, api.ActionChecksumTest, api.TOPIC_RESOURCE_DB_TABLE_RECORD, api.ResultFailed, data)
|
||||
SystemExceptionNotifyWithResult(ctx, api.ActionChecksumTest, api.TOPIC_RESOURCE_VM_INTEGRITY_CHECK, api.ResultFailed, data)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,10 @@ func ZeroFile(filename string) error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "os.OpenFile")
|
||||
}
|
||||
defer f.Close()
|
||||
defer func() {
|
||||
f.Sync()
|
||||
f.Close()
|
||||
}()
|
||||
|
||||
info, err := f.Stat()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user