-
Notifications
You must be signed in to change notification settings - Fork 28
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
cgroup-path #109
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/161874197 The labels on this github issue will be updated when the story is started. |
Also, prepend "bpm-" to the container ID. Close cloudfoundry#109
Also, prepend "bpm-" to the container ID. Close cloudfoundry#109
Also, prepend "bpm-" to the container ID. Close cloudfoundry#109
Also, prepend "bpm-" to the container ID. Close cloudfoundry#109
Just merged a new encoding format for BPM job IDs. It should go out in the next release. Let us know if it's missing anything. Thanks for the issue! |
@xoebus many thanks for changing the container-id. As a side note:
So, the cgroup-path is (The It makes parsing the cgroup-path in sysdig less straightforward. |
Identify BPM containers by "bpm-" prefix in cgroup-path. See also cloudfoundry/bpm-release#109 and cloudfoundry/bpm-release@ea7fef1
Identify BPM containers by "bpm-" prefix in cgroup-path. See also cloudfoundry/bpm-release#109 and cloudfoundry/bpm-release@ea7fef1
Identify BPM containers by "bpm-" prefix in cgroup-path. See also cloudfoundry/bpm-release#109 and cloudfoundry/bpm-release@ea7fef1 sysdig-CLA-1.0-contributing-entity: SAP SE sysdig-CLA-1.0-signed-off-by: David Ansari <[email protected]>
Changing the prefix will change behavior as it's changing the cgroup hierarchy. We're going to probably need to change that soon as we start doing CPU share limiting which is very dependent on the hierarchy. I don't know if we can make any guarantees about what that path will be. |
@xoebus hmm I'm not that deep into how CPU share limiting works and how the cgroup hierachy gets affected, and I don't know whether the following suggestion makes sense but wouldn't it be possible that the cgroup-path stays somewhat stable and BPM identifiable by introducing a bpm root cgroup like Mesos is doing it for example (see https://mesos.readthedocs.io/en/latest/configuration/):
LXC seems to also have this root cgroup (see https://linuxcontainers.org/lxc/manpages/man5/lxc.system.conf.5.html):
That way you could introduce any other hierarchy (including CPU share limiting) below this root cgroup. |
Identify BPM containers by "bpm-" prefix in cgroup-path. See also cloudfoundry/bpm-release#109 and cloudfoundry/bpm-release@ea7fef1 sysdig-CLA-1.0-contributing-entity: SAP SE sysdig-CLA-1.0-signed-off-by: David Ansari <[email protected]>
* Support BPM container type Identify BPM containers by "bpm-" prefix in cgroup-path. See also cloudfoundry/bpm-release#109 and cloudfoundry/bpm-release@ea7fef1 sysdig-CLA-1.0-contributing-entity: SAP SE sysdig-CLA-1.0-signed-off-by: David Ansari <[email protected]> * Update userspace/libsinsp/container_engine/bpm.cpp Co-Authored-By: ansd <[email protected]> * Ensure BPM container ID contains only valid chars sysdig-CLA-1.0-contributing-entity: SAP SE sysdig-CLA-1.0-signed-off-by: David Ansari <[email protected]> * Remove dependency to stdlib regex sysdig-CLA-1.0-contributing-entity: SAP SE sysdig-CLA-1.0-signed-off-by: David Ansari <[email protected]>
TLDR:
bpm
to the cgroup pathDetails:
In a previous story, the decision was to base32 encode the job name for the runc container-id which becomes the cgroup-path in the file
/proc/[pid]/cgroup
:I would like to write a sysdig-bosh release which will be colocated on VMs and which should ideally also be able to monitor bpm containers. Sysdig parses the cgroup-path in order to classify the container type (see here for LXC).
For example, the cgroup-path for an LXC container looks like
/lxc/my-container
:It's the default for LXC (see here):
According to the sysdig code, the same applies to mesos, libvirt-lxc and docker.
Only the bpm container has this base32 encoded cgroup-path like
for the blobstore for example.
Having prepended something like
bpm.
to the cgroup-path would allow to parse it easily in sysdig such that the filtercsysdig -pc container.type=bpm
could match BPM containers.But even though if the cgroup-path looks like
bpm.MJWG6YTTORXXEZI-
, the output for above filter would show a container column with the nameMJWG6YTTORXXEZI-
rather thanblobstore
.Therefore, it would also be better to not base32 encode the whole container name, but encode maybe only those chars which do not match the regex
^[\w+-\.]+$
(see code). This would probably require to have a special delimiter char for the decoding process in order to identify the encoded chars.See also Slack discussion for more context.
If the above two requirements are okay with you, I could also create a PR.
The text was updated successfully, but these errors were encountered: