Open eehret opened 10 months ago
We are currently looking into this! Thank you for raising it with us.
@MutemwaRMasheke Can I get an update on this please. Thanks.
Just published a new nxtools release with fixes for this and other Github issues. https://www.powershellgallery.com/packages/nxtools/1.4.0
Thank you for your feedback!
@eehret Please reopen if you're still seeing this issue. I wasn't able to reproduce it with nxtools 1.4.0.
@gurrajatwal Hello . This appears to still be occurring:
[2024-02-13 17:40:16.330] [PID 250367] [TID 250377] [DSCEngine] [ERROR] [00000000-0000-0000-0000-000000000000] [/__w/1/s/src/dsc/gc_diagnostics/dsc_logger.cpp:157] [/__w/1/s/src/dsc/engine/ConfigurationManager/LocalConfigManagerHelper.c>Error Message: debconf: unable to initialize frontend: Dialog
Message ID: OMI:MI_Result:1
Error Category: 0
Error Code: 1
Error Type:
[2024-02-13 17:40:16.532] [PID 250367] [TID 250377] [DSCEngine] [ERROR] [00000000-0000-0000-0000-000000000000] [/__w/1/s/src/dsc/gc_diagnostics/dsc_logger.cpp:157] [/__w/1/s/src/dsc/engine/ConfigurationManager/LocalConfigManagerHelper.c>Error Message: debconf: (TERM is not set, so the dialog frontend is not usable.)
Message ID: OMI:MI_Result:1
Error Category: 0
Error Code: 1
Error Type:
[2024-02-13 17:40:16.629] [PID 250367] [TID 250377] [DSCEngine] [ERROR] [00000000-0000-0000-0000-000000000000] [/__w/1/s/src/dsc/gc_diagnostics/dsc_logger.cpp:157] [/__w/1/s/src/dsc/engine/ConfigurationManager/LocalConfigManagerHelper.c>Error Message: debconf: falling back to frontend: Readline
Message ID: OMI:MI_Result:1
Error Category: 0
Error Code: 1
Error Type:
[2024-02-13 17:40:17.729] [PID 250367] [TID 250377] [DSCEngine] [ERROR] [00000000-0000-0000-0000-000000000000] [/__w/1/s/src/dsc/gc_diagnostics/dsc_logger.cpp:157] [/__w/1/s/src/dsc/engine/ConfigurationManager/LocalConfigManagerHelper.c>Error Message: debconf: unable to initialize frontend: Readline
Message ID: OMI:MI_Result:1
Error Category: 0
Error Code: 1
Error Type:
[2024-02-13 17:40:17.729] [PID 250367] [TID 250377] [DSCEngine] [ERROR] [00000000-0000-0000-0000-000000000000] [/__w/1/s/src/dsc/gc_diagnostics/dsc_logger.cpp:157] [/__w/1/s/src/dsc/engine/ConfigurationManager/LocalConfigManagerHelper.c>Error Message: debconf: (This frontend requires a controlling tty.)
Message ID: OMI:MI_Result:1
Error Category: 0
Error Code: 1
Error Type:
[2024-02-13 17:40:17.730] [PID 250367] [TID 250377] [DSCEngine] [ERROR] [00000000-0000-0000-0000-000000000000] [/__w/1/s/src/dsc/gc_diagnostics/dsc_logger.cpp:157] [/__w/1/s/src/dsc/engine/ConfigurationManager/LocalConfigManagerHelper.c>Error Message: debconf: falling back to frontend: Teletype
Message ID: OMI:MI_Result:1
Error Category: 0
Error Code: 1
Error Type:
[2024-02-13 17:40:18.033] [PID 250367] [TID 250377] [DSCEngine] [ERROR] [00000000-0000-0000-0000-000000000000] [/__w/1/s/src/dsc/gc_diagnostics/dsc_logger.cpp:157] [/__w/1/s/src/dsc/engine/ConfigurationManager/LocalConfigManagerHelper.c>Error Message: dpkg-preconfigure: unable to re-open stdin:
Message ID: OMI:MI_Result:1
Error Category: 0
Error Code: 1
Error Type:
[2024-02-13 17:52:46.080] [PID 250367] [TID 250367] [WORKER] [INFO] [5f8b1ce9-5f7c-4ff4-ac4a-dae12dd4d3bf] Stop signal received.
[2024-02-13 17:52:46.080] [PID 250367] [TID 250367] [WORKER] [ERROR] [d826de63-f5d9-44a0-a58e-60ca86a924c3] [/__w/1/s/src/dsc/gc_worker/dsc_worker.cpp:170] STOP request received, exiting ...
I believe I already pinpointed a potential solution: i.e. setting debian front end to non-interactive like the old DSC solution used to do (See above where I included the code snippet from the old DSC 'nx' solution)
Can that be implemented please? Or perhaps an additional field could be put on nxPackage to opt into non-interactive mode and/or pass additional inputs to dpkg?
When this happens the process seems to hang until it finally times out.
How do we reopen this issue?
Note: I think you can reproduce the interactive behaviour using the same 'aide' package , and by installing aide, adding a modification to /etc/aide/aide.conf , then try altering removing and re-adding the package
This appears to be what triggers the interactive behaviour from the package. There will probably be other packages that occasionally contain an interactive mode as well though, not just aide so I think if this was made to behave the way the old 'nx' solution did that would help.
@gurrajatwal Please see these as well, which discusses the non-interactive mode: https://serverfault.com/questions/227190/how-do-i-ask-apt-get-to-skip-any-interactive-post-install-configuration-steps
@MutemwaRMasheke Hi, can you please reopen this?
I would gladly fix it myself if you would allow pull requests. Sadly it appears that you do not.
Thanks :)
Thanks Eric, we'll continue to look into this issue.
Details of the scenario you tried and the problem that is occurring
On Ubuntu, when trying to install a package that has some install scripts, it fails to install due to being in interactive mode. The example below is for the 'aide' package. Installing this used to work on the old nxPackage solution from https://github.com/microsoft/PowerShell-DSC-for-Linux/blob/master/Providers/Scripts/2.4x-2.5x/Scripts/nxPackage.py
Verbose logs showing the problem
Output is from gc_worker.log. First snippet is from during the actual attempt to Set desired state:
And then we see the following a bit later in the same log:
Suggested solution to the issue
In the old nxScript solution, the python code included some setup to set
DEBIAN_FRONTEND
to non-interactive mode. From lines 308-311 in https://github.com/microsoft/PowerShell-DSC-for-Linux/blob/master/Providers/Scripts/2.4x-2.5x/Scripts/nxPackage.py :I guess this setup must be missing in the new nxtools incarnation of nxPackage.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Ubuntu 20.04 LTS
Version and build of PowerShell the target node is running
7.3.6
Version of the DSC module that was used
1.2.0