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

compatibility with coreutils on apple silicon #12329

Closed
etenzy opened this issue Nov 17, 2021 · 5 comments · Fixed by #12330
Closed

compatibility with coreutils on apple silicon #12329

etenzy opened this issue Nov 17, 2021 · 5 comments · Fixed by #12330
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@etenzy
Copy link
Contributor

etenzy commented Nov 17, 2021

/kind bug

Description

podman machine does not create/start when coreutils are installed on mac

Steps to reproduce the issue:

  1. brew install coreutils

  2. podman machine init

Describe the results you received:

Error: exit status 1

Describe the results you expected:
podman machine to be initialized

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman --version:

podman version 3.4.2

Output of podman info --debug:

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman. failed to create sshClient: Connection to bastion host (ssh://core@localhost:54880/run/user/1000/podman/podman.sock) failed.: dial tcp [::1]:54880: connect: connection refused

Package info brew list:

ack			clusterctl		gh			icu4c			libcbor			libssh2			mpdecimal		perl			screenresolution	vde
ansible			composer		ghostscript		imagemagick		libde265		libtasn1		mycli			php			shared-mime-info	vim
aom			coreutils		giflib			imath			libevent		libtiff			ncurses			[email protected]			six			watch
apr			cowsay			git			iproute2mac		libffi			libtool			neofetch		pinentry		snappy			webp
apr-util		curl			git-lfs			jbig2dec		libfido2		libunistring		nettle			pixman			sops			wget
argon2			direnv			git-sizer		jpeg			libgcrypt		libusb			no-more-secrets		pkg-config		speedtest-cli		x265
asciinema		docbook			glab			jpeg-xl			libgpg-error		libuv			node			podman			sqlite			xmlto
aspell			docbook-xsl		glib			jq			libheif			libvmaf			npth			popeye			starship		xz
autoconf		docker-clean		gmp			jsonpp			libidn			libyaml			oniguruma		prettyping		subversion		yarn
awscli			figlet			gnu-getopt		k9s			libidn2			libzip			openexr			progress		telnet			yh
azure-cli		flux			gnupg			kind			libksba			little-cms2		openjdk			pv			terraform		youtube-dl
bdw-gc			fontconfig		gnutls			krb5			liblqr			lolcat			openjpeg		python-tabulate		the_silver_searcher	zplug
berkeley-db		fortune			go			kubectx			libnghttp2		lua			openldap		[email protected]		tidy-html5		zsh
bfg			freetds			grep			kubelogin		libomp			lz4			openssh			[email protected]		tmux			zsh-autosuggestions
brew-gem		freetype		guile			kubernetes-cli		libpng			lzo			[email protected]		qemu			trivy			zsh-completions
brew-pip		gd			hcloud			kubeseal		libpq			m4			openstackclient		readline		unbound			zsh-syntax-highlighting
brotli			gdbm			helm			ldns			libslirp		mackup			p11-kit			rtmpdump		unixodbc		zstd
c-ares			gem-colorls		htop			less			libsodium		mas			pcre			ruby			up
ca-certificates		gettext			httpie			libassuan		libssh			minikube		pcre2			screen			utf8proc

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

MacBook Pro (14-inch, 2021)
Chip: Apple M1 Pro
Memory: 32 GB
macOS Monterey: 12.0.1 (21A559)

Tested Workaround:

PATH=/bin:$PATH podman machine init

Possible causes:

func (v *MachineVM) prepare() error {
ovmfDir := getOvmfDir(v.ImagePath, v.Name)
cmd := []string{"dd", "if=/dev/zero", "conv=sync", "bs=1m", "count=64", "of=" + ovmfDir}
return exec.Command(cmd[0], cmd[1:]...).Run()
}

@baude
Copy link
Member

baude commented Nov 17, 2021

are you saying that podman machine failed to init? or subsequent podman commands do not work.

@etenzy
Copy link
Contributor Author

etenzy commented Nov 17, 2021

podman machine fails to init because it calls dd on Apple silicon.

if coreutils are installed dd is linked to a GNU version of dd, which only accepts uppercase units which results in an error.

imho the solution would be to call the system dd directly via /bin/dd (see my pr)

@afbjorklund
Copy link
Contributor

Installing GNU tools without the "g" prefix breaks all kinds of stuff

etenzy added a commit to etenzy/podman that referenced this issue Nov 17, 2021
Fixes containers#12329

[NO NEW TESTS NEEDED] podman machine

Signed-off-by: Michael Rödel <[email protected]>
@etenzy
Copy link
Contributor Author

etenzy commented Nov 17, 2021

Installing GNU tools without the "g" prefix breaks all kinds of stuff

right, that's a thing about how brew deals with coreutils...
so i thought we could use the system's dd exclusively, because /bin/dd shouldn't go anywhere

@rhatdan
Copy link
Member

rhatdan commented Nov 18, 2021

Makes sense to me.

mheon pushed a commit to mheon/libpod that referenced this issue Dec 6, 2021
Fixes containers#12329

[NO NEW TESTS NEEDED] podman machine

Signed-off-by: Michael Rödel <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants