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

add ability to change capacity in fsinfo #2821

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

h0hmj
Copy link
Contributor

@h0hmj h0hmj commented Oct 19, 2023

  1. add mds rpc
  2. add tools-v2 command


// 3. update fs info
// set capacity
if (req->has_capacity()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

check this at beginning, the step 1 and 2 are not required if capacity not exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok i will add parameter check in MdsServiceImpl::UpdateFsInfo

Copy link
Contributor

Choose a reason for hiding this comment

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

It has been checked in mds servers. Do I still need to check here?

@SeanHai
Copy link
Contributor

SeanHai commented Oct 20, 2023

Need to add some unit tests

@h0hmj
Copy link
Contributor Author

h0hmj commented Oct 20, 2023

Need to add some unit tests

done

@h0hmj
Copy link
Contributor Author

h0hmj commented Oct 20, 2023

cicheck

// request parameter check, we want at least one field that need to change
if (!request->has_capacity()) {
response->set_statuscode(FSStatusCode::PARAM_ERROR);
LOG(ERROR) << "UpdateFsInfo fail, request: "
Copy link
Contributor

Choose a reason for hiding this comment

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

log warnning is enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

Signed-off-by: h0hmj <h0hmjcn@gmail.com>
@h0hmj
Copy link
Contributor Author

h0hmj commented Oct 23, 2023

cicheck


// 3. update fs info
// set capacity
if (req->has_capacity()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It has been checked in mds servers. Do I still need to check here?

tools-v2/pkg/cli/command/curvefs/update/fs/fs.go Outdated Show resolved Hide resolved
tools-v2/pkg/cli/command/curvefs/update/fs/fs.go Outdated Show resolved Hide resolved
tools-v2/pkg/cli/command/curvefs/update/fs/fs.go Outdated Show resolved Hide resolved
@h0hmj
Copy link
Contributor Author

h0hmj commented Oct 24, 2023

cicheck

Signed-off-by: h0hmj <h0hmjcn@gmail.com>
@h0hmj
Copy link
Contributor Author

h0hmj commented Oct 24, 2023

cicheck

@h0hmj
Copy link
Contributor Author

h0hmj commented Oct 24, 2023

cicheck

@h0hmj h0hmj merged commit ba010be into opencurve:master Oct 24, 2023
5 checks passed
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.

None yet

3 participants