Skip to content

api: List details of template download state for stores corresponding to a zone#5379

Merged
yadvr merged 2 commits into
apache:4.15from
shapeblue:filter-stores-by-zone-listtemplates
Sep 2, 2021
Merged

api: List details of template download state for stores corresponding to a zone#5379
yadvr merged 2 commits into
apache:4.15from
shapeblue:filter-stores-by-zone-listtemplates

Conversation

@Pearl1594
Copy link
Copy Markdown
Contributor

Description

This PR filters images stores belonging to a zone while listing the download details of the template in a specific zone

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) 🐱 > list templates id=ef78027a-06ed-11ec-b12a-5254009b8de5 (CentOS 5.5(64-bit) no GUI (KVM)) templatefilter=all filter=name,zonename,zoneid,downloaddetails
{
  "count": 2,
  "template": [
    {
      "downloaddetails": [
        {
          "datastore": "nfs://172.20.0.1/export/testing/qa1-testzone415-e0bb22b0-kvm/sec1",  <--- store of zone1
          "downloadPercent": "100",
          "downloadState": "DOWNLOADED"
        },
        {
          "datastore": "nfs://172.20.0.1/export/testing/qa1-testzone415-e0bb22b0-kvm/sec2",  <--- store of zone2
          "downloadPercent": "100",
          "downloadState": "DOWNLOAD_IN_PROGRESS"
        }
      ],
      "name": "CentOS 5.5(64-bit) no GUI (KVM)",
      "zoneid": "acdaf7ed-453f-472d-be42-113f09752667",
      "zonename": "z1"
    },
    {
      "downloaddetails": [
        {
          "datastore": "nfs://172.20.0.1/export/testing/qa1-testzone415-e0bb22b0-kvm/sec1",  <--- store of zone1
          "downloadPercent": "100",
          "downloadState": "DOWNLOADED"
        },
        {
          "datastore": "nfs://172.20.0.1/export/testing/qa1-testzone415-e0bb22b0-kvm/sec2",  <--- store of zone2
          "downloadPercent": "100",
          "downloadState": "DOWNLOAD_IN_PROGRESS"
        }
      ],
      "name": "CentOS 5.5(64-bit) no GUI (KVM)",
      "zoneid": "59dc8b78-85c5-4a24-9d0c-6f79578a0633",
      "zonename": "z2"
    }
  ]
}

Post Fix:

(localcloud) 🐱 > list templates id=ef78027a-06ed-11ec-b12a-5254009b8de5 (CentOS 5.5(64-bit) no GUI (KVM)) templatefilter=all filter=name,zonename,zoneid,downloaddetails
{
  "count": 2,
  "template": [
    {
      "downloaddetails": [
        {
          "datastore": "nfs://172.20.0.1/export/testing/qa1-testzone415-e0bb22b0-kvm/sec1",
          "downloadPercent": "100",
          "downloadState": "DOWNLOADED"
        }
      ],
      "name": "CentOS 5.5(64-bit) no GUI (KVM)",
      "zoneid": "acdaf7ed-453f-472d-be42-113f09752667",
      "zonename": "z1"
    },
    {
      "downloaddetails": [
        {
          "datastore": "nfs://172.20.0.1/export/testing/qa1-testzone415-e0bb22b0-kvm/sec2",
          "downloadPercent": "100",
          "downloadState": "DOWNLOADED"
        }
      ],
      "name": "CentOS 5.5(64-bit) no GUI (KVM)",
      "zoneid": "59dc8b78-85c5-4a24-9d0c-6f79578a0633",
      "zonename": "z2"
    }
  ]
}

Image store details for reference

(localcloud) 🐱 > list imagestores filter=name,zonename,
{
  "count": 2,
  "imagestore": [
    {
      "name": "nfs://172.20.0.1/export/testing/qa1-testzone415-e0bb22b0-kvm/sec2",
      "zonename": "z2"
    },
    {
      "name": "nfs://172.20.0.1/export/testing/qa1-testzone415-e0bb22b0-kvm/sec1",
      "zonename": "z1"
    }
  ]
}

@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. SL-JID 1031

@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 test result (tid-1797)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 37180 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5379-t1797-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_templates.py
Smoke tests completed. 85 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_ssvm_internals Failure 3.98 test_ssvm.py
test_09_list_templates_download_details Failure 0.04 test_templates.py

@yadvr yadvr added this to the 4.15.2.0 milestone Aug 31, 2021
Copy link
Copy Markdown
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

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

Didn't test, lgtm

@shwstppr
Copy link
Copy Markdown
Contributor

shwstppr commented Aug 31, 2021

@Pearl1594 can you please check template test

cat /home/shwstppr/Downloads/pr5379-t1797-kvm-centos7/MarvinLogs/test_templates_RV0F5B/failed_plus_exceptions.txt 
2021-08-27 16:56:44,395 - CRITICAL - FAILED: test_09_list_templates_download_details: ['Traceback (most recent call last):\n', '  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run\n    testMethod()\n', '  File "/marvin/tests/smoke/test_templates.py", line 993, in test_09_list_templates_download_details\n    "Not all templates have download details"\n', '  File "/usr/lib64/python2.7/unittest/case.py", line 562, in assertNotEqual\n    raise self.failureException(msg)\n', 'AssertionError: Not all templates have download details\n']

@yadvr yadvr added the type:bug label Aug 31, 2021
@Pearl1594
Copy link
Copy Markdown
Contributor Author

@shwstppr I've fixed what was causing the test failure

[root@ref-trl-1712-k-M7-pearl-dsilva-marvin ~]# nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=/marvin/ref-trl-1712-k-M7-pearl-dsilva-advanced-cfg -s -a tags=xx --hypervisor=kvm /marvin/tests/smoke/test_templates.py
/usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.hazmat.backends import default_backend

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /marvin/MarvinLogs/Aug_31_2021_14_09_58_XKUVAP. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_09_list_templates_download_details | Status : SUCCESS ===

===final results are now copied to: /marvin//MarvinLogs/test_templates_Z2A6FH===
[root@ref-trl-1712-k-M7-pearl-dsilva-marvin ~]# 

@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. SL-JID 1080

@apache apache deleted a comment from blueorangutan Sep 1, 2021
@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 test result (tid-1889)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 56306 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5379-t1889-kvm-centos7.zip
Smoke tests completed. 88 look OK, 3 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_deploy_vm_start_failure Error 87.73 test_deploy_vm.py
test_deploy_vm_volume_creation_failure Error 80.97 test_deploy_vm.py
test_vm_ha Error 58.22 test_vm_ha.py
test_vm_sync Error 135.92 test_vm_sync.py

@yadvr yadvr merged commit 557dc5e into apache:4.15 Sep 2, 2021
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 2, 2021

Lgtm, failures not related to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants