Skip to content
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

[BUG] win_service module throwing unneccesary error #63577

Closed
poliscialex opened this issue Jan 27, 2023 · 3 comments
Closed

[BUG] win_service module throwing unneccesary error #63577

poliscialex opened this issue Jan 27, 2023 · 3 comments
Assignees
Labels
Beacon Bug broken, incorrect, or confusing behavior Execution-Module Windows

Comments

@poliscialex
Copy link

Description of Issue

When running a service.status using win_service, if the service is not installed, rather than returning False, Salt returns RROR: Failed To Open SERVICENAME: The specified service does not exist as an installed service. This also has an impact on beacons, because if a beacon is monitoring a service that is not installed on a particular minion, it fills the event bus up with this:

salt/beacon/minion1/service/        {
    "_stamp": "2023-01-27T00:45:47.437422"
}

Steps to Reproduce Issue

Run service.status against a windows minion for a service that is not installed

Versions Report

Salt Version:
          Salt: 3005.1
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: 2.8.1
     docker-py: 6.0.1
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.0
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: Not Installed
        Python: 3.9.16 (main, Jan  6 2023, 22:49:56)
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 23.2.0
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: ubuntu 20.04 focal
        locale: utf-8
       machine: x86_64
       release: 5.4.0-137-generic
        system: Linux
       version: Ubuntu 20.04 focal
@whytewolf whytewolf added Bug broken, incorrect, or confusing behavior Windows labels Jan 28, 2023
@twangboy
Copy link
Contributor

@twangboy
Copy link
Contributor

@whytewolf
6 hours ago
ok, found what is going on. it is a problem is with win_service throwing an exception instead of just saying False when the service doesn't exist. There needs to be a bug filed for this. the good is this only effects windows systems. the bad is that win_service should never have broken that bad. modules should not throw exceptions expect when something goes horribly wrong. a package not being installed is not something that is horribly wrong.

@twangboy twangboy added this to the Chlorine v3007.0 milestone Mar 29, 2023
@MKLeb MKLeb removed their assignment May 23, 2023
@twangboy
Copy link
Contributor

twangboy commented Mar 4, 2024

I belive this has been fixed by #64001

@twangboy twangboy closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beacon Bug broken, incorrect, or confusing behavior Execution-Module Windows
Projects
None yet
Development

No branches or pull requests

4 participants