Skip to content

DocGeneration fails on Ubuntu-2204 image with libmi error #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PlagueHO opened this issue Jan 25, 2023 · 9 comments
Closed

DocGeneration fails on Ubuntu-2204 image with libmi error #131

PlagueHO opened this issue Jan 25, 2023 · 9 comments
Labels
bug The issue is a bug. not fixed The issue was closed without being fixed.

Comments

@PlagueHO
Copy link
Member

Details of the scenario you tried and the problem that is occurring

Running the Doc Generation task on an ubuntu-2204 (usually just ubuntu-latest) fails with:

Generating conceptual help for all DSC resources based on source.
ERROR: Failed to import classes from file /home/vsts/work/1/s/source/DSCResources/DSC_Disk/DSC_Disk.schema.mof. Error Exception calling "ImportClasses" with "3" argument(s): "Unable to load shared library 'libmi' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibmi: cannot open shared object file: No such file or directory"
At /home/vsts/work/1/s/output/RequiredModules/DscResource.DocGenerator/0.11.2/DscResource.DocGenerator.psm1:1495 char:9
+         throw "Failed to import classes from file $FileName. Error $_ …
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At /home/vsts/work/1/s/output/RequiredModules/DscResource.DocGenerator/0.11.2/tasks/Generate_Conceptual_Help.build.ps1:81 char:1
+ task Generate_Conceptual_Help {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build FAILED. 9 tasks, 1 errors, 0 warnings 00:00:03.1080050
Exception: Failed to import classes from file
/home/vsts/work/1/s/source/DSCResources/DSC_Disk/DSC_Disk.schema.mof. Error
Exception calling "ImportClasses" with "3" argument(s): "Unable to load shared
library 'libmi' or one of its dependencies. In order to help diagnose loading
problems, consider setting the LD_DEBUG environment variable: liblibmi: cannot
open shared object file: No such file or directory"

Steps to reproduce the problem

Run the pipeline for any DSC resource using automated doc generation and using an ubuntu-latest image. See https://dev.azure.com/dsccommunity/StorageDsc/_build/results?buildId=7403&view=logs&jobId=bce26a94-9049-50eb-6c1c-385ccbec51f9&j=bce26a94-9049-50eb-6c1c-385ccbec51f9&t=512e4b73-7a3e-57af-0534-ae809c1351da

Expected behavior

Should perform the build.

Current behavior

Throws exception:
Exception: Failed to import classes from file
/home/vsts/work/1/s/source/DSCResources/DSC_Disk/DSC_Disk.schema.mof. Error
Exception calling "ImportClasses" with "3" argument(s): "Unable to load shared
library 'libmi' or one of its dependencies. In order to help diagnose loading
problems, consider setting the LD_DEBUG environment variable: liblibmi: cannot
open shared object file: No such file or directory"

Suggested solution to the issue

Temporary solution is to pin build image to ubuntu-20.04. Long term solution needs investigation.

The operating system the target node is running

ubuntu-20.04

Version and build of PowerShell the target node is running

Version of the module that was used

Latest

@nyanhp
Copy link

nyanhp commented Feb 6, 2023

Maybe it would be worthwhile to build and pack MOF-based modules on Windows. Installing libmi (OMI) on any new Ubuntu version requires downgrading to some ancient openssl libs. The timeline with regards to more recent version of openssl does not look promising to be honest: microsoft/omi#715
A downgrade to the required version of openssl is not advisable.

@gaelcolas
Copy link
Member

I'm in talks with the PS & Config team on this.
We ought to try using PSWsman to work around this.
Ping me in a few days if I forget to update this issue.

@nyanhp
Copy link

nyanhp commented Feb 7, 2023

Right, I forgot about PSWSMan. I can confirm that the DocGenerator build task works on Ubuntu 22.04 WSL (and likely also 20) after using Install-WSMAN.

@nyanhp
Copy link

nyanhp commented Apr 18, 2023

@gaelcolas the pipelines are still failing. Did your talks result in any new information, or should we try using PSWSMan?

@gaelcolas
Copy link
Member

@PlagueHO
Copy link
Member Author

I have now noticed that this issue has also started occurring with Ubuntu-20.04 (in StorageDsc) at least.

@johlju
Copy link
Member

johlju commented Mar 13, 2024

When I encounter this I move the pipeline to windows-latest instead.

@PlagueHO
Copy link
Member Author

That is what I have done. Does solve it.

@johlju
Copy link
Member

johlju commented May 31, 2024

The tests in this repo are now skipped on Linux. There are to much work keeping DSC up to date on Linux and going forward stuff for Linux should be tested on DSCv3.

@johlju johlju closed this as completed May 31, 2024
@johlju johlju added not fixed The issue was closed without being fixed. and removed help wanted The issue is up for grabs for anyone in the community. needs investigation The issue needs to be investigated by the maintainers or/and the community. labels May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. not fixed The issue was closed without being fixed.
Projects
None yet
Development

No branches or pull requests

4 participants