Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making sure that the parameters provided in the metadatalocation getting passed to the nfs provider #144

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vineela1999
Copy link
Contributor

@vineela1999 vineela1999 commented Jan 31, 2023

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind new feature

kind bug fix

/kind cleanup
/kind revert change
/kind design
/kind documentation
/kind enhancement

What this PR does / why we need it:
The parameters provided in the metadatalocation should be reached to the NFS provider
this PR implements the code required for that
Which issue(s) this PR fixes:

Fixes #

Test Report Added?:

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

kind TESTED

/kind NOT-TESTED

Test Report:

for the resource:
Screenshot from 2023-01-31 11-38-05

Screenshot from 2023-01-31 11-37-14
when trying to restore backup and delete backup parameters are getting passed
Screenshot from 2023-02-02 15-03-30

Special notes for your reviewer:

@vineela1999 vineela1999 changed the title [WIP]Making sure that the parameters provided in the metadatalocation getting passed to the nfs provider Making sure that the parameters provided in the metadatalocation getting passed to the nfs provider Feb 2, 2023
},
},
})
if err != nil {
return err
}
log.Infof("88888attributes are:8888 %v", attributes)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do change the logs properly.....don't add 888 etc . please do change this all the places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

},
}
ctrl.logger.Infof("paramteres in deleteMetadataBackup:%v", parameters)
Copy link
Collaborator

@sushanthakumar sushanthakumar Mar 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

},
},
})
if err != nil {
return err
}
log.Infof("attributes in upload are: %v", attributes)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow log msg convention, applicable for other places as well

}
log.Infof("***parameters are******%v", parameters)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be deleted

// Validate the Metadatalocation
locationName := backup.Spec.MetadataLocation
backup.Status.ValidationErrors = []string{}
ctrl.logger.Infof("Preparing backup for backup location: %s ", locationName)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the delete flow, update accordingly

@@ -277,11 +279,23 @@ func (ctrl *controller) deleteMetadataBackup(backup *kahuapi.Backup) error {
return nil
}

// Validate the Metadatalocation
locationName := backup.Spec.MetadataLocation
backup.Status.ValidationErrors = []string{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required to update ValidationErrors

@@ -165,8 +167,11 @@ func (server *nfsServer) Download(request *pb.DownloadRequest,
if fileId == "" {
return status.Error(codes.InvalidArgument, "download file id is empty")
}
attributes := request.GetAttributes()
log.Infof("******attributes in Download are***** %v", attributes)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combine this with subsequent log

@@ -226,6 +231,10 @@ func (server *nfsServer) Delete(ctxt context.Context,
log.Info("Delete Called ...")

fileId := request.GetFileIdentifier()

attributes := request.GetAttributes()
log.Infof("******attributes in Delete are***** %v", attributes)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combine this with subsequent log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants