0

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.

larsks
  • 277,717
  • 41
  • 399
  • 399

1 Answers1

0

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.

larsks
  • 277,717
  • 41
  • 399
  • 399
  • I tried modifying the functions-common file with 'rhel9.*' but I am stuck with a new error- 'Support for rhel9 is incomplete: no support for installing packages' – Stuti Arya Dec 16 '22 at 07:37
  • The project lists as their primary goal, "To quickly build dev OpenStack environments in a clean Ubuntu or Fedora environment". It sounds like support for RHEL9 or derivatives is a "best effort" sort of thing. If you're just starting out the easiest solution might be to use one of their primary targets (Ubuntu or Fedora). I use neither devstack nor RHEL 9, so you've reached the limit of the suggestions I can provide. – larsks Dec 16 '22 at 12:36
  • I tried using Ubuntu, but Devstack Yoga requires python 3.9, which I was unable to find. it doesn't appear to be compatible based on comments in https://bugs.launchpad.net/devstack/+bug/1997017 However, Ubuntu 20.04 and DevStack Yoga on Python 3.8 works perfectly. – Stuti Arya Dec 22 '22 at 07:03
  • do you have any suggestions to solve the error- 'Support for rhel9 is incomplete: no support for installing packages' – Stuti Arya Dec 22 '22 at 07:12
  • I don't have any suggestions other than (a) examine the script and make the necessary changes to resolve the error, or (b) use a supported platform instead of RHEL 9. – larsks Dec 22 '22 at 12:55