Comments (6)
The problem is that the CMD may contain space delimited data. i.e. http -D This throws the splitting of that line of data off by index.
from podman.
@rhatdan @mheon @TomSweeneyRedHat I've been noodling on this for a while... I havent stumbled on a great way to fix this. Do you guys have any ideas?
Basically the issue is that we run a ps command inside the container and perform a strings.Field on the output which splits the string into a []string based on whitespace.
Ideally ps could identify a field delimiter but that doesn't seem to be an option. I messed with OFS and awk but I don't think it is reliable. Moving 'cmd' output to the end of the output table could be an option, but it surely doesn't output then in the order the user asked for. However, there are alias shortcuts in ps that include cmd so we could not always control it.
I also looked at the golang/psutil project and while good, it cannot support true ps options and would require a lot of wiring to make it work.
from podman.
@baude It would require some refactoring, but we could use the headers of the ps output to determine where the columns are in the output line and use that to split instead - get the index of the start of each word in the header, and then split at those indexes
from podman.
@mheon I looked into this a bit ... The problem I am seeing is that the column data line up is not reliable either. Consider the following:
01234567890123456789012345678901234567890
UID PID PPID C STIME TTY TIME CMD
0 13908 13898 0 2017 pts/0 00:01:44 top
Some line up to the header on the right, the left, and even in the middle!
from podman.
@baude Oh that's just lovely. And I take it we can't guarantee that CMD will always be the last entry, either?
from podman.
Nope ... think we might need to deep dive this a little deeper and see what others do
from podman.
Related Issues (20)
- [bitnami/php-fpm] nginx & php-fpm images with podman compose - nginx container crashes on start
- "podman machine start" fails to run in ADO Pipeline Job on Windows Self-Hosted Agent HOT 2
- Podman machine does not stop correctly while running a container HOT 5
- podman v4 is fetching podman v5 and it's not compliant on macOS HOT 4
- MemoryMax value is inaccessible from inside the container HOT 2
- Mac - Podman Machine - and Quadlets HOT 4
- Execute podman inspect or stop return "json: cannot unmarshal array into Go struct field InspectContainerConfig.Config.Entrypoint of type string" HOT 1
- Podman volume create with rest api HOT 1
- systemctl link ./*.container is not a valid unit name (systemd podman integration) HOT 1
- Podman fails to change access rights during podman build phase HOT 1
- command `sudo` cannot work in podman container HOT 1
- Let netfilter handle NAT HOT 2
- Outdated documentation: slirp4netns vs pasta HOT 6
- ory/hydra startup results in: container state improper HOT 1
- machine: timeout in start
- Podman is unable to write to AWS EFS (NFS) when used as additional file storage HOT 2
- Cannot see a Fuse Mount from all containers of a same pod HOT 3
- podman.sock: runtime error: index out of range [0] with length 0 HOT 17
- Ports forwarded on loopback addresses other than 127.0.0.1 are not available on Windows host
- Podman is unable to read from AWS EFS (NFS) when used as additional file storage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podman.