[kata-dev] Regarding, Kata 2.0.0, kata-runtime

Gupta, Sandeep Sandeep.Gupta at amd.com
Mon Jan 4 22:19:15 UTC 2021


[AMD Official Use Only - Internal Distribution Only]

Thank you Fabiano, Thank you James,

I built 'kata-containers-stable-2.0.0/src/agent' and included it in the rootfs ---- "sudo install -o root -g root -m 0550 -T ../../agent/kata-agent ${ROOTFS_DIR}/sbin/init",
And rebuilt 'tools/osbuilder/initrd-builder/kata-containers-initrd.img' ---- script -fec 'sudo -E AGENT_INIT=yes ./initrd_builder.sh ${ROOTFS_DIR}'

Now I can run - 

# ctr run --runtime io.containerd.run.kata.v2 -t --rm docker.io/library/busybox:latest sh
/ #
/ #
/ # ps
PID   USER     TIME  COMMAND
    1 root      0:00 sh
    2 root      0:00 ps
/ # exit

# /usr/local/bin/kata-runtime --version
  : 2.0.0
   commit   : <<unknown>>
   OCI specs: 1.0.1-dev


--Thanking You
--Sandeep


-----Original Message-----
From: Hunt, James O <james.o.hunt at intel.com> 
Sent: Monday, January 4, 2021 7:36 AM
To: Gupta, Sandeep <Sandeep.Gupta at amd.com>; Fabiano Fidêncio <fidencio at redhat.com>
Cc: kata-dev at lists.katacontainers.io
Subject: Re: [kata-dev] Regarding, Kata 2.0.0, kata-runtime

[CAUTION: External Email]

Hi Sandeep,

Correct - Docker doesn't support shimv2 yet. However, getting Kata 2.x running with containerd is very simple and the CLI for containerd is reasonably similar to docker:

# Kata 1.x

$ docker run --runtime=kata-runtime ...

# Kata 2.x

$ ctr run --runtime io.containerd.kata.v2 ...


See [1] for further details.

Cheers,

James

[1] - https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkata-containers%2Fkata-containers%2Fblob%2F2.0-dev%2Fdocs%2Finstall%2Fcontainer-manager%2Fcontainerd%2Fcontainerd-install.md%23test-the-installation&data=04%7C01%7CSandeep.Gupta%40amd.com%7Cb4323976a1d042d7fe4b08d8b0c67a83%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637453713804038273%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Ooigbe4qGEG3oqmE2%2F6NqsQNaTFSoEUDV0lrheu%2FzlQ%3D&reserved=0
---
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fkatacontainers.io%2F&data=04%7C01%7CSandeep.Gupta%40amd.com%7Cb4323976a1d042d7fe4b08d8b0c67a83%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637453713804038273%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=joJSjU8%2BKlhTi3SRRX8P0ayT6kCwVEemuwhxb5GvABM%3D&reserved=0 | https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkata-containers&data=04%7C01%7CSandeep.Gupta%40amd.com%7Cb4323976a1d042d7fe4b08d8b0c67a83%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637453713804038273%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xjp1stFvzFArghemCq6drr2LOG%2BURE0OX4SzZtY98fw%3D&reserved=0
Open Source Technology Center
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ.

________________________________________
From: Gupta, Sandeep <Sandeep.Gupta at amd.com>
Sent: Monday, 4 January 2021 11:09
To: Fabiano Fidêncio; Gupta, Sandeep
Cc: kata-dev at lists.katacontainers.io
Subject: Re: [kata-dev] Regarding, Kata 2.0.0, kata-runtime

[AMD Official Use Only - Internal Distribution Only]

Thank you Fabiano,
Will try the deployed version first,
One more to check please - In my understanding - Docker doesn't yet support the containerd shimv2 architecture directly, Kata 2.0.0 won't work with Docker ?
Is this correct ?
Any workarounds.

--Best Regards
--Sandeep


-----Original Message-----
From: Fabiano Fidêncio <fidencio at redhat.com>
Sent: Sunday, January 3, 2021 11:38 PM
To: Gupta, Sandeep <Sandeep.Gupta at amd.com>
Cc: kata-dev at lists.katacontainers.io
Subject: Re: [kata-dev] Regarding, Kata 2.0.0, kata-runtime

[CAUTION: External Email]

Sandeep,

[...]

> Trying version-1 syntax:          (for /usr/local/bin/containerd -config /etc/containerd/config.toml),
>
> # cat /etc/containerd/config.toml
> [plugins.cri.containerd]
>       no_pivot = false
>
>     [plugins.cri.containerd.runtimes]
>       [plugins.cri.containerd.runtimes.runc]
>          runtime_type = "io.containerd.runc.v1"
>
>          [plugins.cri.containerd.runtimes.runc.options]
>            NoPivotRoot = false
>            NoNewKeyring = false
>            ShimCgroup = ""
>            IoUid = 0
>            IoGid = 0
>            BinaryName = "runc"
>            Root = ""
>            CriuPath = ""
>            SystemdCgroup = false
>
>       [plugins.cri.containerd.runtimes.kata]
>          runtime_type = "io.containerd.kata.v2"
>           [plugins.cri.containerd.runtimes.kata.options]
>            ConfigPath = "/etc/kata-containers/configuration.toml"
>
>       [plugins.cri.containerd.runtimes.katacli]
>          runtime_type = "io.containerd.runc.v1"
>          [plugins.cri.containerd.runtimes.katacli.options]
>            NoPivotRoot = false
>            NoNewKeyring = false
>            ShimCgroup = ""
>            IoUid = 0
>            IoGid = 0
>            BinaryName = "/usr/local/bin/kata-runtime"
>            Root = ""
>            CriuPath = ""
>            SystemdCgroup = false
>

[...]

> /# ctr run --runtime io.containerd.run.kata.v2 -t --rm 
> docker.io/library/busybox:latest sh
>
> ctr: Failed to check if grpc server is working: unexpected EOF:
> unknown
>
>
>
> I can discuss this Issue in, Kata AC call in 2021 on January 5th.

We can, but I think it may be easier to debug this via e-mail or Slack.
So, I'd like to ask you a few questions that will help me (and hopefully others) to understand where the error is coming from.
* When you're using 2.x, you're only replacing the runtime binary, but also the image and the agent inside it, right?
  - The reason I'm asking is because 2.x runtime doesn't speak the same language as the 1.x agent.
* Is your agent built using musl or gnu libc?

If you want to give it a quick try just to ensure kata 2.0 works for you before you start hacking the code, I'd suggest using
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkata-containers%2Fpackaging%2Ftree%2Fmaster%2Fkata-deploy&data=04%7C01%7CSandeep.Gupta%40amd.com%7Cb4323976a1d042d7fe4b08d8b0c67a83%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637453713804038273%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mjlLwfdqYHNVkRN9XPqXTkiJ6s%2Bl0lGNDZvP2%2FZ0sWk%3D&reserved=0

I hope that helps!

Best Regards,
--
Fabiano Fidêncio

_______________________________________________
kata-dev mailing list
kata-dev at lists.katacontainers.io
https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.katacontainers.io%2Fcgi-bin%2Fmailman%2Flistinfo%2Fkata-dev&data=04%7C01%7CSandeep.Gupta%40amd.com%7Cb4323976a1d042d7fe4b08d8b0c67a83%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637453713804048268%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=V%2Bwb5DtcTv%2FaPFvkp0qNzUV50%2BRPLjTWoEpZHgzxnic%3D&reserved=0
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.



More information about the kata-dev mailing list