stderr being printed out for Rex::Service instead of captured for $running_upstart
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza en Rex::Commands::Service->service y Rex::Service->get, y luego inspecciona las comprobaciones de OS para initctl y systemctl descritas en el issue. Reproduce el problema con el comando de servicio de Perl proporcionado en FreeBSD y verifica que la búsqueda del servicio ya no muestre la salida de stderr de initctl, aunque siga informando del resultado del servicio.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
sh: initctl: not found gets printed out any time Rex::Service->get is called.
Expected behavior
Redirects stderr to stdout to avoid
How to reproduce it
perl -e 'use Rex::Commands::Service; service snmpd=>"start";'
sh: initctl: not found
sh: initctl: not found
[2024-01-22 22:37:29] INFO - Service snmpd started.
Code example
use Rex::Commands::Service;
service snmpd=>"start";
Additional context
So looks like Rex::Commands::Service->service calls Rex::Service->get to get the object to use for it. When this happen a bit of code is ran to test for OS and if initctl and systemctl are usable.
I am lost as to why the systemctl check does not also do it.
Likely the best option here is to add which initctl > /dev/null && before it and likely do the same with systemctl as well.
[root@nibbles0]1|/src/ports/head>which initctl > /dev/null && echo test
[root@nibbles0]1|/src/ports/head>which ls > /dev/null && echo test
test
[root@nibbles0]0|/src/ports/head>
Double check to make sure this issue is not caused by how it is being packaged and when reinstalled via cpanm --reinstall Rex the same thing happens.
Rex version
1.14.3
Perl version
v5.36.3
Operating system running rex
FreeBSD nibbles0.vulpes.vvelox.net 13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64
Operating system managed by rex
FreeBSD and Linux
How rex was installed?
package manager
- Lenguaje dominante
- Perl
- Estrellas
- 736
- Forks
- 217
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 RexOps/Rex
-
is_redhat() misses Rocky/Alma/CentOS Stream/Oracle Linux lsb_release IDs -> pkg dies "OS/Provider not supported"Posiblemente ocupada @stantheman0128 la tomó hace 22 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
triage needed
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
triage needed
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
-
Enable errors from Augeas to be retrievedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertofeature request
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Todos los issues de RexOps/Rex
Issues similares
-
fix(api): API v3 Product Read ignores request language (lc) for sample products and image URLsPosiblemente ocupada @muntasir-396 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
openfoodfacts/openfoodfacts-server#15042 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
libwww-perl/URI#214 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dekobon/big-code-analysis#1644 ·
Los mantenedores suelen responder en 1 día
-
Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
inverse-inc/packetfence#9549 ·
Los mantenedores suelen responder en 1 día