Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
Adds extended Linux distribution fact parsing (including CPE-related fields) and introduces explicit support for the “RLCLinux” distribution, shipping the updated distribution parser into the execution environment image.
Changes:
- Add a custom
distribution.pyfact collector implementation with RLCLinux detection and/etc/os-releaseparsing forNAME,VARIANT, andCPE_NAME. - Populate new facts:
distribution_os_name,distribution_os_variant,distribution_os_cpe_name(when/etc/os-releaseis read). - Update the execution environment build to include and copy the patched distribution fact module into the container.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
files/distribution.py |
New/overridden distribution fact implementation: RLCLinux support + /etc/os-release derived facts. |
execution-environment.yml |
Ensures the new distribution implementation is included in the EE build and copied into the image. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Here is example output from AlmaLinux 9.7 |
|
I guess we could go further... |
|
Looks like Ubuntu does not have a cpe_name: Checking in more detail. |
|
Here is Ubuntu: |
|
Rocky here: RLC Pro AI |
|
Replacing my earlier comment — the previous version drifted into suggesting RLC-side packaging changes, which is out of scope for this PR. The finding below is entirely about ascender-ee detection logic. One bug: LTS 9.6 falls through
|
| Variant | /etc/system-release-cpe |
/etc/ciq-release |
Detected by PR #9? |
|---|---|---|---|
| RLC Plus 9.7 | cpe:2.3:o:ciq:rocky_linux_from_ciq:9.7 |
present (rlc-release-9.7-1.8.el9_7_ciq) |
✅ |
| RLC Pro 9.7 | cpe:2.3:o:ciq:rocky_linux_from_ciq_pro:9.7 |
present (rlc-pro-release-9.7-1.9.el9_7_ciq) |
✅ |
| RLC LTS 9.6 | cpe:2.3:o:ciq:rocky_linux_from_ciq_lts:9.6 |
absent (ciq-lts96-rocky-release-9.6-3.5.el9_6 does not install it) |
❌ |
Suggested fix, entirely in ascender-ee
Use /etc/system-release-cpe as the primary signal. That file is an EL-family convention and is installed by every EL-family *-release RPM — redhat-release, rocky-release, rlc-release, rlc-pro-release, ciq-lts96-rocky-release, almalinux-release, oraclelinux-release. It's strictly more reliable than a vendor-specific file like /etc/ciq-release.
Concretely, something like this in distribution.py:
OSDIST_LIST = (
{'path': '/etc/system-release-cpe', 'name': 'RLC'}, # NEW — matches any RLC variant
{'path': '/etc/ciq-release', 'name': 'RLC'}, # kept as fallback for images that have it but no cpe file
{'path': '/etc/altlinux-release', 'name': 'Altlinux'},
...
)
SEARCH_STRING = {
'RLC': ':ciq:', # matches cpe:2.3:o:ciq:* and cpe:/o:ciq:*
...
}Then the RLC parser reads the CPE directly (it's a single line like cpe:2.3:o:ciq:rocky_linux_from_ciq_lts:9.6) and derives distribution_os_cpe_name + distribution_os_variant from the product segment — rocky_linux_from_ciq → Plus, ..._pro → Pro, ..._pro_ai → Pro AI, ..._lts → LTS. No dependency on any RLC-side packaging change, works for every RLC variant shipping today.
As a bonus, keying on the CPE file means the detector would also work for any future CIQ product that sets cpe:*:o:ciq:* without you needing to add a new file path to the list.
Unit test fixtures
Happy to contribute /etc/system-release-cpe + /etc/os-release captures from the three live images as test fixtures. Expected assertions:
| Variant | distribution |
distribution_os_cpe_name |
|---|---|---|
| RLC Plus 9.7 | RLC |
cpe:2.3:o:ciq:rocky_linux_from_ciq:9.7 |
| RLC Pro 9.7 | RLC |
cpe:2.3:o:ciq:rocky_linux_from_ciq_pro:9.7 |
| RLC LTS 9.6 | RLC |
cpe:2.3:o:ciq:rocky_linux_from_ciq_lts:9.6 |
Let me know if fixtures from a follow-up PR would land well.
Context — this feeds into ctrliq/ascender-ledger-pro#309, which needs the CPE fact to reach Ledger's ingest so advisory routing can key on vendor/stream.
|
The cpe_name should match between |
|
It seems Ubuntu 24.04 gives not mention of CPE anywhere in /etc/. |
|
Surveyed 16 hosts. Table below.
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks to @bradydibble for saving me the time and effort for the most notable distributions. This patch will check the |
|
It also looks like Solaris 11.4+ and FreeBSD 13.0+ also support the files that we have laid out. For now, we know this is the case, but I will keep them out of scope for the current exercise in that they follow a separate code path than standard Linux OS' follow. HP-UX is dead as of the end of last year, and AIX does not currently support these files as a general practice. |
|
@bradydibble, per our conversation, it would be nice if the LTS family included an /etc/ciq-release file to help with upstream detection. However, since in Ascender, we are using the CPE_NAME, this won't present a problem except with upstream tools that will look at it as a RHEL variant as opposed to an RLC variant. We have some time before we ustream anything. So, take your time and update this ticket as applicable. |
|
@cigamit, according to @bradydibble he has opened a ticket for our LTS distributions to add an /etc/ciq-release file for future releases. So, I think for upstream we don't need any more changes. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
I am talking about this only being a bandaid, as this is being done just so you can test the Ledger stuff. This is not a fix at all, and won't even work for most clients (as they will use their own EE). We can discuss in a bit. |
|
Here is draft FreeBSD. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
In this change, we will add three new distribution variables from /etc/os-release for all Linux Distributions that include this file. The three new variables are:
Additionally, we provide support for a new OS Distribution called RLC that can then be further parsed from it's /etc/os-release information for further processing.
Due to the presence of /etc/os-release on FreeBSD 13.0+, FreeBSD detection has also been updated in this pull.
The new output will look similar to: