This repository was archived by the owner on Sep 12, 2024. It is now read-only.
Tags: microsoft/PowerShell-DSC-for-Linux
Tags
Added support for python 3 for DIY DSC (#789) Summary of changes included as a part of the PR: Porting changes (Fixes) to run all scripts on python 3 Updated DSC default resources offered under nx to run on python 3. Added additional logging to all python scripts. Fixes for bugs that were introduced as a part of DROP OMI Depenedency. Description of the changes: As a part of porting the code we had decided to keep the code for python3 in a seperate forlder.(Most of these changes were done as a part of OMSConfig Py3 support PR). The updated folder for python scripts is as follows: python2 : /opt/microsoft/dsc/Scripts python3: /opt/microsoft/dsc/Scripts/python3 The python version of the machine will be determined by checking the existance of python2 and python3 command. In this version python2 takes precidence if both python 2 and 3 are present. (This is done to maintain compabality for older distros.) Instead of just logging success and failure a lot of debug and detailed logs ave been added. Going forward DSC will have two log files: /var/opt/omi/log/dsc.log /var/opt/omi/log/dscdetailed.log A lot of issues were discovered for the master branch, as the last release was done years back. I have tried to fix most of them. The issue were as a part of the DROP OMI DEPENDECY pr, which was only intended for omsconfig and ended up breaking DIY DSC. Testing: Manually tested for sanity and happy path secnarios on both python 2 and 3. Distro testing is in progress using the test suite. Bug bas planned for this week. * Initial Changes to run locally * Update InstallModule.py * Updated helper scripts to account for new paths * Updated providers to get invoked with python3 instead of python * Fix FindFirstFile Failed bug that was introduced in 2019 * Fixed path to omicli for scripts * Fixed the bug causing test to fail, it was introduced by a 2019 change DROP OMI DEPENDENCY * Update CAEngine.c * Added logs to python scripts * Updated logging to capture python major version * Added logs around compare in nxFile * Removed logging from import module to get rid of circular dependency * Removed logging from RegenerateInit to remove circular dependency * Update RegenerateInitFiles.py * Fixed comparison in case of python 3 for nxFile * Updated imports for loggig to work * Using absolute path instead of relative paths for DSCLogger * Update Makefile to respect version provided in Build Repo * Updated paths * Updated Register.py * Updated to remove warnings thrown for 'is' * Update if such that we check instance details before reginstance * Additioal logs to debug a failure in get configuration will revert the ones not required * Removed additional logging (These were just for debugging and not required to be released) * Removed additional logs * Updating content to string as OMI is not able to handle bytes * Resolving sekhar's comments
PreviousNext