Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workload] Microservice Test: Are processes reaped (zombies) properly? #1719

Closed
24 tasks
wvwatson opened this issue Jan 9, 2023 · 5 comments
Closed
24 tasks
Assignees
Labels
8 pts microservice Test the microservice cloud native properties of a CNF sprint23.09 Sprint 23.09: April 20-May 3, 2023 v0.42.2 Issue included in v0.42.2 release workload

Comments

@wvwatson
Copy link
Collaborator

wvwatson commented Jan 9, 2023

Title: [Workload] Microservices test: process_reaped

Is your workload test idea related to a problem? Please describe.
How classic init systems handle orphaned processes
Classic init systems such as systemd are also used to remove (reap) orphaned, zombie processes. Orphaned processes—processes whose parents have died—are reattached to the process that has PID 1, which should reap them when they die. A normal init system does that. But in a container, this responsibility falls on whatever process has PID 1. If that process doesn't properly handle the reaping, you risk running out of memory or some other resources.
https://cloud.google.com/architecture/best-practices-for-building-containers

These problems have several common solutions, outlined in the following sections.

Describe the solution you'd like

Test Category Name

  • Microservice

Type of test (static or runtime)

  • runtime

Documentation tasks:

QA tasks

Dev Review:

  • walk through A/C
  • do you get the expected result?
  • if yes,
    • move to Needs Peer Review column
    • create Pull Request and follow check list
    • Assign 1 or more people for peer review
  • if no, document what additional tasks will be needed

Peer review:

  • walk through A/C
  • do you get the expected result?
  • if yes,
    • move to Reviewer Approved column
    • Approve pull request
  • if no,
    • document what did not go as expected, including error messages and screenshots (if possible)
    • Add comment to pull request
    • request changes to pull request
@denverwilliams denverwilliams self-assigned this Jan 11, 2023
@denverwilliams
Copy link
Collaborator

Skeleton code & research to test for unclean term signals being sent to sub-processes.
https://hackmd.io/X24dvbkTTMmFUuEU0f-Wtg

@wvwatson wvwatson changed the title [Workload] Microservice Test: Are processes reaped and are term signals passed properly? [Workload] Microservice Test: Are processes reaped properly? Jan 12, 2023
@lixuna lixuna added the microservice Test the microservice cloud native properties of a CNF label Jan 19, 2023
denverwilliams added a commit that referenced this issue Feb 24, 2023
Signed-off-by: denverwilliams <denver@debian.nz>
denverwilliams added a commit that referenced this issue Mar 2, 2023
Signed-off-by: denverwilliams <denver@debian.nz>
wvwatson referenced this issue Mar 4, 2023
…eate zombies cncf/cnf-testsuite#1719

Signed-off-by: denverwilliams <denver@debian.nnz>
denverwilliams added a commit that referenced this issue Mar 7, 2023
Signed-off-by: denverwilliams <denver@debian.nz>
wvwatson referenced this issue in cnf-testsuite/cluster_tools Mar 8, 2023
wvwatson referenced this issue in cnf-testsuite/cluster_tools Mar 8, 2023
wvwatson referenced this issue Mar 17, 2023
wvwatson referenced this issue Mar 17, 2023
Signed-off-by: denverwilliams <denver@debian.nnz>
wvwatson referenced this issue Mar 17, 2023
Signed-off-by: denverwilliams <denver@debian.nnz>
wvwatson pushed a commit that referenced this issue Mar 17, 2023
Signed-off-by: denverwilliams <denver@debian.nnz>
@wvwatson wvwatson changed the title [Workload] Microservice Test: Are processes reaped properly? [Workload] Microservice Test: Are processes reaped (zombies) properly? Mar 17, 2023
agentpoyo added a commit that referenced this issue Apr 10, 2023
@agentpoyo
Copy link
Collaborator

agentpoyo commented May 5, 2023

Acceptance Criteria

  • Setup or find a k8s cluster
  • Pull down latest branch with code updates or main if merged already; build cnf-testsuite from source.
  • Run setup
  • Now run cnf_setup and use sample-cnfs/sample_good_zombie_handling/cnf-testsuite.yml as your CNF to setup
  • If successfully installed onto your cluster, now run cnf-testsuite zombie_handled and you should see this PASS
  • Run cnf_cleanup on the config file to remove the sample CNF
  • Now run cnf_setup and use sample-cnfs/sample-bad-zombie/cnf-testsuite.yml as your CNF to setup
  • If successfully installed onto your cluster, now run cnf-testsuite zombie_handled and you should see this FAIL
  • I can see a screenshot of the results here.

@agentpoyo
Copy link
Collaborator

1719_zombie_results

@agentpoyo
Copy link
Collaborator

1719_helm_error

@agentpoyo
Copy link
Collaborator

I had to modify the helm namspace creation, my cluster was giving me errors. It's likely an environment issue since using default namespace for the individual test resulted in desired output:

1719_failed_zombie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8 pts microservice Test the microservice cloud native properties of a CNF sprint23.09 Sprint 23.09: April 20-May 3, 2023 v0.42.2 Issue included in v0.42.2 release workload
Projects
None yet
Development

No branches or pull requests

4 participants