Closed debarshiray closed 5 months ago
Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/f46fe48f40cf450a89cf379450c887d9
:heavy_check_mark: unit-test SUCCESS in 7m 01s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 27s :heavy_check_mark: unit-test-restricted SUCCESS in 6m 01s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 30m 36s :heavy_check_mark: system-test-fedora-39 SUCCESS in 30m 29s :heavy_check_mark: system-test-fedora-38 SUCCESS in 29m 45s
Build failed. https://softwarefactory-project.io/zuul/t/local/buildset/3aef2752f8f54bb6a730b707e7bcf363
:heavy_check_mark: unit-test SUCCESS in 6m 36s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 20s :heavy_check_mark: unit-test-restricted SUCCESS in 5m 50s :x: system-test-fedora-rawhide FAILURE in 34m 21s :x: system-test-fedora-39 FAILURE in 33m 07s :heavy_check_mark: system-test-fedora-38 SUCCESS in 32m 52s
Fedora's /etc/profile
has it's own mechanism to set the HOSTNAME
environment variable, which leads to:
fedora-rawhide | not ok 313 environment variables: HOSTNAME inside the default container in 3188ms
fedora-rawhide | # (from function `assert_line' in file test/system/libs/bats-assert/src/assert.bash, line 488,
fedora-rawhide | # in test file test/system/220-environment-variables.bats, line 450)
fedora-rawhide | # `assert_line --index 0 "toolbox"' failed
fedora-rawhide | #
fedora-rawhide | # -- line differs --
fedora-rawhide | # index : 0
fedora-rawhide | # expected : toolbox
fedora-rawhide | # actual : np0004424111.novalocal
fedora-rawhide | # --
Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/63f91926b07f49d4a67a25049cf31145
:heavy_check_mark: unit-test SUCCESS in 6m 56s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 14s :heavy_check_mark: unit-test-restricted SUCCESS in 6m 01s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 31m 39s :heavy_check_mark: system-test-fedora-39 SUCCESS in 30m 16s :heavy_check_mark: system-test-fedora-38 SUCCESS in 30m 58s
Bash automatically sets the
HOSTNAME
environment variable to the name of the current host [1] as returned bygethostname(2)
, which is the same ashostname(1)
.However, on Fedora, from Fedora 33 onwards,
/etc/profile
sets theHOSTNAME
environment variable tohostnamectl --transient
[2], and, from Fedora 35 onwards, it has a fallback tohostname(1)
[3]. These two approaches return different values when used inside a Toolbx container. The former picks up the hostname of the host operating system, while the fallback gets the name that was set when creating the container withpodman create --hostname toolbox ...
.Hence, the value of
HOSTNAME
inside a Toolbx container for Fedora depends on whether the corresponding version of thefedora-toolbox
image containedhostnamectl(1)
or not.[1] https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html
[2] setup commit eb9cc4dce89be24f https://pagure.io/setup/c/eb9cc4dce89be24f https://bugzilla.redhat.com/show_bug.cgi?id=1745245
[3] setup commit ddd74b5d971a734c https://pagure.io/setup/c/ddd74b5d971a734c https://pagure.io/setup/pull-request/28 https://bugzilla.redhat.com/show_bug.cgi?id=1938223
https://github.com/containers/toolbox/issues/558