Skip to content

PWX-24572 : Set and Get InstanceGroupSize implementation#108

Merged
vinayakshnd merged 6 commits intolibopenstorage:masterfrom
nikita-bhatia:PWX-24572
Sep 1, 2022
Merged

PWX-24572 : Set and Get InstanceGroupSize implementation#108
vinayakshnd merged 6 commits intolibopenstorage:masterfrom
nikita-bhatia:PWX-24572

Conversation

@nikita-bhatia
Copy link
Copy Markdown
Contributor

@nikita-bhatia nikita-bhatia commented Aug 22, 2022

Task : https://portworx.atlassian.net/browse/PWX-24572

Changes Done :

Added clusterId field in oracleOps struct
SetInstanceGroupSize and GetInstanceGroupSize implementation

Tests done :

Upscaling and downscaling performed using cloudops tests

image

Comment thread oracle/oracle.go Outdated
Comment thread oracle/oracle.go Outdated
Comment thread oracle/oracle.go Outdated
Comment thread oracle/oracle.go
UpdateNodePoolDetails: containerengine.UpdateNodePoolDetails{
NodeConfigDetails: &containerengine.UpdateNodePoolNodeConfigDetails{
Size: &totalClusterSize,
PlacementConfigs: nodePoolPlacementConfigDetails,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here, we are not making any changes to placementConfig and it's not a required (must) field. We can skip creating a duplicate nodePoolPlacementConfigDetails, if oracle SDK allows that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

nodePoolPlacementConfigDetails is required to equally balance creation and deletion of instances in each availability domain. We need to provide one placement configuration for each availability domain in which we intend to launch a node.

Comment thread oracle/oracle.go Outdated
Comment thread oracle/oracle.go Outdated
WorkRequestId: opcWorkRequestID}

f := func() (interface{}, bool, error) {
workResp, err := client.GetWorkRequest(context.Background(), workReq)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

GetNodePool API needs to be used to check lifecycle state of node pool is ACTIVE.

As additional check, (if required,) call GetInstanceGroupSize to verify number of active worker nodes matches with expected count.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The state of work request changes from Accepted-> InProgress -> Succeeded, till all the instances are active. Oracle SDK provides this functionality to track the status of any work request submitted till done.

Comment thread oracle/oracle.go Outdated
Comment thread oracle/oracle.go
Comment thread oracle/oracle.go Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 25, 2022

Codecov Report

Merging #108 (64e8108) into master (4f48f82) will decrease coverage by 0.11%.
The diff coverage is 1.47%.

@@            Coverage Diff            @@
##           master    #108      +/-   ##
=========================================
- Coverage    7.65%   7.53%   -0.12%     
=========================================
  Files          17      17              
  Lines        4219    4286      +67     
=========================================
  Hits          323     323              
- Misses       3877    3944      +67     
  Partials       19      19              
Impacted Files Coverage Δ
oracle/oracle.go 10.16% <1.47%> (-1.87%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Contributor

@vinayakshnd vinayakshnd left a comment

Choose a reason for hiding this comment

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

LGTM

@vinayakshnd vinayakshnd merged commit acc09ee into libopenstorage:master Sep 1, 2022
@nikita-bhatia nikita-bhatia deleted the PWX-24572 branch September 1, 2022 06:12
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