FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Provide option to force delete the project by ravening · Pull Request #4617 · apache/cloudstack · GitHub

Repository navigation

Provide option to force delete the project - #4617

Merged
nvazquez merged 2 commits into
apache:mainfrom
ravening:cleanup-project
Sep 26, 2021
Merged

nvazquez merged 2 commits into
apache:mainfrom
ravening:cleanup-project

Conversation

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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:

Or is this too much info??

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@Pearl1594 I can do that

shwstppr added this to the 4.16.0.0 milestone Feb 8, 2021

yadvr commented Mar 6, 2021

Copy link
Copy Markdown
Member

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2880

yadvr closed this Jun 17, 2021
yadvr reopened this Jun 17, 2021

yadvr commented Jun 17, 2021

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Trillian Build Failed (tid-1092)

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@ravening Can you fix the conflicts ? Thanks

Copy link
Copy Markdown
Contributor

Hi @ravening can you please fix the conflicts?

yadvr commented Aug 9, 2021

Copy link
Copy Markdown
Member

ping @ravening

Copy link
Copy Markdown
Member Author

@rhtyd @nvazquez @davidjumani done

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

code lgtm

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@blueorangutan test

weizhouapache reopened this Sep 3, 2021

Copy link
Copy Markdown

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

yadvr closed this Sep 15, 2021
yadvr reopened this Sep 15, 2021

yadvr commented Sep 15, 2021

Copy link
Copy Markdown
Member

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

yadvr commented Sep 22, 2021

Copy link
Copy Markdown
Member

Ping @ravening

yadvr commented Sep 22, 2021

Copy link
Copy Markdown
Member

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Trillian Build Failed (tid-2191)

Copy link
Copy Markdown
Contributor

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL