[gparted] Fix CentOS 7 CI test job failures from empty /etc/machine-id (!62)



commit 70db3469c560190b5e1454b603868212b8f686a4
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Thu Sep 17 16:44:31 2020 +0100

    Fix CentOS 7 CI test job failures from empty /etc/machine-id (!62)
    
    Since August 2020, GitLab Continuous Integration test jobs have been
    failing on the CentOS 7 image like this from
    tests/test_SupportedFileSystems.log:
    
        process 6319: D-Bus library appears to be incorrectly set up; failed to read machine uuid: UUID file 
'/etc/machine-id' should contain a hex string of length 32, not length 0, with no other text
        See the manual page for dbus-uuidgen to correct this issue.
          D-Bus not built with -rdynamic so unable to print a backtrace
        Running main() from test_SupportedFileSystems.cc
        DISPLAY=":99"
        /usr/bin/xvfb-run: line 181:  6319 Aborted                 (core dumped) DISPLAY=:$SERVERNUM 
XAUTHORITY=$AUTHFILE "$@" 2>&1
    
    Not sure why this has just started failing in the CentOS 7 CI image now,
    but the error is widely known [1][2][3][4].  Use
    systemd-machine-id-setup to generate a machine ID [5][6]; rather than
    dbus-uuidgen [7] as it's designed to integrate into VMs and does the
    right thing if a valid machine ID already exists.
    
    [1] Red Hat Bug 598200 - D-Bus library appears to be incorrectly set up;
        failed to read machine uuid: UUID file '/var/lib/dbus/machine-id'
        https://bugzilla.redhat.com/show_bug.cgi?id=598200
    [2] Free Desktop Bug 13194 - When machine-id not found, dbus should not
        abort
        https://bugs.freedesktop.org/show_bug.cgi?id=13194
    [3] D-Bus library appears to be incorrectly set up
        https://unix.stackexchange.com/questions/117741/d-bus-library-appears-to-be-incorrectly-set-up
    [4] Generate uuid for container
        https://xpra.org/trac/wiki/Usage/Docker/CentOS
    [5] CentOS / RHEL 7 : How to Change the machine-id
        https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/
    [6] man systemd-machine-id-setup
        https://man7.org/linux/man-pages/man1/systemd-machine-id-setup.1.html
    [7] man dbus-uuidgen
        https://dbus.freedesktop.org/doc/dbus-uuidgen.1.html
    
    Closes !62 - Fix CentOS 7 CI test job failures because of zero sized
                 /etc/machine-id

 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 097e0f54..5d9a9394 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,6 +18,7 @@ stages:
                      ntfsprogs udftools xfsprogs xfsdump
                      xorg-x11-server-Xvfb kmod
     - cat /etc/os-release
+    - systemd-machine-id-setup
 
 .ubuntu_image_template: &ubuntu_image_definition
   # Use official Ubuntu image https://hub.docker.com/_/ubuntu/.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]