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

Enabled host management features - blkid: executable file not found #427

Open
agafonovdmitry opened this issue Feb 16, 2023 · 4 comments
Open

Comments

@agafonovdmitry
Copy link

Installed on Debian 11 stock docker.io with enabled swarm mode.

Enabled host management features in Setup.

See this trying browse swarm node:
WARNING: failed to read disk partuuid of /dev/sda1 : exec: "blkid": executable file not found in $PATH
WARNING: failed to read disk partuuid of /dev/sda14 : exec: "blkid": executable file not found in $PATH
WARNING: failed to read disk partuuid of /dev/sda15 : exec: "blkid": executable file not found in $PATH

blkid is installed on host and its root fs is mounted as /host for agent service.

@tamarahenson
Copy link

@agafonovdmitry

Can you post your install command?

Thanks!

@agafonovdmitry
Copy link
Author

That was Hetzner cloud VM from Debian 11 image. Cannot say anything special...

  • Installed docker.io package as normal, enabled swarm mode (for single node) as per manual.
  • Installed portainer stack as per instructions on site for particular environment.
  • Everything went okay and totally normal as usual. Portainer is great at this: just works!

I have noticed new "host management" feature and enabled it. Some information did not shown, I suppose, and those messages appeared in agent logs. Agent was configured for host management as needed and I could run blkid by hands.

Setup is in production, so I cannot do further testing around it, sorry.

@knutster
Copy link

Same issue on a vanilla ubuntu 22.04 server with docker installed via the official guide. Seeing the behaviour on standalone docker and swarm instances.

@gs4711
Copy link

gs4711 commented Dec 14, 2024

Typical case, where the included libraries seems to have some contraints (which aren't recognized by the developer using them). The library https://github.com/jaypipes/ghw?tab=readme-ov-file#block-storage used here, clearly states:

NOTE: ghw looks in the udev runtime database for some information. If you are using ghw in a container, remember to bind mount /dev/disk and /run into your container, otherwise ghw won't be able to query the udev DB or sysfs paths for information.

The go script does the following on system level:

2711985 execve("/sbin/blkid", ["blkid", "-s", "PARTUUID", "/dev/sda1"], 0xc000218000 /* 16 vars */) = -1 ENOENT (No such file or directory)

Therefore, the container has to be expanded by, i.e.

FROM alpine:latestAS builder
RUN apk add --no-cache util-linux
FROM portainer/agent:latest
COPY --from=builder /sbin/blkid                         /sbin/blkid
COPY --from=builder /usr/lib/libblkid.so*               /usr/lib/
COPY --from=builder /usr/lib/libeconf.so*               /usr/lib/
COPY --from=builder /bin/sh                             /bin/sh
COPY --from=builder /lib                                /lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants