How to deploy devstack (OpenStack) on RHEL 9.1?

580 views Asked by At

I want to install DevStack(Yoga) on RHEL 9.1 (https://opendev.org/openstack/DevStack). I attempted to deploy using the official manual (https://www.redhat.com/sysadmin/get-started-openstack-devstack).

However, the deployment got stuck due to the unavailability of the "redhat-lsb-core" package while running the '$./stack.sh' command.

Any help would be appreciated.

1

There are 1 answers

5
larsks On

Looking at the code, it appears that the redhat-lsb-core package is only required by the GetOSVersion function, and there are already explicit provisions in place for both CentOS and Rocky 9, both of which, like RHEL9, do not include the redhat-lsb-core package:

function GetOSVersion {
    # CentOS Stream 9 does not provide lsb_release
    source /etc/os-release
    if [[ "${ID}${VERSION}" == "centos9" ]]; then
        os_RELEASE=${VERSION_ID}
        os_CODENAME="n/a"
        os_VENDOR=$(echo $NAME | tr -d '[:space:]')
    elif [[ "${ID}${VERSION}" =~ "rocky9" ]]; then
        os_VENDOR="Rocky"
        os_RELEASE=${VERSION_ID}
    else
        _ensure_lsb_release

        os_RELEASE=$(lsb_release -r -s)
        os_CODENAME=$(lsb_release -c -s)
        os_VENDOR=$(lsb_release -i -s)
    fi

    ...

It looks like you could probably get things working in RHEL9 by treating it like centos9, perhaps like this:

function GetOSVersion {
    # CentOS Stream 9 does not provide lsb_release
    source /etc/os-release
    if [[ "${ID}${VERSION}" == "centos9" ]]; then
        os_RELEASE=${VERSION_ID}
        os_CODENAME="n/a"
        os_VENDOR=$(echo $NAME | tr -d '[:space:]')
    elif [[ "${ID}${VERSION}" == rhel9.* ]]; then
        os_RELEASE=${VERSION_ID}
        os_CODENAME="n/a"
        os_VENDOR=$(echo $NAME | tr -d '[:space:]')
    elif [[ "${ID}${VERSION}" =~ "rocky9" ]]; then
        os_VENDOR="Rocky"
        os_RELEASE=${VERSION_ID}
    else
      ...

On a RHEL 9.1 system, this will set:

os_RELEASE=9.1
os_CODENAME=n/a
os_VENDOR=RedHatEnterpriseLinux

That will hopefully be enough to move things forward.