canonical / ceph-containers

OCI compliant Ceph Container Images based on Ubuntu LTS
Apache License 2.0
14 stars 7 forks source link

Not able to build docker image #18

Closed eleblebici closed 1 year ago

eleblebici commented 1 year ago

When I try to build the image by running:

sudo docker build -t canonical/ceph:latest --build-arg CUSTOM_APT_REPO=ppa:peter-sabaini/ceph-test .

It fails at the 4th step because of cephfs-mirror dependencies:

[+] Building 3.9s (8/16)                                                                                                                                                                                                                                      
 => [internal] load .dockerignore                                                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 13.53kB                                                                                                                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/ubuntu:jammy                                                                                                                                                                                          0.7s
 => [ 1/13] FROM docker.io/library/ubuntu:jammy@sha256:0bced47fffa3361afa981854fcabcd4577cd43cebbb808cea2b1f33a3dd7f508                                                                                                                                  0.0s
 => [internal] load build context                                                                                                                                                                                                                        0.0s
 => => transferring context: 2.27kB                                                                                                                                                                                                                      0.0s
 => CACHED [ 2/13] RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yy --force-yes --no-install-recommends gnupg curl apt-transport-https ca-certificates                                            0.0s
 => CACHED [ 3/13] RUN if [ -n "ppa:peter-sabaini/ceph-test" ] ; then       DEBIAN_FRONTEND=noninteractive apt-get install -yy --no-install-recommends gpg-agent software-properties-common ;       DEBIAN_FRONTEND=noninteractive add-apt-repository -  0.0s
 => ERROR [ 4/13] RUN     echo "" > /etc/apt/sources.list &&     echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main"       >> /etc/apt/sources.list.d/erp.list &&     echo "deb http://archive.ubuntu.com/ubuntu/ jammy main universe mul  3.1s
------                                                                                                                                                                                                                                                        
 > [ 4/13] RUN     echo "" > /etc/apt/sources.list &&     echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main"       >> /etc/apt/sources.list.d/erp.list &&     echo "deb http://archive.ubuntu.com/ubuntu/ jammy main universe multiverse"       >> /etc/apt/sources.list.d/jammy.list &&     echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe multiverse"       >> /etc/apt/sources.list.d/jammy.list &&     DEBIAN_FRONTEND=noninteractive apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get install -yy --force-yes --no-install-recommends                ca-certificates         e2fsprogs         ceph-common          ceph-mon          ceph-osd         ceph-mds         rbd-mirror          ceph-mgr ceph-mgr-cephadm ceph-mgr-dashboard ceph-mgr-diskprediction-local ceph-mgr-k8sevents ceph-mgr-rook        ceph-grafana-dashboards         kmod         lvm2         gdisk   smartmontools   nvme-cli         radosgw         nfs-ganesha nfs-ganesha-ceph         ceph-iscsi targetcli-fb         attr ceph-fuse rbd-nbd cephfs-mirror     &&     INITIAL_SIZE="$(bash -c 'sz="$(du -sm --exclude=/proc /)" ; echo "${sz%*/}"')" &&     echo 'Postinstall cleanup' &&      ( echo "apt clean" && DEBIAN_FRONTEND=noninteractive apt-get clean &&       echo "apt autoclean" && DEBIAN_FRONTEND=noninteractive apt-get autoclean ) ||       ( retval=$? && cat /var/log/apt/history.log && exit $retval ) &&     echo 'remove unneeded apt, deb, dpkg data' &&       rm -rf /var/lib/apt/lists/*              /var/cache/debconf/*              /var/log/apt/              /var/log/dpkg.log              /tmp/* &&     /bin/true && sed -i -e 's/udev_rules = 1/udev_rules = 0/' -e 's/udev_sync = 1/udev_sync = 0/' -e 's/obtain_device_list_from_udev = 1/obtain_device_list_from_udev = 0/' /etc/lvm/lvm.conf && grep -sqo "udev_sync = 0" /etc/lvm/lvm.conf && grep -sqo "udev_rules = 0" /etc/lvm/lvm.conf && grep -sqo "obtain_device_list_from_udev = 0" /etc/lvm/lvm.conf && mkdir -p /var/run/ceph /var/run/ganesha &&     rm -rf         /etc/{selinux,systemd,udev}         /lib/{lsb,udev}         /tmp/*         /usr/lib{,64}/{locale,systemd,udev,dracut}         /usr/share/{doc,info,locale,man}         /usr/share/{bash-completion,pkgconfig/bash-completion.pc}         /var/log/*         /var/tmp/* &&     find  / -xdev -name "*.pyc" -o -name "*.pyo" -exec rm -f {} \; &&     if [ -f /usr/bin/ceph-dencoder ]; then gzip -9 /usr/bin/ceph-dencoder; fi &&     rm -f /usr/lib/ceph/mgr/dashboard/static/AdminLTE-*/plugins/datatables/extensions/TableTools/images/psd/* &&     find /var/log/ -type f -exec truncate -s 0 {} \; &&     FINAL_SIZE="$(bash -c 'sz="$(du -sm --exclude=/proc /)" ; echo "${sz%*/}"')" &&     REMOVED_SIZE=$((INITIAL_SIZE - FINAL_SIZE)) &&     echo "Cleaning process removed ${REMOVED_SIZE}MB" &&     echo "Dropped container size from ${INITIAL_SIZE}MB to ${FINAL_SIZE}MB" &&     apt-cache show         ca-certificates         e2fsprogs         ceph-common          ceph-mon          ceph-osd         ceph-mds         rbd-mirror          ceph-mgr ceph-mgr-cephadm ceph-mgr-dashboard ceph-mgr-diskprediction-local ceph-mgr-k8sevents ceph-mgr-rook        ceph-grafana-dashboards         kmod         lvm2         gdisk  smartmontools   nvme-cli         radosgw         nfs-ganesha nfs-ganesha-ceph         ceph-iscsi targetcli-fb         attr ceph-fuse rbd-nbd          && echo 'Packages verified successfully':
#0 0.743 Hit:1 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
#0 0.907 Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
#0 1.082 Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
#0 1.771 Hit:4 https://ppa.launchpadcontent.net/peter-sabaini/ceph-test/ubuntu jammy InRelease
#0 1.837 Reading package lists...
#0 2.308 Reading package lists...
#0 2.806 Building dependency tree...
#0 2.926 Reading state information...
#0 2.987 ca-certificates is already the newest version (20230311ubuntu0.22.04.1).
#0 2.987 e2fsprogs is already the newest version (1.46.5-2ubuntu1.1).
#0 2.987 Some packages could not be installed. This may mean that you have
#0 2.987 requested an impossible situation or if you are using the unstable
#0 2.987 distribution that some required packages have not yet been created
#0 2.987 or been moved out of Incoming.
#0 2.987 The following information may help to resolve the situation:
#0 2.987 
#0 2.987 The following packages have unmet dependencies:
#0 3.028  cephfs-mirror : Depends: ceph-common (= 17.2.5-0ubuntu0.22.04.2rookfix1) but 17.2.5-0ubuntu0.22.04.3 is to be installed
#0 3.028                  Depends: librados2 (= 17.2.5-0ubuntu0.22.04.2rookfix1) but 17.2.5-0ubuntu0.22.04.3 is to be installed
#0 3.028                  Depends: libcephfs2 (= 17.2.5-0ubuntu0.22.04.2rookfix1) but 17.2.5-0ubuntu0.22.04.3 is to be installed
#0 3.032 W: --force-yes is deprecated, use one of the options starting with --allow instead.
#0 3.032 E: Unable to correct problems, you have held broken packages.
UtkarshBhatthere commented 1 year ago

Hello @eleblebici (sorry for the delayed response), There is a known problem with ceph packaging which causes this error and is under pipeline for being fixed. If you just want to try out Ubuntu based ceph container images please use the Pre-built Image.

UtkarshBhatthere commented 1 year ago

Hello @eleblebici, with the move to Rockcraft as the OCI build tool we have now updated the image build procedure here. This makes building the container images easier so I would request you to please check it out.

Also, marking this issue as closed since we are no more using Dockerfile based build system. Please feel free to open another issue or reopen this if you come across more such issues.