GuestConfiguration errors out if the generated MOF filename has periods in the filename before the '.mof'
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- powershell
- Área
- tooling
Línea de trabajo
Reproduce el problema pasando un nombre de paquete que contenga puntos a New-GuestConfigurationPackage y, después, usa Get-GuestConfigurationPackageComplianceStatus con el paquete resultante. Rastrea cómo los comandos derivan las rutas de MOF y metaconfig a partir del nombre de archivo del paquete; se considera terminado cuando los paquetes con puntos resuelven correctamente ambos archivos y el estado de cumplimiento se ejecuta sin errores por documentos faltantes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Details of the scenario you tried and the problem that is occurring
The GuestConfiguration module errors out if the guest configuration package filename specified to New-GuestConfigurationPackage (by the Name parameter) includes periods in the package name. When the Guest Configuration package contains periods in the package name then the MOF file inside of the ZIP also includes periods in the filename, and when attempting to use the package with the Get-GuestConfigurationPackageComplianceStatus command , Guest Configuration mishandles this and tries to find the MOF using the wrong path.
This is particularly problematic because the guidance found here specifically suggests a package naming convention that will lead to users encountering this error condition: https://learn.microsoft.com/en-us/azure/governance/machine-configuration/how-to/create-policy-definition?source=recommendations#policy-lifecycle
Verbose logs showing the problem
Error: DSC document '/home/myaccount/.local/share/powershell/Modules/GuestConfiguration/4.5.0/gcworker/packages/UbuntuServer-20-04-LTS-CISv201-Section1-AuditAndSet-0.1.4/UbuntuServer-20-04-LTS-CISv201-Section1-AuditAndSet-0.1.mof' doesn't exist in assignment package.
Error: Metaconfig document '/home/myaccount/.local/share/powershell/Modules/GuestConfiguration/4.5.0/gcworker/packages/UbuntuServer-20-04-LTS-CISv201-Section1-AuditAndSet-0.1.4/UbuntuServer-20-04-LTS-CISv201-Section1-AuditAndSet-0.1.metaconfig.json' doesn't exist in assignment package.
Error: Failed to Run Consistency for 'UbuntuServer-20-04-LTS-CISv201-Section1-AuditAndSet-0.1.4' Error : Current configuration does not exist. Execute Start-DscConfiguration command with -Path parameter to specify a configuration file and create a current configuration first.
Write-Error: Job 29cd2220-d307-48a9-9123-267071dd52e6 : MIResult: 6 Error Message: Current configuration does not exist. Execute Start-DscConfiguration command with -Path parameter to specify a configuration file and create a current configuration
first. Message ID: OMI:MI_Result:6 Error Category: 0 Error Code: 1 Error Type:
Suggested solution to the issue
It looks like the GuestConfiguration code is making a bad assumption regarding periods being in the filename, and parsing based on that bad assumption. I assume the related code for parsing the path of the MOF needs revising.
The DSC configuration that is used to reproduce the issue (if applicable)
n/a - this issue is not configuration-dependent
The operating system the target node is running
Ubuntu Server 18.04 LTS
Version and build of PowerShell the target node is running
7.3.10 (7.4+ doesn't seem to work with GuestConfiguration, so we have intentionally avoided upgrading)
Version of the module that was used
4.5.0
- Lenguaje dominante
- PowerShell
- Estrellas
- 8
- Forks
- 13
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/GuestConfiguration
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Azure/GuestConfiguration#322 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
Azure/GuestConfiguration#320 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Azure/GuestConfiguration#319 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
Azure/GuestConfiguration#312 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Azure/GuestConfiguration#308 · 1 comentario ·
Todos los issues de Azure/GuestConfiguration
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Rust: `const _` gets its file's node ID, so the file node is relabelled `_` and gains a self-loopAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Graphify-Labs/graphify#4064 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
strip_markdown: backslash-escaped `\*x\*` / `\_x\_` is treated as italic, leaving stray backslashesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
IfCondition evaluates the expressions of the branch not taken (case-sensitive "activities" check)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Claiming namespace apexdevAbiertonamespace operations
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
EclipseFdn/open-vsx.org#13737 ·
Los mantenedores suelen responder en 1 día