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

Extend metalk8s-utils image content #2156

Open
NicolasT opened this issue Dec 19, 2019 · 13 comments · Fixed by #2374
Open

Extend metalk8s-utils image content #2156

NicolasT opened this issue Dec 19, 2019 · 13 comments · Fixed by #2374
Assignees
Labels
topic:operations Operations-related issues

Comments

@NicolasT
Copy link
Contributor

If thanks to #2146 the metalk8s-utils image starts to get used more often, we must ensure it contains all tools people use to debug/troubleshoot a system. We currently only include a couple:

  • bind-utils
  • curl
  • httpie
  • iperf
  • iproute
  • socat
  • telnet

I bet there's a bunch of other useful tools we could/should add. This ticket is meant to collect those, so please comment.

@NicolasT NicolasT added topic:operations Operations-related issues moonshot labels Dec 19, 2019
@NicolasT NicolasT self-assigned this Dec 19, 2019
@NicolasT
Copy link
Contributor Author

NicolasT commented Dec 19, 2019

Some I was thinking of (in no particular order):

  • vim
  • kubectl
  • etcdctl
  • ssh
  • rsync
  • ebtables
  • ethtool
  • iptables
  • ipset
  • conntrack-tools
  • net-tools
  • e2fsprogs
  • xfsprogs
  • jq
  • tcpdump
  • LVM utilities
  • salt, salt-call and salt-run
  • crictl
  • gdb (would require a fairly particular Pod configuration though)
  • parted, RAID management tools,... (could work with a privileged Pod)
  • htop
  • iotop
  • sysstat

@slaperche-scality
Copy link
Contributor

slaperche-scality commented Dec 19, 2019

I would add:

  • lsof
  • strace
  • ltrace

dfc may also be a nice alternative todf (color, export to CSV, filter by FS type, …).

Maybe also a top-like for the network (jnettop or nethogs comes to mind).

tshark may also be useful if one want to do more advanced analysis than what's supported by tcpdump.

Dunno if nmap would make sense as troubleshooting tool?

@gdemonet
Copy link
Contributor

There was a talk in KubeCon NA '19 about how to use a sidecar container for debugging and profiling, included a bunch of useful tools, maybe it would be worth considering as well: https://kccncna19.sched.com/event/UaXU/debugging-live-applications-the-kubernetes-way-from-a-sidecar-joe-elliott-grafana-labs

@gdemonet
Copy link
Contributor

@NicolasT you suggested kubectl, salt and the likes, which we already have available in our repos. Is it really necessary to pre-install them in this image (which size would thus grow), or could we simply setup our internal repositories in the image and let users install whatever they want / even build other images on top of this one?

@slaperche-scality
Copy link
Contributor

Preinstalling them would allow to use them even if our repos are down/broken for some reasons, no?

@NicolasT
Copy link
Contributor Author

There was a talk in KubeCon NA '19 about how to use a sidecar container for debugging and profiling, included a bunch of useful tools, maybe it would be worth considering as well: https://kccncna19.sched.com/event/UaXU/debugging-live-applications-the-kubernetes-way-from-a-sidecar-joe-elliott-grafana-labs

The intent is (for now) not to act as a debug container / detachable sidecar (we don't support that yet). However, that could be useful over time.

@NicolasT
Copy link
Contributor Author

@NicolasT you suggested kubectl, salt and the likes, which we already have available in our repos. Is it really necessary to pre-install them in this image (which size would thus grow), or could we simply setup our internal repositories in the image and let users install whatever they want / even build other images on top of this one?

The idea is to come up with a couple of Pod manifests that could be used to deploy a container with this image and get a shell, and be at various degrees of 'host-level access'.

As such, we could create such Pod templates to e.g. run on the salt-master node and export /var/run/salt from the host in the container so the salt tools work, same for salt-call on non-salt-master nodes, expose /etc/kubernetes/admin.conf into a container,...

Then also, run such container as privileged, expose the host FS into the container,...

So indeed, some of the tools could be installed on the host. However, for 'ease of use', it may be useful to have a container which includes all those tools, and have a way to deploy it on some host, then troubleshoot things using those tools from inside the container, but as if you're on the host (to a large extent).

@NicolasT
Copy link
Contributor Author

One more: nsenter

@NicolasT
Copy link
Contributor Author

@NicolasT
Copy link
Contributor Author

https://github.com/microsoft/ethr which can, unlike iperf(3), actually fill a 25Gbit/s+ pipe.

@NicolasT
Copy link
Contributor Author

less, anyone?

NicolasT added a commit that referenced this issue Apr 6, 2020
This patch extends the `metalk8s-utils` `Dockerfile` to add a bunch of
packages (and make some related changes):

- The Kubernetes and SaltStack repositories are enabled in the image
- No longer override the entrypoint
- Fail when a given package (name) doesn't exist
- Add the following packages to the image:

  * `bash-completion`
  * `conntrack-tools`
  * `e2fsprogs`
  * `ebtables`
  * `etcd`, for `etcdctl`
  * `ethtool`
  * `gdb`
  * `git`
  * `htop`
  * `httpd-tools`, for `htpasswd` (see #2352)
  * `iotop`
  * `iperf3` (next to `iperf` which was already installed)
  * `ipset`
  * `iptables`
  * `ipvsadm`
  * `jnettop`
  * `jq`
  * `kubectl` (pinned to the version of Kubernetes this MetalK8s release
    ships with)
  * `less`
  * `lsof`
  * `ltrace`
  * `lvm2`
  * `net-tools`
  * `nethogs`
  * `nmap`
  * `nmap-ncat`, for `nc`
  * `openssh-clients`
  * `openssh-server`
  * `openssl`, for its CLI interface
  * `parted`
  * `perf`
  * `rsync`
  * `salt-master`, for `salt` and `salt-run`
  * `salt-minion`, for `salt-call`
  * `strace`
  * `sysstat`
  * `tcpdump`
  * `util-linux`, for `nsenter` and others
  * `vim`
  * `wget`
  * `wireshark`, for `tshark`
  * `xfsprogs`

This resolves #2156 to a great extent. However, documentation on how to
use the image is still lacking, as well as some of the tools referred to
in the ticket, for which no upstream packages are available.

See: #2156
See: #2352
NicolasT added a commit that referenced this issue Apr 6, 2020
This patch extends the `metalk8s-utils` `Dockerfile` to add a bunch of
packages (and make some related changes):

- The Kubernetes and SaltStack repositories are enabled in the image
- No longer override the entrypoint
- Fail when a given package (name) doesn't exist
- Add the following packages to the image:

  * `bash-completion`
  * `conntrack-tools`
  * `e2fsprogs`
  * `ebtables`
  * `etcd`, for `etcdctl`
  * `ethtool`
  * `gdb`
  * `git`
  * `htop`
  * `httpd-tools`, for `htpasswd` (see #2352)
  * `iotop`
  * `iperf3` (next to `iperf` which was already installed)
  * `ipset`
  * `iptables`
  * `ipvsadm`
  * `jnettop`
  * `jq`
  * `kubectl` (pinned to the version of Kubernetes this MetalK8s release
    ships with)
  * `less`
  * `lsof`
  * `ltrace`
  * `lvm2`
  * `net-tools`
  * `nethogs`
  * `nmap`
  * `nmap-ncat`, for `nc`
  * `openssh-clients`
  * `openssh-server`
  * `openssl`, for its CLI interface
  * `parted`
  * `perf`
  * `rsync`
  * `salt-master`, for `salt` and `salt-run`
  * `salt-minion`, for `salt-call`
  * `strace`
  * `sysstat`
  * `tcpdump`
  * `util-linux`, for `nsenter` and others
  * `vim`
  * `wget`
  * `wireshark`, for `tshark`
  * `xfsprogs`

This resolves #2156 to a great extent. However, documentation on how to
use the image is still lacking, as well as some of the tools referred to
in the ticket, for which no upstream packages are available.

See: #2156
See: #2352
NicolasT added a commit that referenced this issue Apr 6, 2020
This patch extends the `metalk8s-utils` `Dockerfile` to add a bunch of
packages (and make some related changes):

- The Kubernetes and SaltStack repositories are enabled in the image
- No longer override the entrypoint
- Fail when a given package (name) doesn't exist
- Add the following packages to the image:

  * `bash-completion`
  * `bash-completion-extras`
  * `bzip2`
  * `conntrack-tools`
  * `e2fsprogs`
  * `ebtables`
  * `etcd`, for `etcdctl`
  * `ethtool`
  * `gdb`
  * `git`
  * `htop`
  * `httpd-tools`, for `htpasswd` (see #2352)
  * `iotop`
  * `iperf3` (next to `iperf` which was already installed)
  * `ipset`
  * `iptables`
  * `ipvsadm`
  * `jnettop`
  * `jq`
  * `kubectl` (pinned to the version of Kubernetes this MetalK8s release
    ships with)
  * `less`
  * `lsof`
  * `ltrace`
  * `lvm2`
  * `net-tools`
  * `nethogs`
  * `nmap`
  * `nmap-ncat`, for `nc`
  * `openssh-clients`
  * `openssh-server`
  * `openssl`, for its CLI interface
  * `parted`
  * `perf`
  * `rsync`
  * `salt-master`, for `salt` and `salt-run`
  * `salt-minion`, for `salt-call`
  * `strace`
  * `sysstat`
  * `tcpdump`
  * `util-linux`, for `nsenter` and others
  * `vim`
  * `wget`
  * `wireshark`, for `tshark`
  * `xfsprogs`

This resolves #2156 to a great extent. However, documentation on how to
use the image is still lacking, as well as some of the tools referred to
in the ticket, for which no upstream packages are available.

See: #2156
See: #2352
NicolasT added a commit that referenced this issue Apr 6, 2020
This patch extends the `metalk8s-utils` `Dockerfile` to add a bunch of
packages (and make some related changes):

- The Kubernetes and SaltStack repositories are enabled in the image
- No longer override the entrypoint
- Fail when a given package (name) doesn't exist
- Add the following packages to the image:

  * `bash-completion`
  * `bash-completion-extras`
  * `bzip2`
  * `conntrack-tools`
  * `cri-tools`, for `crictl`
  * `e2fsprogs`
  * `ebtables`
  * `etcd`, for `etcdctl`
  * `ethtool`
  * `gdb`
  * `git`
  * `htop`
  * `httpd-tools`, for `htpasswd` (see #2352)
  * `iotop`
  * `iperf3` (next to `iperf` which was already installed)
  * `ipset`
  * `iptables`
  * `ipvsadm`
  * `jnettop`
  * `jq`
  * `kubectl` (pinned to the version of Kubernetes this MetalK8s release
    ships with)
  * `less`
  * `lsof`
  * `ltrace`
  * `lvm2`
  * `net-tools`
  * `nethogs`
  * `nmap`
  * `nmap-ncat`, for `nc`
  * `openssh-clients`
  * `openssh-server`
  * `openssl`, for its CLI interface
  * `parted`
  * `perf`
  * `rsync`
  * `salt-master`, for `salt` and `salt-run`
  * `salt-minion`, for `salt-call`
  * `strace`
  * `sysstat`
  * `tcpdump`
  * `util-linux`, for `nsenter` and others
  * `vim`
  * `wget`
  * `wireshark`, for `tshark`
  * `xfsprogs`

This resolves #2156 to a great extent. However, documentation on how to
use the image is still lacking, as well as some of the tools referred to
in the ticket, for which no upstream packages are available.

See: #2156
See: #2352
@bert-e bert-e closed this as completed in 1f86f6a Apr 7, 2020
@NicolasT
Copy link
Contributor Author

NicolasT commented Apr 7, 2020

Re-opening since not everything listed here in included through #2374.

@NicolasT NicolasT reopened this Apr 7, 2020
Ebaneck pushed a commit that referenced this issue Apr 8, 2020
This patch extends the `metalk8s-utils` `Dockerfile` to add a bunch of
packages (and make some related changes):

- The Kubernetes and SaltStack repositories are enabled in the image
- No longer override the entrypoint
- Fail when a given package (name) doesn't exist
- Add the following packages to the image:

  * `bash-completion`
  * `bash-completion-extras`
  * `bzip2`
  * `conntrack-tools`
  * `cri-tools`, for `crictl`
  * `e2fsprogs`
  * `ebtables`
  * `etcd`, for `etcdctl`
  * `ethtool`
  * `gdb`
  * `git`
  * `htop`
  * `httpd-tools`, for `htpasswd` (see #2352)
  * `iotop`
  * `iperf3` (next to `iperf` which was already installed)
  * `ipset`
  * `iptables`
  * `ipvsadm`
  * `jnettop`
  * `jq`
  * `kubectl` (pinned to the version of Kubernetes this MetalK8s release
    ships with)
  * `less`
  * `lsof`
  * `ltrace`
  * `lvm2`
  * `net-tools`
  * `nethogs`
  * `nmap`
  * `nmap-ncat`, for `nc`
  * `openssh-clients`
  * `openssh-server`
  * `openssl`, for its CLI interface
  * `parted`
  * `perf`
  * `rsync`
  * `salt-master`, for `salt` and `salt-run`
  * `salt-minion`, for `salt-call`
  * `strace`
  * `sysstat`
  * `tcpdump`
  * `util-linux`, for `nsenter` and others
  * `vim`
  * `wget`
  * `wireshark`, for `tshark`
  * `xfsprogs`

This resolves #2156 to a great extent. However, documentation on how to
use the image is still lacking, as well as some of the tools referred to
in the ticket, for which no upstream packages are available.

See: #2156
See: #2352
@NicolasT
Copy link
Contributor Author

NicolasT commented Mar 6, 2021

One to add, since the image is based on CentOS 7: gdisk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:operations Operations-related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants