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

Goss validation fails within a container while reading the process name in ubuntu16.04 #775

Closed
ns-tghosh opened this issue Jul 18, 2022 · 8 comments
Labels

Comments

@ns-tghosh
Copy link

Describe the bug

Below process validation in goss is failing within a container:
root 15 1 0 19:08 ? 00:00:00 /usr/bin/python3.8 /usr/local/bin/verdict_controller_server.py --port 5000

# ps -p 15 -o comm,cmd
COMMAND         CMD
verdict_control /usr/bin/python3.8 /usr/local/bin/verdict_controller_server.py --port 5000

# cat /proc/15/comm
verdict_control

# cat process.yaml
process:
  verdict_control:
    running: true

# ../goss -g process.yaml validate
F

Failures/Skipped:

Process: verdict_control: running:
Expected
    false
to equal
    true

Total Duration: 0.027s
Count: 1, Failed: 1, Skipped: 0

Environment:

  • Version of goss - We are cloning v4 branch of goss
  • OS/Distribution version (if applicable) - Ubuntu 16.04.7 LTS
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.7 LTS
Release:        16.04
Codename:       xenial
@ns-tghosh ns-tghosh added the bug label Jul 18, 2022
@ns-tghosh ns-tghosh changed the title Goss validation fails while reading the process name in ubuntu16.04 Goss validation fails within a container while reading the process name in ubuntu16.04 Jul 18, 2022
@ns-tghosh
Copy link
Author

@aelsabbahy Any luck on the issue, please?

@aelsabbahy
Copy link
Member

I can create a v4-bugs label to track bugs specifically for that branch. I don't think the v4 branch is stable or complete.

That said.. it might be verdict_controller_server.py. If that doesn't work, I would suggest reading through the gopsutil code to see how it resolved process names.

Out of curiosity, why doesn't the release version of Goss meet your needs?

@ns-tghosh
Copy link
Author

@aelsabbahy We are using v4 branch to utilize the stdout feature which is not yet merged in the release branch. Please refer to this issue.

We tried with the release branch and the process determination is working correctly, however, the stdout feature is quite needed for us, so we can't give it up at this point.

@aelsabbahy
Copy link
Member

Hello, just following up on this.

Did the name in my last message work for you?

@ns-tghosh
Copy link
Author

By that time we have faced this issue in multiple cases, however, the output of ps -p <pid> -o comm works in the release branch. But we need to keep using v4 for the stdout feature.

@aelsabbahy aelsabbahy added v4-bug and removed bug labels Sep 2, 2022
@aelsabbahy
Copy link
Member

I created v4-bug to track bugs on the v4 release.

Feel free to open more bugs on this branch as you encounter them.

Is everything working well for you now with the process test?

@aelsabbahy
Copy link
Member

v0.4.0 release candidate just released.. It uses the v0.3.X process detection (due to this issue and others).

Let me know if that works well for you.

@aelsabbahy
Copy link
Member

Resolved in v4 release, feel free to re-open issue or open new issue if you have further issues.

Thank you for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants