buildah: buildah version: strconv.ParseInt: parsing "": invalid syntax

Description

buildah version breaks scripts by exiting with $? = 1

Steps to reproduce the issue:

  1. Build from sources (22 April 2018)
  2. buildah version

Describe the results you received:

strconv.ParseInt: parsing "": invalid syntax

Describe the results you expected:

buildah version 0.16 (image-spec 1.0.0, runtime-spec 1.0.0)

Output of apt list buildah:

buildah/xenial 0.16-1~ubuntu16.04.2~ppa5 amd64

Output of buildah version:

strconv.ParseInt: parsing "": invalid syntax

Output of cat /etc/*release:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

Output of uname -a:

Linux hedge-p2-1320a 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Output of cat /etc/containers/storage.conf:

# storage.conf is the configuration file for all tools
# that share the containers/storage libraries
# See man 5 containers-storage.conf for more information

# The "container storage" table contains all of the server options.
[storage]

# Default Storage Driver
driver = "overlay"

# Temporary storage location
runroot = "/var/run/containers/storage"

# Primary read-write location of container storage
graphroot = "/var/lib/containers/storage"

[storage.options]
# AdditionalImageStores is used to pass paths to additional read-only image stores
# Must be comma separated list.
additionalimagestores = [
]

# Size is used to set a maximum size of the container image.  Only supported by
# certain container storage drivers (currently overlay, zfs, vfs, btrfs)
size = ""

# OverrideKernelCheck tells the driver to ignore kernel checks based on kernel version
override_kernel_check = "true"

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

Thanks everyone. All seems good now:

$ buildah version
Version:       1.0
Go Version:    go1.8.7
Image Spec:    1.0.0
Runtime Spec:  1.0.0
Git Commit:    fe204e4
Built:         Thu May 10 04:13:34 2018
OS/Arch:       linux/amd64

Just to thicken the plot, I finally got a chance to spin up an Ubuntu vm this morning and installed by cutting/pasting the install instructions on the https://github.com/projectatomic/buildah/blob/master/install.md and the end results were:

root@ubuntutas:~/buildah/src/github.com/projectatomic/buildah# buildah version
Version:       0.16
Go Version:    go1.8.7
Image Spec:    1.0.0
Runtime Spec:  1.0.0
Git Commit:    b16a1ea
Built:         Tue Apr 24 07:01:44 2018
OS/Arch:       linux/amd64
root@ubuntutas:~/buildah/src/github.com/projectatomic/buildah# buildah --version
buildah version 0.16 (image-spec 1.0.0, runtime-spec 1.0.0)
root@ubuntutas:~/buildah/src/github.com/projectatomic/buildah# buildah -v
buildah version 0.16 (image-spec 1.0.0, runtime-spec 1.0.0)

I’m going to see what I can do with the Makefile and/or handle the error in version.go a bit better.