Skip to content

Conversation

@Pearl1594
Copy link
Contributor

Description

This PR prevents creation of an instance group with an empty name

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Prior Fix:

(localcloud) 🐱 > create instancegroup name=
{
  "instancegroup": {
    "account": "admin",
    "created": "2021-06-21T21:52:37+0530",
    "domain": "ROOT",
    "domainid": "6b71db05-cf22-11eb-9edd-50eb7122da94",
    "id": "fad68789-78a0-4fb9-b33d-071f7c6d6f69",
    "name": ""
  }
}

Post Fix:

(localcloud) 🐱 > create instancegroup name=
🙈 Error: (HTTP 431, error code 4350) Instance group name is empty

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 318

@Pearl1594
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@shwstppr
Copy link
Contributor

shwstppr commented Jun 22, 2021

@Pearl1594 this problem can be with other APIs as well.

(localcloud) SBCM5> > create domain name= 
{
  "domain": {
    "haschild": false,
    "id": "fad9ce01-c0ad-44bf-ae51-5f0a9ecc747b",
    "level": 1,
    "name": "",
    "parentdomainid": "4f507c55-cd47-11eb-bd54-1e009200048a",
    "parentdomainname": "ROOT",
    "path": "ROOT/",
    "secondarystoragetotal": 0
  }
}

Maybe we can add a check in ApiServer that when a param is required, it is not empty? cc @rhtyd @davidjumani

Updated API example

@davidjumani
Copy link
Contributor

davidjumani commented Jun 22, 2021

validations = {ApiArgValidator.NotNullOrEmpty} could be a generic solution in the Parameter annotation @shwstppr

@DaanHoogland
Copy link
Contributor

validations = {ApiArgValidator.NotNullOrEmpty} could be a generic solution in the Parameter annotation @shwstppr

I agree with @davidjumani , why catch this one layer down if we can catch it before. I know we implemented this pattern a lot before in ACS but let's change our ways for the better, @Pearl1594 .

@Pearl1594
Copy link
Contributor Author

Pearl1594 commented Jun 22, 2021

validations = {ApiArgValidator.NotNullOrEmpty} could be a generic solution in the Parameter annotation @shwstppr

I agree with @davidjumani , why catch this one layer down if we can catch it before. I know we implemented this pattern a lot before in ACS but let's change our ways for the better, @Pearl1594 .

Agreed @DaanHoogland, I was looking into fixing it, but seems another PR has been raised to address it in the meantime. I'll close this

@Pearl1594 Pearl1594 closed this Jun 22, 2021
@blueorangutan
Copy link

Trillian test result (tid-1029)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35371 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5135-t1029-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_nic.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Smoke tests completed. 87 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_nic Error 136.07 test_nic.py

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.

5 participants