Skip to content

API: Fix listSSHKeyPairs API when listing all resources (listall=true & projectid=-1) - #5958

Merged
DaanHoogland merged 2 commits into
apache:4.16from
shapeblue:fix-list-sshkeys-proj
Feb 9, 2022
Merged

DaanHoogland merged 2 commits into
apache:4.16from
shapeblue:fix-list-sshkeys-proj

Conversation

@Pearl1594

Copy link
Copy Markdown
Contributor

Description

This PR fixes the issue noticed when listing all ssh key pairs including ones owned by projects. Exception:

(primateqa) 🐱 > list sshkeypairs listall=true projectid=-1
🙈 Error: (HTTP 530, error code 4250) DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT ssh_keypairs.id, ssh_keypairs.uuid, ssh_keypairs.account_id, ssh_keypairs.domain_id, ssh_keypairs.keypair_name, ssh_keypairs.fingerprint, ssh_keypairs.public_key FROM ssh_keypairs  INNER JOIN account ON ssh_keypairs.account_id=account.id  WH ORDER BY ssh_keypairs.id DESC  LIMIT 0, 500

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?

Post Fix:

(localcloud) 🐱 > list sshkeypairs listall=true page=1 pagesize=20 filter=name,
{
  "count": 1,
  "sshkeypair": [
    {
      "name": "ssh"
    }
  ]
}
(localcloud) 🐱 > list sshkeypairs listall=true projectid=-1 page=1 pagesize=20 filter=name,
{
  "count": 2,
  "sshkeypair": [
    {
      "name": "test"
    },
    {
      "name": "ssh"
    }
  ]
}

@Pearl1594

Copy link
Copy Markdown
Contributor Author

Created a new PR & closed #5815

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2499

@DaanHoogland DaanHoogland left a comment

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.

code looks good, will do some mon-keying

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tested ok

@DaanHoogland

Copy link
Copy Markdown
Contributor

tested ok

ok, than I'll refrain from monkeying around

@nvazquez nvazquez left a comment

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.

LGTM

@nvazquez

nvazquez commented Feb 7, 2022

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3219)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39045 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5958-t3219-kvm-centos7.zip
Smoke tests completed. 90 look OK, 2 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_redundant_VPC_default_routes Failure 349.71 test_vpc_redundant.py
test_07_deploy_kubernetes_ha_cluster Failure 291.77 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 76.53 test_kubernetes_clusters.py

@sureshanaparti

Copy link
Copy Markdown
Contributor

@Pearl1594 Can you address the outstanding comments. Thanks.

@Pearl1594
Pearl1594 force-pushed the fix-list-sshkeys-proj branch 2 times, most recently from c20aa99 to 5016575 Compare February 8, 2022 08:26
@Pearl1594
Pearl1594 force-pushed the fix-list-sshkeys-proj branch from 5016575 to e122c12 Compare February 8, 2022 08:28
@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@apache apache deleted a comment from blueorangutan Feb 8, 2022
@apache apache deleted a comment from blueorangutan Feb 8, 2022
@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland DaanHoogland left a comment

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.

mannually tested
LGTM

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2527

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-3235)

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-3237)

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-3241)

@yadvr

yadvr commented Feb 8, 2022

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@Pearl1594
Pearl1594 marked this pull request as draft February 8, 2022 18:12
@Pearl1594

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-3250)

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2533

@Pearl1594

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-3253)

@Pearl1594

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✖️ el8 ✔️ debian ✔️ suse15. SL-JID 2535

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@Pearl1594
Pearl1594 marked this pull request as ready for review February 9, 2022 09:22
@DaanHoogland DaanHoogland self-assigned this Feb 9, 2022
@DaanHoogland

Copy link
Copy Markdown
Contributor

retested with the latest changes 👍

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3255)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34467 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5958-t3255-kvm-centos7.zip
Smoke tests completed. 92 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
DaanHoogland merged commit 85ced44 into apache:4.16 Feb 9, 2022
Pearl1594 added a commit to shapeblue/cloudstack that referenced this pull request Feb 14, 2022
… & projectid=-1) (apache#5958)

* API: Fix listSSHKeyPairs API when listing all resources (listall=true & projectid=-1)

* fix issue with indexing
@DaanHoogland DaanHoogland removed their assignment Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants