#60 fedora-toolbox create doesn't work anymore: podman cannot see image created by buildah?
Closed 5 years ago Opened 5 years ago by edwintorok.

fedora-toolbox create worked once after I installed silverblue.
I did some rpm-ostree upgrades, installed some more packages, ran some containers, changed my shell, etc.
Then I deleted then toolbox containers and tried to run fedora-toolbox create to create me a fresh one, but it failed:

bash -x /usr/bin/fedora-toolbox -v create
+ unset _mlshdbg
+ '[' 0 = 1 ']'
+ export MODULES_RUN_QUARANTINE=LD_LIBRARY_PATH
+ MODULES_RUN_QUARANTINE=LD_LIBRARY_PATH
+ unset _mlre _mlIFS
+ '[' -n x ']'
+ _mlIFS='  
'
+ IFS=' '
+ for _mlv in ${MODULES_RUN_QUARANTINE:-}
+ '[' LD_LIBRARY_PATH = LD_LIBRARY_PATH -a LD_LIBRARY_PATH = LD_LIBRARY_PATH ']'
++ eval 'echo ${LD_LIBRARY_PATH+x}'
+++ echo
+ '[' -n '' ']'
+ _mlrv=MODULES_RUNENV_LD_LIBRARY_PATH
++ eval 'echo ${MODULES_RUNENV_LD_LIBRARY_PATH:-}'
+++ echo
+ _mlre='LD_LIBRARY_PATH='\'''\'' '
+ '[' -n 'LD_LIBRARY_PATH='\'''\'' ' ']'
+ _mlre='eval LD_LIBRARY_PATH='\'''\'' '
++ eval 'LD_LIBRARY_PATH='\'''\''' /usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash autoinit
+++ LD_LIBRARY_PATH=
+++ /usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash autoinit
+ _mlcode='_module_raw() {
   unset _mlshdbg;
   if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '\''1'\'' ]; then
      case "$-" in
         *v*x*) set +vx; _mlshdbg='\''vx'\'' ;;
         *v*) set +v; _mlshdbg='\''v'\'' ;;
         *x*) set +x; _mlshdbg='\''x'\'' ;;
         *) _mlshdbg='\'''\'' ;;
      esac;
   fi;
   unset _mlre _mlIFS;
   if [ -n "${IFS+x}" ]; then
      _mlIFS=$IFS;
   fi;
   IFS='\'' '\'';
   for _mlv in ${MODULES_RUN_QUARANTINE:-}; do
      if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" ]; then
         if [ -n "`eval '\''echo ${'\''$_mlv'\''+x}'\''`" ]; then
            _mlre="${_mlre:-}${_mlv}_modquar='\''`eval '\''echo ${'\''$_mlv'\''}'\''`'\'' ";
         fi;
         _mlrv="MODULES_RUNENV_${_mlv}";
         _mlre="${_mlre:-}${_mlv}='\''`eval '\''echo ${'\''$_mlrv'\'':-}'\''`'\'' ";
      fi;
   done;
   if [ -n "${_mlre:-}" ]; then
      eval `eval ${_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash '\''"$@"'\''`;
   else
      eval `/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash "$@"`;
   fi;
   _mlstatus=$?;
   if [ -n "${_mlIFS+x}" ]; then
      IFS=$_mlIFS;
   else
      unset IFS;
   fi;
   unset _mlre _mlv _mlrv _mlIFS;
   if [ -n "${_mlshdbg:-}" ]; then
      set -$_mlshdbg;
   fi;
   unset _mlshdbg;
   return $_mlstatus;
};
module() { _module_raw "$@" 2>&1; };
MODULES_CMD=/usr/share/Modules/libexec/modulecmd.tcl; export MODULES_CMD;
MODULESHOME=/usr/share/Modules; export MODULESHOME;
test 0;'
+ _mlret=0
+ '[' -n x ']'
+ IFS='     
'
+ unset _mlIFS
+ unset _mlre _mlv _mlrv
+ '[' 0 -eq 0 ']'
+ eval '_module_raw() {
   unset _mlshdbg;
   if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '\''1'\'' ]; then
      case "$-" in
         *v*x*) set +vx; _mlshdbg='\''vx'\'' ;;
         *v*) set +v; _mlshdbg='\''v'\'' ;;
         *x*) set +x; _mlshdbg='\''x'\'' ;;
         *) _mlshdbg='\'''\'' ;;
      esac;
   fi;
   unset _mlre _mlIFS;
   if [ -n "${IFS+x}" ]; then
      _mlIFS=$IFS;
   fi;
   IFS='\'' '\'';
   for _mlv in ${MODULES_RUN_QUARANTINE:-}; do
      if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" ]; then
         if [ -n "`eval '\''echo ${'\''$_mlv'\''+x}'\''`" ]; then
            _mlre="${_mlre:-}${_mlv}_modquar='\''`eval '\''echo ${'\''$_mlv'\''}'\''`'\'' ";
         fi;
         _mlrv="MODULES_RUNENV_${_mlv}";
         _mlre="${_mlre:-}${_mlv}='\''`eval '\''echo ${'\''$_mlrv'\'':-}'\''`'\'' ";
      fi;
   done;
   if [ -n "${_mlre:-}" ]; then
      eval `eval ${_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash '\''"$@"'\''`;
   else
      eval `/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash "$@"`;
   fi;
   _mlstatus=$?;
   if [ -n "${_mlIFS+x}" ]; then
      IFS=$_mlIFS;
   else
      unset IFS;
   fi;
   unset _mlre _mlv _mlrv _mlIFS;
   if [ -n "${_mlshdbg:-}" ]; then
      set -$_mlshdbg;
   fi;
   unset _mlshdbg;
   return $_mlstatus;
};
module() { _module_raw "$@" 2>&1; };
MODULES_CMD=/usr/share/Modules/libexec/modulecmd.tcl; export MODULES_CMD;
MODULESHOME=/usr/share/Modules; export MODULESHOME;
test 0;'
++ MODULES_CMD=/usr/share/Modules/libexec/modulecmd.tcl
++ export MODULES_CMD
++ MODULESHOME=/usr/share/Modules
++ export MODULESHOME
++ test 0
+ '[' 0 = 1 ']'
+ '[' -t 2 ']'
+ export -f _module_raw
+ export -f module
+ export -f switchml
+ ENV=/usr/share/Modules/init/profile.sh
+ export ENV
+ BASH_ENV=/usr/share/Modules/init/bash
+ export BASH_ENV
+ '[' 4 -ge 3 ']'
+ [[ hxB =~ i ]]
+ [[ ! :/home/edwin/.local/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/edwin/bin: =~ :/usr/share/Modules/bin: ]]
++ manpath
+ manpath=/usr/local/man:/usr/share/man
+ [[ ! :/usr/local/man:/usr/share/man: =~ :/usr/share/man: ]]
+ unset _mlcode _mlret
+ '[' -n '' ']'
+ source /etc/os-release
++ NAME=Fedora
++ VERSION='29.20181210.0 (Workstation Edition)'
++ ID=fedora
++ VERSION_ID=29
++ PLATFORM_ID=platform:f29
++ PRETTY_NAME='Fedora 29.20181210.0 (Workstation Edition)'
++ ANSI_COLOR='0;34'
++ LOGO=fedora-logo
++ CPE_NAME=cpe:/o:fedoraproject:fedora:29
++ HOME_URL=https://fedoraproject.org/
++ DOCUMENTATION_URL=https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/
++ SUPPORT_URL=https://fedoraproject.org/wiki/Communicating_and_getting_help
++ BUG_REPORT_URL=https://bugzilla.redhat.com/
++ REDHAT_BUGZILLA_PRODUCT=Fedora
++ REDHAT_BUGZILLA_PRODUCT_VERSION=29
++ REDHAT_SUPPORT_PRODUCT=Fedora
++ REDHAT_SUPPORT_PRODUCT_VERSION=29
++ PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy
++ VARIANT='Workstation Edition'
++ VARIANT_ID=workstation
++ OSTREE_VERSION=29.20181210.0
+ release=29
+ prefix_sudo=
+ registry=registry.fedoraproject.org
+ registry_candidate=candidate-registry.fedoraproject.org
+ toolbox_prompt='🔹[\u@\h \W]\$ '
+ exec
+ [[ -v = -* ]]
+ case $1 in
+ exec
+ shift
+ [[ create = -* ]]
+ fgc=f29
+ '[' '' = '' ']'
+ toolbox_container=fedora-toolbox-edwin:29
+ base_toolbox_image=fedora-toolbox:29
+ toolbox_image=fedora-toolbox-edwin:29
+ '[' create = '' ']'
+ op=create
+ shift
+ case $op in
+ [[ '' = -* ]]
+ exit_if_extra_operand
+ '[' '' '!=' '' ']'
+ create
+ dbus_system_bus_address=unix:path=/var/run/dbus/system_bus_socket
+ tmpfs_size=67108864
++ uuidgen --time
+ working_container_name=fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4
+ buildah inspect --type image fedora-toolbox-edwin:29
error reading image "fedora-toolbox-edwin:29": error reading image: error locating image "fedora-toolbox-edwin:29" for importing settings: error locating image with name "fedora-toolbox-edwin:29": image not known
ERRO[0000] exit status 1                                
+ buildah from --name fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4 localhost/fedora-toolbox:29
Error determining manifest MIME type for docker://localhost/fedora-toolbox:29: pinging docker registry returned: Get https://localhost/v2/: dial tcp [::1]:443: connect: connection refused
ERRO[0000] exit status 1                                
+ buildah from --name fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4 registry.fedoraproject.org/f29/fedora-toolbox:29
+ buildah run fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4 -- useradd --no-create-home --shell /bin/zsh --uid 1000 --groups wheel edwin
+ buildah run fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4 -- passwd -d edwin
passwd: Note: deleting a password also unlocks the password.
+ buildah run fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4 -- passwd -d root
passwd: Note: deleting a password also unlocks the password.
+ buildah config --volume /home/edwin fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4
+ buildah config --volume /run/user/1000 fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4
+ '[' '' '!=' '' ']'
++ echo unix:path=/var/run/dbus/system_bus_socket
++ cut --delimiter = --fields 2
+ dbus_system_bus_path=/var/run/dbus/system_bus_socket
++ readlink --canonicalize /var/run/dbus/system_bus_socket
+ dbus_system_bus_path=/run/dbus/system_bus_socket
+ buildah config --volume /run/dbus/system_bus_socket fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4
+ buildah config --volume /dev/dri fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4
+ buildah config --user edwin fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4
+ buildah config --workingdir /home/edwin fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4
+ buildah commit --rm fedora-toolbox-working-container-1798055a-fccd-11e8-8957-e03f49a06ed4 fedora-toolbox-edwin:29
Getting image source signatures
Skipping fetch of repeat blob sha256:8080f9aa6262000ad12d3d7e55331d275d412faa730b75c41bbf444b4ce056e9
Skipping fetch of repeat blob sha256:d399ea65472cbad41d640ec2a09724c2f11ac7fa52636b6cec6905e8fa490865
Copying blob sha256:564596544eff1eb68e782c24353d929c377718a5577eb3c84af8541ddf51e46a
 1.93 KiB / 1.93 KiB [======================================================] 0s
Copying config sha256:de7b0c518edb5d339160bb63ccd13a7b1dea3af3a969663bdc2b089969aea427
 1.44 KiB / 1.44 KiB [======================================================] 0s
Writing manifest to image destination
Storing signatures
+ podman inspect --type container fedora-toolbox-edwin:29
error looking up container "fedora-toolbox-edwin:29": no container with name or ID fedora-toolbox-edwin:29 found: no such container
++ awk '( $1 == "MemTotal:" ) { print $2 }' /proc/meminfo
+ total_ram=32898552
+ is_integer 32898552
+ '[' 32898552 '!=' '' ']'
+ '[' 32898552 -eq 32898552 ']'
+ return 0
+ tmpfs_size=16844058624
+ max_uid_count=65536
+ max_minus_uid=64536
+ uid_plus_one=1001
+ podman create --group-add wheel --hostname toolbox --interactive --name fedora-toolbox-edwin:29 --network host --privileged --security-opt label=disable --tmpfs /dev/shm:size=16844058624 --tty --uidmap 1000:0:1 --uidmap 0:1:1000 --uidmap 1001:1001:64536 --volume /home/edwin:/home/edwin --volume /run/user/1000:/run/user/1000 --volume /run/dbus/system_bus_socket:/run/dbus/system_bus_socket --volume /dev/dri:/dev/dri fedora-toolbox-edwin:29 /bin/sh
Trying to pull docker.io/fedora-toolbox-edwin:29...Failed
Trying to pull registry.fedoraproject.org/fedora-toolbox-edwin:29...Failed
Trying to pull quay.io/fedora-toolbox-edwin:29...Failed
Trying to pull registry.access.redhat.com/fedora-toolbox-edwin:29...Failed
Trying to pull registry.centos.org/fedora-toolbox-edwin:29...Failed
unable to pull fedora-toolbox-edwin:29: 5 errors occurred:

* Error determining manifest MIME type for docker://fedora-toolbox-edwin:29: Error reading manifest 29 in docker.io/library/fedora-toolbox-edwin: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

* Error determining manifest MIME type for docker://registry.fedoraproject.org/fedora-toolbox-edwin:29: Error reading manifest 29 in registry.fedoraproject.org/fedora-toolbox-edwin: manifest unknown: manifest unknown
* Error determining manifest MIME type for docker://quay.io/fedora-toolbox-edwin:29: Error reading manifest 29 in quay.io/fedora-toolbox-edwin: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>\n"
* Error determining manifest MIME type for docker://registry.access.redhat.com/fedora-toolbox-edwin:29: Error reading manifest 29 in registry.access.redhat.com/fedora-toolbox-edwin: unknown: Not Found
* Error determining manifest MIME type for docker://registry.centos.org/fedora-toolbox-edwin:29: Error reading manifest 29 in registry.centos.org/fedora-toolbox-edwin: manifest unknown: manifest unknown
+ echo '/usr/bin/fedora-toolbox: failed to create container fedora-toolbox-edwin:29'
/usr/bin/fedora-toolbox: failed to create container fedora-toolbox-edwin:29
+ exit 1
+ exit

This is the state after running the above script:

$ buildah images
IMAGE NAME                                               IMAGE TAG            IMAGE ID             CREATED AT             SIZE
docker.io/library/fedora                                 29                   8c568f104326         Nov 7, 2018 00:23      275 MB
registry.fedoraproject.org/f29/fedora-toolbox            29                   032b427fbbf7         Sep 27, 2018 11:47     578 MB
localhost/fedora-toolbox-edwin                           29                   de7b0c518edb         Dec 10, 2018 22:44     578 MB

$ podman images
REPOSITORY                                      TAG   IMAGE ID       CREATED        SIZE
docker.io/library/fedora                        29    8c568f104326   4 weeks ago    275MB
docker.io/library/fedora                        28    f0b9fdd4254d   4 weeks ago    270MB
registry.fedoraproject.org/f29/fedora-toolbox   29    032b427fbbf7   2 months ago   578MB

$ podman ps -a
$ buildah containers -a
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME

$ rpm-ostree status
State: idle
Warning: failed to query journal: address not available
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 2h 50min ago
Deployments:
● ostree://fedora-workstation:fedora/29/x86_64/silverblue
                   Version: 29.20181210.0 (2018-12-10T01:01:33Z)
                BaseCommit: f7108ac43e6b618fe9470b213ce9391e5d2489866e4e1242a0af6bf12f4b7c8b
              GPGSignature: Valid signature by 5A03B4DD8254ECA02FDA1637A20AA56B429476B4
           LayeredPackages: '[fedora-toolbox]' ansible bcc-tools chromium evolution fedora-toolbox kernel-tools latencytop mozilla-ublock-origin neovim perf ripgrep stow system-storage-manager tig vim yum-utils
                            zsh

  ostree://fedora-workstation:fedora/29/x86_64/silverblue
                   Version: 29.20181209.0 (2018-12-09T01:05:12Z)
                BaseCommit: ab52579b9965a871e3db1987c6e0a256fecaeb03a3d72df1a8b76baaf2406d8d
              GPGSignature: Valid signature by 5A03B4DD8254ECA02FDA1637A20AA56B429476B4
           LayeredPackages: '[fedora-toolbox]' ansible bcc-tools chromium evolution fedora-toolbox kernel-tools latencytop mozilla-ublock-origin neovim perf ripgrep stow system-storage-manager tig vim yum-utils
                            zsh

FWIW I've seen similar issues when I tried using buildah and podman manually, however podman build worked on my own containers.

I think this is the same problem as https://github.com/containers/buildah/issues/1224.
I probably had the configuration generated by an older version of podman, and when I updated then podman and buildah couldn't both read it.
Wiping that file, and letting podman recreate it fixed this problem.

Metadata Update from @edwintorok:
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata