Skip to content

Commit

Permalink
Merge pull request kubevirt#5806 from mlsorensen/4k-block-fix
Browse files Browse the repository at this point in the history
Generate ISO images 4k aligned for node storage with 4k blocksize
  • Loading branch information
kubevirt-bot authored Jun 16, 2021
2 parents ba6c2b9 + b599356 commit f3ed80a
Show file tree
Hide file tree
Showing 7 changed files with 236 additions and 86 deletions.
202 changes: 132 additions & 70 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -1367,30 +1367,6 @@ rpm(
],
)

rpm(
name = "file-libs-0__5.38-4.fc32.aarch64",
sha256 = "c0d6f9b0061b94531edc07f88c0367d88607b5db3494a30fa00c8ba20509d7b6",
urls = [
"https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/updates/32/Everything/aarch64/Packages/f/file-libs-5.38-4.fc32.aarch64.rpm",
"https://mirror.yandex.ru/fedora/linux/updates/32/Everything/aarch64/Packages/f/file-libs-5.38-4.fc32.aarch64.rpm",
"https://mirror.dst.ca/fedora/updates/32/Everything/aarch64/Packages/f/file-libs-5.38-4.fc32.aarch64.rpm",
"https://ewr.edge.kernel.org/fedora-buffet/fedora/linux/updates/32/Everything/aarch64/Packages/f/file-libs-5.38-4.fc32.aarch64.rpm",
"https://storage.googleapis.com/builddeps/c0d6f9b0061b94531edc07f88c0367d88607b5db3494a30fa00c8ba20509d7b6",
],
)

rpm(
name = "file-libs-0__5.38-4.fc32.x86_64",
sha256 = "9b3d457f2950fcb0170d1608151ea27f0dd7c970d2d3ff53e2a6644398a6571c",
urls = [
"https://mirror.dogado.de/fedora/linux/updates/32/Everything/x86_64/Packages/f/file-libs-5.38-4.fc32.x86_64.rpm",
"https://ftp-stud.hs-esslingen.de/pub/fedora/linux/updates/32/Everything/x86_64/Packages/f/file-libs-5.38-4.fc32.x86_64.rpm",
"https://ftp.halifax.rwth-aachen.de/fedora/linux/updates/32/Everything/x86_64/Packages/f/file-libs-5.38-4.fc32.x86_64.rpm",
"https://ftp.fau.de/fedora/linux/updates/32/Everything/x86_64/Packages/f/file-libs-5.38-4.fc32.x86_64.rpm",
"https://storage.googleapis.com/builddeps/9b3d457f2950fcb0170d1608151ea27f0dd7c970d2d3ff53e2a6644398a6571c",
],
)

rpm(
name = "filesystem-0__3.14-2.fc32.aarch64",
sha256 = "f8f3ec395d7d96c45cbd370f2376fe6266397ce091ab8fdaf884256ae8ae159f",
Expand Down Expand Up @@ -1508,29 +1484,6 @@ rpm(
],
)

rpm(
name = "genisoimage-0__1.1.11-44.fc32.aarch64",
sha256 = "de45f67968488f4102f0fffe9edb63f7d811eaa2633eb8c731d41fdf63cd02aa",
urls = [
"https://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora-projects/fedora/linux/releases/32/Everything/aarch64/os/Packages/g/genisoimage-1.1.11-44.fc32.aarch64.rpm",
"https://nrt.edge.kernel.org/fedora-buffet/fedora/linux/releases/32/Everything/aarch64/os/Packages/g/genisoimage-1.1.11-44.fc32.aarch64.rpm",
"https://mirrors.tuna.tsinghua.edu.cn/fedora/releases/32/Everything/aarch64/os/Packages/g/genisoimage-1.1.11-44.fc32.aarch64.rpm",
"https://storage.googleapis.com/builddeps/de45f67968488f4102f0fffe9edb63f7d811eaa2633eb8c731d41fdf63cd02aa",
],
)

rpm(
name = "genisoimage-0__1.1.11-44.fc32.x86_64",
sha256 = "b76928dc67709dbd9ab39aff18ea7bf4355ca74e5d0f969d21e3499aa05fb8e1",
urls = [
"https://ftp-stud.hs-esslingen.de/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/g/genisoimage-1.1.11-44.fc32.x86_64.rpm",
"https://ftp.wrz.de/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/g/genisoimage-1.1.11-44.fc32.x86_64.rpm",
"https://ftp.plusline.net/fedora/linux/releases/32/Everything/x86_64/os/Packages/g/genisoimage-1.1.11-44.fc32.x86_64.rpm",
"https://mirror.23media.com/fedora/linux/releases/32/Everything/x86_64/os/Packages/g/genisoimage-1.1.11-44.fc32.x86_64.rpm",
"https://storage.googleapis.com/builddeps/b76928dc67709dbd9ab39aff18ea7bf4355ca74e5d0f969d21e3499aa05fb8e1",
],
)

rpm(
name = "gettext-0__0.21-1.fc32.aarch64",
sha256 = "f9ba645870768c588621ae92fdb4c99053a4d1f12c85f71384a1c169f4feb52f",
Expand Down Expand Up @@ -2062,6 +2015,28 @@ rpm(
],
)

rpm(
name = "kde-filesystem-0__4-63.fc32.aarch64",
sha256 = "e545e03430221aed4a4eac22857a7ed1fc3c9b8b9e7df53ed46aea7af96321aa",
urls = [
"https://mirrors.rit.edu/fedora/fedora/linux/releases/32/Everything/aarch64/os/Packages/k/kde-filesystem-4-63.fc32.aarch64.rpm",
"https://ewr.edge.kernel.org/fedora-buffet/fedora/linux/releases/32/Everything/aarch64/os/Packages/k/kde-filesystem-4-63.fc32.aarch64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/releases/32/Everything/aarch64/os/Packages/k/kde-filesystem-4-63.fc32.aarch64.rpm",
"https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/32/Everything/aarch64/os/Packages/k/kde-filesystem-4-63.fc32.aarch64.rpm",
],
)

rpm(
name = "kde-filesystem-0__4-63.fc32.x86_64",
sha256 = "f8aecd3ff4786a15d434ef8366f2e35e5d70e256c7fe2d521e7923064c232402",
urls = [
"https://mirror.atl.genesisadaptive.com/fedora/linux/releases/32/Everything/x86_64/os/Packages/k/kde-filesystem-4-63.fc32.x86_64.rpm",
"https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/k/kde-filesystem-4-63.fc32.x86_64.rpm",
"https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/releases/32/Everything/x86_64/os/Packages/k/kde-filesystem-4-63.fc32.x86_64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/releases/32/Everything/x86_64/os/Packages/k/kde-filesystem-4-63.fc32.x86_64.rpm",
],
)

rpm(
name = "keyutils-libs-0__1.6.1-1.fc32.aarch64",
sha256 = "819cdb2efbfe33fc8d2592d93f77e5b4d8516efc349409c0785294f32920ec81",
Expand All @@ -2086,6 +2061,28 @@ rpm(
],
)

rpm(
name = "kf5-filesystem-0__5.75.0-1.fc32.aarch64",
sha256 = "d5f8ad9874db4e71dacec64086f3d24dcec9eda5314b0ca999ec5cac5b2678ba",
urls = [
"https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/32/Everything/aarch64/Packages/k/kf5-filesystem-5.75.0-1.fc32.aarch64.rpm",
"https://mirror.arizona.edu/fedora/linux/updates/32/Everything/aarch64/Packages/k/kf5-filesystem-5.75.0-1.fc32.aarch64.rpm",
"https://repos.eggycrew.com/fedora/linux/updates/32/Everything/aarch64/Packages/k/kf5-filesystem-5.75.0-1.fc32.aarch64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/aarch64/Packages/k/kf5-filesystem-5.75.0-1.fc32.aarch64.rpm",
],
)

rpm(
name = "kf5-filesystem-0__5.75.0-1.fc32.x86_64",
sha256 = "0876037d1952c7855c38ddbacfcdbce0c8a54c39f26beab2f6e6ea88b2c02deb",
urls = [
"https://fedora.mirror.constant.com/fedora/linux/updates/32/Everything/x86_64/Packages/k/kf5-filesystem-5.75.0-1.fc32.x86_64.rpm",
"https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/updates/32/Everything/x86_64/Packages/k/kf5-filesystem-5.75.0-1.fc32.x86_64.rpm",
"https://mirror.lax.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/k/kf5-filesystem-5.75.0-1.fc32.x86_64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/k/kf5-filesystem-5.75.0-1.fc32.x86_64.rpm",
],
)

rpm(
name = "kmod-0__27-1.fc32.aarch64",
sha256 = "fe512ddf337568ca1e4d1c0cce66dda461ca570587c7beb1e1be3960540e394f",
Expand Down Expand Up @@ -2298,6 +2295,28 @@ rpm(
],
)

rpm(
name = "libburn-0__1.5.4-2.fc32.aarch64",
sha256 = "50a792dd4d00cada9ec37e947fe425058d07844eec79087b8ee79839479c5750",
urls = [
"https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/32/Everything/aarch64/Packages/l/libburn-1.5.4-2.fc32.aarch64.rpm",
"https://mirror.arizona.edu/fedora/linux/updates/32/Everything/aarch64/Packages/l/libburn-1.5.4-2.fc32.aarch64.rpm",
"https://repos.eggycrew.com/fedora/linux/updates/32/Everything/aarch64/Packages/l/libburn-1.5.4-2.fc32.aarch64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/aarch64/Packages/l/libburn-1.5.4-2.fc32.aarch64.rpm",
],
)

rpm(
name = "libburn-0__1.5.4-2.fc32.x86_64",
sha256 = "9b92acf62e9cd4ee78748fe28393f9feb37b0d6e01ad1a270c966f841a8bb503",
urls = [
"https://fedora.mirror.constant.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libburn-1.5.4-2.fc32.x86_64.rpm",
"https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/updates/32/Everything/x86_64/Packages/l/libburn-1.5.4-2.fc32.x86_64.rpm",
"https://mirror.lax.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libburn-1.5.4-2.fc32.x86_64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libburn-1.5.4-2.fc32.x86_64.rpm",
],
)

rpm(
name = "libcap-0__2.26-7.fc32.aarch64",
sha256 = "0a2eadd29cc53df942d3f0acc016b281efa4347fc2e9de1d7b8b61d9c5f0d894",
Expand Down Expand Up @@ -2664,6 +2683,50 @@ rpm(
],
)

rpm(
name = "libisoburn-0__1.5.4-2.fc32.aarch64",
sha256 = "f2dca49457a25ac07e660ccb208851c5cb40e624c2a2f6a6251a4264204024af",
urls = [
"https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/32/Everything/aarch64/Packages/l/libisoburn-1.5.4-2.fc32.aarch64.rpm",
"https://mirror.arizona.edu/fedora/linux/updates/32/Everything/aarch64/Packages/l/libisoburn-1.5.4-2.fc32.aarch64.rpm",
"https://repos.eggycrew.com/fedora/linux/updates/32/Everything/aarch64/Packages/l/libisoburn-1.5.4-2.fc32.aarch64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/aarch64/Packages/l/libisoburn-1.5.4-2.fc32.aarch64.rpm",
],
)

rpm(
name = "libisoburn-0__1.5.4-2.fc32.x86_64",
sha256 = "987f36bf84c5435fd99d961eab69cec5626f039ab414d361854d14bc2f77914a",
urls = [
"https://fedora.mirror.constant.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libisoburn-1.5.4-2.fc32.x86_64.rpm",
"https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/updates/32/Everything/x86_64/Packages/l/libisoburn-1.5.4-2.fc32.x86_64.rpm",
"https://mirror.lax.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libisoburn-1.5.4-2.fc32.x86_64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libisoburn-1.5.4-2.fc32.x86_64.rpm",
],
)

rpm(
name = "libisofs-0__1.5.4-1.fc32.aarch64",
sha256 = "f6460d264552bf1a4b1630dd7bfca3eec2ef7bdd5d31753aef7bcf9c2c1e43f3",
urls = [
"https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/32/Everything/aarch64/Packages/l/libisofs-1.5.4-1.fc32.aarch64.rpm",
"https://mirror.arizona.edu/fedora/linux/updates/32/Everything/aarch64/Packages/l/libisofs-1.5.4-1.fc32.aarch64.rpm",
"https://repos.eggycrew.com/fedora/linux/updates/32/Everything/aarch64/Packages/l/libisofs-1.5.4-1.fc32.aarch64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/aarch64/Packages/l/libisofs-1.5.4-1.fc32.aarch64.rpm",
],
)

rpm(
name = "libisofs-0__1.5.4-1.fc32.x86_64",
sha256 = "e024cfa9312d6752cd7677fb396ffec3895e4452e133d131f4715f6d7317ee9d",
urls = [
"https://fedora.mirror.constant.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libisofs-1.5.4-1.fc32.x86_64.rpm",
"https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/updates/32/Everything/x86_64/Packages/l/libisofs-1.5.4-1.fc32.x86_64.rpm",
"https://mirror.lax.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libisofs-1.5.4-1.fc32.x86_64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/l/libisofs-1.5.4-1.fc32.x86_64.rpm",
],
)

rpm(
name = "libmnl-0__1.0.4-11.fc32.aarch64",
sha256 = "2356581880df7b8275896b18de24e432a362ee159fc3127f92476ffe8d0432fd",
Expand Down Expand Up @@ -3404,29 +3467,6 @@ rpm(
],
)

rpm(
name = "libusal-0__1.1.11-44.fc32.aarch64",
sha256 = "b1aa13933d976a785a8a0be8558a9d73c04f7e53a4a406e6a7daed50bcf3a1cd",
urls = [
"https://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora-projects/fedora/linux/releases/32/Everything/aarch64/os/Packages/l/libusal-1.1.11-44.fc32.aarch64.rpm",
"https://nrt.edge.kernel.org/fedora-buffet/fedora/linux/releases/32/Everything/aarch64/os/Packages/l/libusal-1.1.11-44.fc32.aarch64.rpm",
"https://mirrors.tuna.tsinghua.edu.cn/fedora/releases/32/Everything/aarch64/os/Packages/l/libusal-1.1.11-44.fc32.aarch64.rpm",
"https://storage.googleapis.com/builddeps/b1aa13933d976a785a8a0be8558a9d73c04f7e53a4a406e6a7daed50bcf3a1cd",
],
)

rpm(
name = "libusal-0__1.1.11-44.fc32.x86_64",
sha256 = "7c9f879b67d1d5a6f40fa551b75f69ac744e5d0d795154655b8d55ef15512af0",
urls = [
"https://ftp-stud.hs-esslingen.de/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/l/libusal-1.1.11-44.fc32.x86_64.rpm",
"https://ftp.wrz.de/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/l/libusal-1.1.11-44.fc32.x86_64.rpm",
"https://ftp.plusline.net/fedora/linux/releases/32/Everything/x86_64/os/Packages/l/libusal-1.1.11-44.fc32.x86_64.rpm",
"https://mirror.23media.com/fedora/linux/releases/32/Everything/x86_64/os/Packages/l/libusal-1.1.11-44.fc32.x86_64.rpm",
"https://storage.googleapis.com/builddeps/7c9f879b67d1d5a6f40fa551b75f69ac744e5d0d795154655b8d55ef15512af0",
],
)

rpm(
name = "libusbx-0__1.0.24-2.fc32.aarch64",
sha256 = "dbb6addbbc17bd1533a5e395b8b92a4317c71a7d489e42597288c7659dec1d2a",
Expand Down Expand Up @@ -6800,6 +6840,28 @@ rpm(
],
)

rpm(
name = "xorriso-0__1.5.4-2.fc32.aarch64",
sha256 = "de49c96d30ecc193263ecd2262f72d9e5bd2c8377a60005f51699c7bcd8c9bd9",
urls = [
"https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/32/Everything/aarch64/Packages/x/xorriso-1.5.4-2.fc32.aarch64.rpm",
"https://mirror.arizona.edu/fedora/linux/updates/32/Everything/aarch64/Packages/x/xorriso-1.5.4-2.fc32.aarch64.rpm",
"https://repos.eggycrew.com/fedora/linux/updates/32/Everything/aarch64/Packages/x/xorriso-1.5.4-2.fc32.aarch64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/aarch64/Packages/x/xorriso-1.5.4-2.fc32.aarch64.rpm",
],
)

rpm(
name = "xorriso-0__1.5.4-2.fc32.x86_64",
sha256 = "ada8be281e15fda282f2ce366082a4761deb4621a0d9d5bd93893699ded8c85b",
urls = [
"https://fedora.mirror.constant.com/fedora/linux/updates/32/Everything/x86_64/Packages/x/xorriso-1.5.4-2.fc32.x86_64.rpm",
"https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/updates/32/Everything/x86_64/Packages/x/xorriso-1.5.4-2.fc32.x86_64.rpm",
"https://mirror.lax.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/x/xorriso-1.5.4-2.fc32.x86_64.rpm",
"https://mirror.genesisadaptive.com/fedora/linux/updates/32/Everything/x86_64/Packages/x/xorriso-1.5.4-2.fc32.x86_64.rpm",
],
)

rpm(
name = "xz-0__5.2.5-1.fc32.aarch64",
sha256 = "202d761caf4c9d4937c04388a7180d6687a79e8141136be0f7ecc3a54bf80594",
Expand Down
4 changes: 2 additions & 2 deletions hack/rpm-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bazel run \
libvirt-client-${LIBVIRT_VERSION} \
qemu-kvm-core-${QEMU_VERSION} \
seabios-${SEABIOS_VERSION} \
genisoimage \
xorriso \
selinux-policy selinux-policy-targeted \
nftables \
findutils \
Expand All @@ -90,7 +90,7 @@ bazel run \
libvirt-daemon-driver-qemu-${LIBVIRT_VERSION} \
libvirt-client-${LIBVIRT_VERSION} \
qemu-kvm-core-${QEMU_VERSION} \
genisoimage \
xorriso \
selinux-policy selinux-policy-targeted \
nftables \
findutils \
Expand Down
10 changes: 7 additions & 3 deletions pkg/cloud-init/cloud-init.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,18 @@ func defaultIsoFunc(isoOutFile, volumeID string, inDir string) error {
args = append(args, volumeID)
args = append(args, "-joliet")
args = append(args, "-rock")
args = append(args, "-partition_cyl_align")
args = append(args, "on")
args = append(args, inDir)

isoBinary := "xorrisofs"

// #nosec No risk for attacket injection. Parameters are predefined strings
cmd := exec.Command("genisoimage", args...)
cmd := exec.Command(isoBinary, args...)

err := cmd.Start()
if err != nil {
log.Log.V(2).Reason(err).Errorf("genisoimage cmd failed to start while generating iso file %s", isoOutFile)
log.Log.V(2).Reason(err).Errorf("%s cmd failed to start while generating iso file %s", isoBinary, isoOutFile)
return err
}

Expand All @@ -398,7 +402,7 @@ func defaultIsoFunc(isoOutFile, volumeID string, inDir string) error {
cmd.Process.Kill()
case err := <-done:
if err != nil {
log.Log.V(2).Reason(err).Errorf("genisoimage returned non-zero exit code while generating iso file %s", isoOutFile)
log.Log.V(2).Reason(err).Errorf("%s returned non-zero exit code while generating iso file %s with args '%s'", isoBinary, isoOutFile, strings.Join(cmd.Args, " "))
return err
}
return nil
Expand Down
6 changes: 5 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ func defaultCreateIsoImage(output string, volID string, files []string) error {
args = append(args, "-joliet")
args = append(args, "-rock")
args = append(args, "-graft-points")
args = append(args, "-partition_cyl_align")
args = append(args, "on")
args = append(args, files...)

isoBinary := "xorrisofs"

// #nosec No risk for attacket injection. Parameters are predefined strings
cmd := exec.Command("genisoimage", args...)
cmd := exec.Command(isoBinary, args...)
err := cmd.Run()
if err != nil {
return err
Expand Down
Loading

0 comments on commit f3ed80a

Please sign in to comment.