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

patch-services test failing #91

Open
venkataanil opened this issue Nov 18, 2022 · 2 comments
Open

patch-services test failing #91

venkataanil opened this issue Nov 18, 2022 · 2 comments

Comments

@venkataanil
Copy link
Collaborator

venkataanil commented Nov 18, 2022

patch-services test failing with below error
2022/11/17 14:49:00 Fatal - Unable to create Service: %!(EXTRA *errors.Error=status is 502, identifier is '24', code is 'OCM-MS-24' and operation identifier is '2HgAq3EOffKnOrllJyqV5WrNrC3': Unable to create cluster : status is 400, identifier is '400', code is 'CLUSTERS-MGMT-400' and operation identifier is 'ded178cd-27d6-4ca1-83d3-e477a3603753': Could not find provided zone 'us-west-2' in the AWS Region: 'us-west-2')

Below fixes needed in https://github.com/cloud-bulldozer/ocm-api-load/blob/main/pkg/tests/handlers/services.go

  1. Append 'a' to region while creating the cluster i.e
  •                           Nodes(v1.NewClusterNodes().AvailabilityZones(ccsRegion)).                                                                                   
    
  •                           Nodes(v1.NewClusterNodes().AvailabilityZones(fmt.Sprintf("%sa", ccsRegion))).               
    
  1. Use ServiceID instead of ClusterID in patch path
  •           serviceIds[i] = clusterID
    
  •           serviceIds[i] = serviceID
    
  1. As we are creating 2 clusters for patching, we should append iterator number (i.e i ) in cluster name rather than 'idx', which is always 0 (to avoid creating duplicate cluster)
  •                           Name(fmt.Sprintf("perf-%s-%d", id, idx)).
    
  •                           Name(fmt.Sprintf("perf-%s-%d", id, i)).
    
  1. fakeClusterProps are overriden by rosaCreatorProps while passing it to cluster create method. So better merge fakeClusterProps inside rosaCreatorProps instead of passing "Properties" twice .
    Cluster(v1.NewCluster().
    Name(fmt.Sprintf("perf-%s-%d", id, idx)).
    AWS(
    v1.NewAWS().
    AccessKeyID(ccsAccessKey).
    SecretAccessKey(ccsSecretKey).
    AccountID(ccsAccountID),
    ).
    Nodes(v1.NewClusterNodes().AvailabilityZones(fmt.Sprintf("%sa", ccsRegion))).
    Properties(fakeClusterProps).
    Properties(rosaCreatorProps).
    Region(v1.NewCloudRegion().ID(ccsRegion))).

  2. Avoid passing service and cluster arguments for PATCH method as ocm-managed-services validations are not accepting them i.e only pass Parameters
    body, err := v1.NewManagedService().
    Parameters(v1.NewServiceParameter().ID("has-external-resources").Value("false")).
    Build()

However after all these changes, patching is failing as patching is allowed only when service is in "waiting for addon" state. But our service is stuck in 'waiting for cluster' state as cluster is a fake-cluster and will be in always in "installing" state. We also can't patch cluster state as ocm validations won't allow it. We need to check with ocm team regarding this issue.

venkataanil added a commit to venkataanil/ocm-api-load that referenced this issue Nov 18, 2022
patch_service endpoint is failing[1] so removing it from CI
till it gets fixed.

[1] cloud-bulldozer#91
@venkataanil
Copy link
Collaborator Author

After fakeClusterProps properly passed i.e step 4 above, cluster is moved to "ready" state and service is moved to 'waiting for addon'. So now we can patch the service and no need to talk to ocm team :)

@venkataanil
Copy link
Collaborator Author

Fix #93 proposed

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

No branches or pull requests

1 participant