by shigemk2

当面は技術的なことしか書かない

amazonlinuxのDockerイメージでyum updateが失敗する

聞いてみるものだね。ちなみに、解決してるからもう同じエラー出ないよ。

amazonlinuxのDockerイメージでyum updateを実行するとこんなエラーに見舞われ、yum updateが実行できなかった。 filesystemパッケージのupdateに失敗するらしい。ググっても数年前のバグトラック的なチケットしか出てこなかった。

Updating : filesystem-2.4.30-3.9.amzn1.x86_64 Error unpacking rpm package filesystem-2.4.30-3.9.amzn1.x86_64
error: unpacking of archive failed on file /sys: cpio: chmod
error: filesystem-2.4.30-3.9.amzn1.x86_64: install failed

以下手順。育てたイメージじゃなくて素のイメージから立ち上げたコンテナでyum updateするだけでもエラーが出るんだから、これはもうイメージの問題でしょう。ちなみにamazonlinux:latestだとエラーにならなかったから、ますますfilesystemが悪さをしているんじゃないかって読めた。

$ docker pull amazonlinux:2017.03 # もしくは docker pull amazonlinux:2018.03
$ docker run -it amazonlinux:2017.03 /bin/bash
$ yum update

昨日の昼頃のfilesystemの情報。3.9.amzn1が出たけど、これのアップデートに失敗してる。

bash-4.2# yum info filesystem
Installed Packages
Name        : filesystem
Arch        : x86_64
Version     : 2.4.30
Release     : 3.8.amzn1
Size        : 0.0
Repo        : installed
Summary     : The basic directory layout for a Linux system
URL         : https://fedorahosted.org/filesystem
License     : Public Domain
Description : The filesystem package is one of the basic packages that is installed
            : on a Linux system. Filesystem contains the basic directory layout
            : for a Linux operating system, including the correct permissions for
            : the directories.

Available Packages
Name        : filesystem
Arch        : x86_64
Version     : 2.4.30
Release     : 3.9.amzn1
Size        : 1.0 M
Repo        : amzn-updates/latest
Summary     : The basic directory layout for a Linux system
URL         : https://fedorahosted.org/filesystem
License     : Public Domain
Description : The filesystem package is one of the basic packages that is installed
            : on a Linux system. Filesystem contains the basic directory layout
            : for a Linux operating system, including the correct permissions for
            : the directories.

で、どこに聞こうか迷ったけど、AWSのフォーラムに投げてみることにした。

https://forums.aws.amazon.com/thread.jspa?messageID=926773󢐵

翌日くらいにはAWSから返答が来ていた。ちなみに、他の人も同じようなエラーに見舞われていたらしい。

Hi, thank you for reporting this issue. We've rolled back the filesystem package that caused the issue and we apologize for the error. Systems may need to run "yum clean all" to continue to use repositories over the next several hours as we work on publishing a new version without the filesystem package. Thank you for using Amazon Linux!

ロールバックしたから今はyum updateできるよ!ってことだった。 ありがとうAWS。