Skip to content

Conversation

@ravening
Copy link
Member

Description

Provide a cleanup flag so that the project will
be deleted only when there are no resources left
in the project. If users click on delete project
by mistake then everything is deleted.

Ui changes ported from apache/cloudstack-primate#848

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

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

List<NetworkVO> networks = _networkDao.listByOwner(project.getProjectAccountId());
List<? extends Vpc> vpcs = _vpcMgr.getVpcsForAccount(project.getProjectAccountId());

Optional<String> message = Stream.of(userTemplates, vmSnapshots, vms, volumes, networks, vpcs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Overall, LGTM. But would it be better, if we could inform the user about all the resources that are tied to the project as opposed to the first one that's found - by doing something like this:

 List<String> message = Stream.of(userTemplates, vmSnapshots, vms, volumes, networks, vpcs)
                    .filter(entity -> !entity.isEmpty())
                    .map(entity -> entity.size() + " " +  entity.get(0).getEntityType().getSimpleName())
                    .collect(Collectors.toList());
 ...                   
 String msg = String.join(",", message) + " to clean up";
 CloudRuntimeException e = new CloudRuntimeException("Can't delete the project yet because it has " + msg);
 ...

Such that the end error would look like:

image

Or is this too much info??

Copy link
Member Author

Choose a reason for hiding this comment

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

@Pearl1594 I can do that

@shwstppr shwstppr added this to the 4.16.0.0 milestone Feb 8, 2021
@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rhtyd 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. JID-2880

@rohityadavcloud
Copy link
Member

@ravening can you investigate the build failure, I'll rekick as well
@blueorangutan package

@blueorangutan
Copy link

@rhtyd 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 254

@sureshanaparti
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian Build Failed (tid-1092)

@davidjumani
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@davidjumani
Copy link
Contributor

@ravening Can you fix the conflicts ? Thanks

@nvazquez
Copy link
Contributor

Hi @ravening can you please fix the conflicts?

@rohityadavcloud
Copy link
Member

ping @ravening

@ravening
Copy link
Member Author

@rhtyd @nvazquez @davidjumani done

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

code lgtm

@nvazquez
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@nvazquez
Copy link
Contributor

@blueorangutan test

@weizhouapache weizhouapache reopened this Sep 3, 2021
@blueorangutan
Copy link

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

Test Result Time (s) Test File
ContextSuite context=TestDeployVmWithAffinityGroup>:teardown Error 138.15 test_affinity_groups_projects.py
test_07_project_resources_account_delete Error 5.43 test_projects.py
test_08_cleanup_after_project_delete Error 5.83 test_projects.py
ContextSuite context=TestProjectResources>:teardown Error 6.89 test_projects.py
ContextSuite context=TestProjectSuspendActivate>:teardown Error 65.97 test_projects.py

@rohityadavcloud
Copy link
Member

@ravening can you review and fix the failing project related smoketests?

@rohityadavcloud
Copy link
Member

Ping @ravening

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@ravening
Copy link
Member Author

Ping @ravening

@rhtyd will look into it

ravening and others added 2 commits September 23, 2021 09:44
be deleted only when there are no resources left
in the project. If users click on delete project
by mistake then everything is deleted.
@ravening
Copy link
Member Author

@rhtyd @nvazquez fixed travis issues.. can you trigger it again?

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@sureshanaparti
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian Build Failed (tid-2191)

@sureshanaparti
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants