Re: [PATCH v2 04/13] tests: Update our CI to use CentOS Stream 9 instead of 8

2024-04-17 Thread Thomas Huth

On 17/04/2024 18.15, Daniel P. Berrangé wrote:

On Fri, Apr 12, 2024 at 03:24:06PM +0200, Thomas Huth wrote:

RHEL 9 (and thus also the derivatives) are available since two years
now, so according to QEMU's support policy, we can drop the active
support for the previous major version 8 now.
Thus upgrade our CentOS Stream container to major version 9 now.


The second reason for doing this is that Centos Stream 8
will go EOL in about 1 month:

https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/

   "After May 31, 2024, CentOS Stream 8 will be archived
and no further updates will be provided."

I'm seeking confirmation, but I suspect after that date we
will be unable to build centos8 containers, as the package
repos will likely be archived.

RHEL-8 and other derivatives (Alma Linux, Rocky Linux,
etc) remain actively supported by their respective vendors
/ communities. Only CentOS Stream EOLs.


This has implications for our CI on stable branches. It is
valid for our stable branches to continue targetting the
RHEL-8 family of distros, as a 2 year cutoff in our support
policy is evaluated at time of each given major release.

IOW, cherry-picking this change to switch to CentOS Stream
9 is possibly inappropriate for stable branches.

lcitool supports Alma Linux as target, so we could switch
stable branches to Alma Linux 8 if desired to keep CI
coverage of RHEL-8 family.

Thoughts ?


Either use AlmaLinux for the stable branches, or drop the EL 8 testing in 
the stable CI completely ... I assume that the probability will be rather 
low that we break something there by backporting some few patches (and if 
so, people can still complain by opening a bug ticket, then we can fix it in 
the following stable release).


 Thomas




Re: [PATCH v2 09/13] block/gluster: Use URI parsing code from glib

2024-04-17 Thread Thomas Huth

On 12/04/2024 16.40, Eric Blake wrote:

On Fri, Apr 12, 2024 at 03:24:11PM +0200, Thomas Huth wrote:

Since version 2.66, glib has useful URI parsing functions, too.
Use those instead of the QEMU-internal ones to be finally able
to get rid of the latter.

Signed-off-by: Thomas Huth 
---
  block/gluster.c | 71 -
  1 file changed, 35 insertions(+), 36 deletions(-)

diff --git a/block/gluster.c b/block/gluster.c
index cc74af06dc..1c9505f8bb 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -17,7 +17,6 @@
  #include "qapi/error.h"
  #include "qapi/qmp/qdict.h"
  #include "qapi/qmp/qerror.h"
-#include "qemu/uri.h"
  #include "qemu/error-report.h"
  #include "qemu/module.h"
  #include "qemu/option.h"
@@ -289,9 +288,9 @@ static void glfs_clear_preopened(glfs_t *fs)
  }
  }
  
-static int parse_volume_options(BlockdevOptionsGluster *gconf, char *path)

+static int parse_volume_options(BlockdevOptionsGluster *gconf, const char 
*path)


Is it worth mentioning in the commit message that this includes a
const-correctness tweak?


I can add something like:

"Since g_uri_get_path() returns a const pointer, we also need to tweak the 
parameter of parse_volume_options() (where we use the result of 
g_uri_get_path() as input)"



@@ -364,57 +363,57 @@ static int qemu_gluster_parse_uri(BlockdevOptionsGluster 
*gconf,
  QAPI_LIST_PREPEND(gconf->server, gsconf);
  
  /* transport */

-if (!uri->scheme || !strcmp(uri->scheme, "gluster")) {
+uri_scheme = g_uri_get_scheme(uri);
+if (!uri_scheme || !strcmp(uri_scheme, "gluster")) {


Pre-existing, but per RFC 3986, we should probably be using strcasecmp
for scheme comparisons (I'm not sure if g_uri_parse guarantees a
lower-case return, even when the user passed in upper case).  That can
be a separate patch.


As Daniel mentioned, g_uri_get_scheme() returns a lowercase string, so we 
should be fine.



Reviewed-by: Eric Blake 


Thanks!

 Thomas





Re: [PATCH v2 04/13] tests: Update our CI to use CentOS Stream 9 instead of 8

2024-04-17 Thread Daniel P . Berrangé
On Fri, Apr 12, 2024 at 03:24:06PM +0200, Thomas Huth wrote:
> RHEL 9 (and thus also the derivatives) are available since two years
> now, so according to QEMU's support policy, we can drop the active
> support for the previous major version 8 now.
> Thus upgrade our CentOS Stream container to major version 9 now.

The second reason for doing this is that Centos Stream 8
will go EOL in about 1 month:

https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/

  "After May 31, 2024, CentOS Stream 8 will be archived
   and no further updates will be provided."

I'm seeking confirmation, but I suspect after that date we
will be unable to build centos8 containers, as the package
repos will likely be archived.

RHEL-8 and other derivatives (Alma Linux, Rocky Linux,
etc) remain actively supported by their respective vendors
/ communities. Only CentOS Stream EOLs.


This has implications for our CI on stable branches. It is
valid for our stable branches to continue targetting the
RHEL-8 family of distros, as a 2 year cutoff in our support
policy is evaluated at time of each given major release.

IOW, cherry-picking this change to switch to CentOS Stream
9 is possibly inappropriate for stable branches.

lcitool supports Alma Linux as target, so we could switch
stable branches to Alma Linux 8 if desired to keep CI
coverage of RHEL-8 family.

Thoughts ?

> 
> Signed-off-by: Thomas Huth 
> ---
>  .gitlab-ci.d/buildtest.yml| 16 -
>  .gitlab-ci.d/container-core.yml   |  4 +--
>  .../{centos8.docker => centos9.docker}| 34 +++
>  tests/lcitool/mappings.yml| 20 ---
>  tests/lcitool/refresh |  2 +-
>  tests/vm/centos   |  4 +--
>  6 files changed, 26 insertions(+), 54 deletions(-)
>  rename tests/docker/dockerfiles/{centos8.docker => centos9.docker} (82%)
> 
> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
> index cfdff175c3..9f34c650d6 100644
> --- a/.gitlab-ci.d/buildtest.yml
> +++ b/.gitlab-ci.d/buildtest.yml
> @@ -158,9 +158,9 @@ build-system-centos:
>  - .native_build_job_template
>  - .native_build_artifact_template
>needs:
> -job: amd64-centos8-container
> +job: amd64-centos9-container
>variables:
> -IMAGE: centos8
> +IMAGE: centos9
>  CONFIGURE_ARGS: --disable-nettle --enable-gcrypt 
> --enable-vfio-user-server
>--enable-modules --enable-trace-backends=dtrace --enable-docs
>  TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
> @@ -242,7 +242,7 @@ check-system-centos:
>  - job: build-system-centos
>artifacts: true
>variables:
> -IMAGE: centos8
> +IMAGE: centos9
>  MAKE_CHECK_ARGS: check
>  
>  avocado-system-centos:
> @@ -251,7 +251,7 @@ avocado-system-centos:
>  - job: build-system-centos
>artifacts: true
>variables:
> -IMAGE: centos8
> +IMAGE: centos9
>  MAKE_CHECK_ARGS: check-avocado
>  AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx
>arch:sh4 arch:nios2
> @@ -327,9 +327,9 @@ avocado-system-flaky:
>  build-tcg-disabled:
>extends: .native_build_job_template
>needs:
> -job: amd64-centos8-container
> +job: amd64-centos9-container
>variables:
> -IMAGE: centos8
> +IMAGE: centos9
>script:
>  - mkdir build
>  - cd build
> @@ -651,9 +651,9 @@ build-tci:
>  build-without-defaults:
>extends: .native_build_job_template
>needs:
> -job: amd64-centos8-container
> +job: amd64-centos9-container
>variables:
> -IMAGE: centos8
> +IMAGE: centos9
>  CONFIGURE_ARGS:
>--without-default-devices
>--without-default-features
> diff --git a/.gitlab-ci.d/container-core.yml b/.gitlab-ci.d/container-core.yml
> index 08f8450fa1..5459447676 100644
> --- a/.gitlab-ci.d/container-core.yml
> +++ b/.gitlab-ci.d/container-core.yml
> @@ -1,10 +1,10 @@
>  include:
>- local: '/.gitlab-ci.d/container-template.yml'
>  
> -amd64-centos8-container:
> +amd64-centos9-container:
>extends: .container_job_template
>variables:
> -NAME: centos8
> +NAME: centos9
>  
>  amd64-fedora-container:
>extends: .container_job_template
> diff --git a/tests/docker/dockerfiles/centos8.docker 
> b/tests/docker/dockerfiles/centos9.docker
> similarity index 82%
> rename from tests/docker/dockerfiles/centos8.docker
> rename to tests/docker/dockerfiles/centos9.docker
> index ea618bf352..6cf47ce786 100644
> --- a/tests/docker/dockerfiles/centos8.docker
> +++ b/tests/docker/dockerfiles/centos9.docker
> @@ -1,15 +1,14 @@
>  # THIS FILE WAS AUTO-GENERATED
>  #
> -#  $ lcitool dockerfile --layers all centos-stream-8 qemu
> +#  $ lcitool dockerfile --layers all centos-stream-9 qemu
>  #
>  # https://gitlab.com/libvirt/libvirt-ci
>  
> -FROM quay.io/centos/centos:stream8
> +FROM quay.io/centos/centos:stream9
>  
>  RUN dnf distro-sync -y && \
>