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 resize SDK API for storage pool #1200

Merged
merged 3 commits into from
Sep 26, 2019

Conversation

harsh-px
Copy link
Contributor

Signed-off-by: Harsh Desai [email protected]

What this PR does / why we need it:

Which issue(s) this PR fixes (optional)
Closes #

Special notes for your reviewer:

Copy link
Contributor

@adityadani adityadani left a comment

Choose a reason for hiding this comment

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

lgtm. There is an SDK version update required when a new change is added to proto. @lpabon

cmd/osd/main.go Outdated
@@ -477,16 +479,20 @@ func start(c *cli.Context) error {
return fmt.Errorf("Unable to Initialise Storage Policy Manager Instances %v", err)
}

poolServer := mockapi.NewMockOpenStoragePoolServer(gomock.NewController(
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be mock but an actual server.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this from osd main. nil server handler is now being handled.

api/api.proto Outdated
@@ -232,6 +232,8 @@ message StoragePool {
uint64 Used = 8;
// Labels is a list of user defined name-value pairs
map<string, string> labels = 9;
// UUID is the unique identifier for a storage pool
string UUID = 10;
Copy link
Member

Choose a reason for hiding this comment

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

value must be in proto style: uuid not UUID.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

api/api.proto Outdated
}

// Defines the operation types available to resize a storage pool
enum StoragePoolResizeOperationType {
Copy link
Member

Choose a reason for hiding this comment

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

See #962 . These need to be redone

Copy link
Member

Choose a reason for hiding this comment

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

I need to redo the doc/sdk.md to add this so others know about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. Moved newly added enums inside messages.

@@ -468,6 +473,7 @@ func (s *sdkGrpcServer) Start() error {
api.RegisterOpenStorageClusterPairServer(grpcServer, s.clusterPairServer)
api.RegisterOpenStoragePolicyServer(grpcServer, s.policyServer)
api.RegisterOpenStorageClusterDomainsServer(grpcServer, s.clusterDomainsServer)
api.RegisterOpenStoragePoolServer(grpcServer, s.storagePoolServer)
Copy link
Member

Choose a reason for hiding this comment

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

What happens if the storagepool server handler is nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated PR now handles nil pool server handler.

api/server/sdk/server.go Show resolved Hide resolved
@lpabon
Copy link
Member

lpabon commented Aug 27, 2019

Also, SDK_CHANGELOG.md and the SdkVersion must be update.

Copy link
Contributor Author

@harsh-px harsh-px left a comment

Choose a reason for hiding this comment

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

also bumped up the SDK version

api/api.proto Outdated
@@ -232,6 +232,8 @@ message StoragePool {
uint64 Used = 8;
// Labels is a list of user defined name-value pairs
map<string, string> labels = 9;
// UUID is the unique identifier for a storage pool
string UUID = 10;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

api/api.proto Outdated
}

// Defines the operation types available to resize a storage pool
enum StoragePoolResizeOperationType {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. Moved newly added enums inside messages.

api/server/sdk/server.go Show resolved Hide resolved
@@ -468,6 +473,7 @@ func (s *sdkGrpcServer) Start() error {
api.RegisterOpenStorageClusterPairServer(grpcServer, s.clusterPairServer)
api.RegisterOpenStoragePolicyServer(grpcServer, s.policyServer)
api.RegisterOpenStorageClusterDomainsServer(grpcServer, s.clusterDomainsServer)
api.RegisterOpenStoragePoolServer(grpcServer, s.storagePoolServer)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated PR now handles nil pool server handler.

cmd/osd/main.go Outdated
@@ -477,16 +479,20 @@ func start(c *cli.Context) error {
return fmt.Errorf("Unable to Initialise Storage Policy Manager Instances %v", err)
}

poolServer := mockapi.NewMockOpenStoragePoolServer(gomock.NewController(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this from osd main. nil server handler is now being handled.

Harsh Desai added 2 commits September 26, 2019 12:29
- bump SDK version
- Fix enums and move them inside message in proto
- handle nil SDK server
- remove mock storage pool sdk server from osd main

Signed-off-by: Harsh Desai <[email protected]>
Signed-off-by: Harsh Desai <[email protected]>
@harsh-px harsh-px merged commit 90784bb into libopenstorage:master Sep 26, 2019
@harsh-px harsh-px deleted the resize-pool-master branch September 26, 2019 19:49
harsh-px pushed a commit to harsh-px/openstorage that referenced this pull request Sep 26, 2019
* Add resize SDK API for storage pool

Signed-off-by: Harsh Desai <[email protected]>

* Review comments

- bump SDK version
- Fix enums and move them inside message in proto
- handle nil SDK server
- remove mock storage pool sdk server from osd main

Signed-off-by: Harsh Desai <[email protected]>

* rebase with master

Signed-off-by: Harsh Desai <[email protected]>
harsh-px pushed a commit that referenced this pull request Sep 26, 2019
…#1250)

* Add resize SDK API for storage pool (#1200)

* Add resize SDK API for storage pool

Signed-off-by: Harsh Desai <[email protected]>

* Review comments

- bump SDK version
- Fix enums and move them inside message in proto
- handle nil SDK server
- remove mock storage pool sdk server from osd main

Signed-off-by: Harsh Desai <[email protected]>

* rebase with master

Signed-off-by: Harsh Desai <[email protected]>

* fix compile

Signed-off-by: Harsh Desai <[email protected]>
harsh-px pushed a commit to harsh-px/openstorage that referenced this pull request Sep 27, 2019
…nstorage#1200) (libopenstorage#1250)

* Add resize SDK API for storage pool (libopenstorage#1200)

* Add resize SDK API for storage pool

Signed-off-by: Harsh Desai <[email protected]>

* Review comments

- bump SDK version
- Fix enums and move them inside message in proto
- handle nil SDK server
- remove mock storage pool sdk server from osd main

Signed-off-by: Harsh Desai <[email protected]>

* rebase with master

Signed-off-by: Harsh Desai <[email protected]>

* fix compile

Signed-off-by: Harsh Desai <[email protected]>
harsh-px pushed a commit that referenced this pull request Sep 29, 2019
#1252)

* [cherry-pick release-7.0 ]Add resize SDK API for storage pool (#1200) (#1250)

* Add resize SDK API for storage pool (#1200)

* Add resize SDK API for storage pool

Signed-off-by: Harsh Desai <[email protected]>

* Review comments

- bump SDK version
- Fix enums and move them inside message in proto
- handle nil SDK server
- remove mock storage pool sdk server from osd main

Signed-off-by: Harsh Desai <[email protected]>

* rebase with master

Signed-off-by: Harsh Desai <[email protected]>

* fix compile

Signed-off-by: Harsh Desai <[email protected]>

* fix sdk-version check

Signed-off-by: Harsh Desai <[email protected]>
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