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

podman: Wrap the start command with cgroup manager too #8001

Merged
merged 4 commits into from
May 11, 2020

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented May 4, 2020

When running with podman, to match the run cmd

Version:            1.8.2
RemoteAPI Version:  1
Go Version:         go1.13.8
Git Commit:         028e3317eb1494b9b2acba4a0a295df80fae66cc
Built:              Mon Apr 27 11:07:45 2020
OS/Arch:            linux/amd64

Closes #7996

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 4, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 4, 2020
@afbjorklund afbjorklund requested a review from medyagh May 4, 2020 20:28
@medyagh
Copy link
Member

medyagh commented May 4, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 4, 2020
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

do you mind putting in the PR description which version of podman u tried this with on which os? I remember some version of podman didn't have that flag (maybe it was on mac)

pkg/drivers/kic/oci/oci.go Show resolved Hide resolved
@medyagh medyagh changed the title Wrap the start command with cgroup manager too podman: Wrap the start command with cgroup manager too May 4, 2020
@afbjorklund
Copy link
Collaborator Author

Note that this means that podman-remote will be broken, until flipping the server to cgroupfs.

/etc/containers/libpod.conf

# CGroup Manager - valid values are "systemd" and "cgroupfs"
cgroup_manager = "systemd"

Nothing that can be done on the podman client side to change that, so needs server config.

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [62.15741351100001 64.66631686999999 65.686410855]
Average time for minikube: 64.17004707866666

Times for Minikube (PR 8001): [62.765769028 63.40405177600001 63.992705879]
Average time for Minikube (PR 8001): 63.38750889433334

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8001) |
+--------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.2 on   |  0.058763 |           0.059388 |
| Debian 9.11                    |           |                    |
| * Using the kvm2 driver based  |  0.020255 |           0.019966 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.005145 |           0.003154 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 38.762764 |          39.964713 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.1 | 22.604172 |          21.150206 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.388920 |           1.283541 |
| components...                  |           |                    |
| * Enabled addons:              |  1.251130 |           0.833246 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.074229 |           0.068316 |
| configured to use "minikube"   |           |                    |
|                                |  0.004669 |           0.004977 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [27.663703982 27.786401626999996 26.798023993]
Average time for minikube: 27.416043200666664

Times for Minikube (PR 8001): [25.549244355000006 27.588306021 27.742802625]
Average time for Minikube (PR 8001): 26.960117667000002

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 8001) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.2 on           |  0.078104 |           0.077287 |
| Debian 9.11                            |           |                    |
| * Using the docker driver              |  0.002665 |           0.002862 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.059792 |           0.058155 |
| minikube in cluster minikube           |           |                    |
| * Creating docker container            |  7.721303 |           7.618246 |
| (CPUs=2, Memory=3700MB) ...            |           |                    |
| * Preparing Kubernetes v1.18.1         |  0.118303 |           0.119169 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 18.158299 |          17.617784 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Verifying Kubernetes                 |  1.086576 |           1.395885 |
| components...                          |           |                    |
| * Enabled addons:                      |  0.121001 |           0.002641 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.062799 |           0.064039 |
| configured to use "minikube"           |           |                    |
|                                        |  0.007202 |           0.004051 |
+----------------------------------------+-----------+--------------------+

pkg/drivers/kic/oci/oci.go Show resolved Hide resolved
@afbjorklund
Copy link
Collaborator Author

There is no documentation on how to set up the remote VM for Mac or Win, unfortunately...

The upstream install docs all assume that such a Linux host is already available over SSH:

https://podman.io/getting-started/installation

MacOS
Podman is a tool for running Linux containers. You can do this from a MacOS desktop as long as you have access to a linux box either running inside of a VM on the host, or available via the network. You need to install the remote client and then setup ssh connection information in the podman-remote.conf file.

Windows
Podman is a tool for running Linux containers. You can do this from a Windows desktop as long as you have access to a linux box either running inside of a VM on the host, or available via the network. You need to install the remote client and then setup ssh connection information in the podman-remote.conf file.

https://github.com/containers/libpod/blob/master/docs/source/markdown/podman-remote.conf.5.md

@medyagh
Copy link
Member

medyagh commented May 6, 2020

/retest-this-please

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented May 9, 2020

Got some weird errors testing this locally, after merging all the other required fixes.

And the error messages still suck, so they will need to be "translated" for context

🤷  podman "minikube" container is missing, will recreate.
E0509 10:08:50.050518   27427 oci.go:79] podman daemon seems to be stuck. Please try restarting your podman. Will try to delete anyways: unknown state "minikube": sudo podman inspect minikube --format={{.State.Status}}: exit status 125
stdout:

stderr:
Error: error getting image "minikube": unable to find a name and tag match for minikube in repotags: no such image

That is: there is no "podman daemon" here, and it's not an image.

Deleting and starting again seems to fail to remove the podman volume.

💣  error provisioning host: Failed to start host: creating host: create: creating: setting up container node: creating volume for minikube container: sudo podman volume create minikube --label name.minikube.sigs.k8s.io=minikube --label created_by.minikube.sigs.k8s.io=true: exit status 125
stdout:

stderr:
Error: volume with name minikube already exists: volume already exists

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [64.42576213900001 63.916991106000005 64.088412706]
Average time for minikube: 64.14372198366668

Times for Minikube (PR 8001): [63.337755976 64.18964069100001 62.98473456199999]
Average time for Minikube (PR 8001): 63.504043743000004

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8001) |
+--------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.2 on   |  0.061715 |           0.058824 |
| Debian 9.11                    |           |                    |
| * Using the kvm2 driver based  |  0.019129 |           0.018929 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.002864 |           0.003040 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 40.741720 |          40.046458 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.1 | 21.422405 |          21.439940 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.380455 |           1.405979 |
| components...                  |           |                    |
| * Enabled addons:              |  0.428918 |           0.457201 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.082541 |           0.069720 |
| configured to use "minikube"   |           |                    |
|                                |  0.003974 |           0.003951 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [27.903711896999997 27.61384724 27.522021744]
Average time for minikube: 27.679860293666664

Times for Minikube (PR 8001): [25.433446959999998 25.23349494 27.938520155]
Average time for Minikube (PR 8001): 26.201820685

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 8001) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.2 on           |  0.073796 |           0.072377 |
| Debian 9.11                            |           |                    |
| * Using the docker driver              |  0.002436 |           0.002237 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.058867 |           0.059641 |
| minikube in cluster minikube           |           |                    |
| * Creating docker container            |  7.585209 |           7.367163 |
| (CPUs=2, Memory=3700MB) ...            |           |                    |
| * Preparing Kubernetes v1.18.1         |  0.117392 |           0.112495 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 18.577339 |          17.447838 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Verifying Kubernetes                 |  1.102257 |           1.067485 |
| components...                          |           |                    |
| * Enabled addons:                      |  0.095995 |           0.003892 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.062161 |           0.062641 |
| configured to use "minikube"           |           |                    |
|                                        |  0.004409 |           0.006052 |
+----------------------------------------+-----------+--------------------+

@afbjorklund afbjorklund requested a review from medyagh May 9, 2020 12:55
@afbjorklund afbjorklund self-assigned this May 9, 2020
@medyagh medyagh merged commit 6b97ee8 into kubernetes:master May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

driver=podman, container-engine=docker, restart stopped minikube OCI runtime error
4 participants