Skip to content

DSC & RHEL 8.x & Python > 3.8 not working  #1612

@CoolZeroNL

Description

@CoolZeroNL

DSC extension is not compatible with Python 3.8 and up

2022/10/21 10:16:26 [Microsoft.OSTCExtensions.DSCForLinux] Config decoded correctly.
2022/10/21 10:16:26 Falling back to /etc/os-release distribution parsing
2022/10/21 10:16:26 [Microsoft.OSTCExtensions.DSCForLinux] Install,error,51,rhel; distro_version: 8.5 is not supported.

The function platform.dist & platform.linux_distribution are been removed in python 3.7. So the DSC will use the Fallback to use /etc/os-release. This is working fine, only that RHEL is using a other name as is then is listed in the suppored_list.

# cat /etc/os-release 

NAME="Red Hat Enterprise Linux"
VERSION="8.6 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.6 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/8/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.6"

The ID in here is rhel and this is not listed in the supported_dists list.

Running the function separately shows also this:

# python3.6 tmp.py 
red hat-->red hat enterprise linux
['8', '6']

# python3.8 tmp.py 
Falling back to /etc/os-release distribution parsing
Unsupported OS :rhel; distro_version: 8.6
False
rhel
8.6

# python3.9 tmp.py 
Falling back to /etc/os-release distribution parsing
Unsupported OS :rhel; distro_version: 8.6
False
rhel
8.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions