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] Failed to enable unit: Unit file /etc/systemd/system/salt-master.service is masked. #66507

Open
2 of 9 tasks
dseomn opened this issue May 12, 2024 · 1 comment
Open
2 of 9 tasks
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@dseomn
Copy link
Contributor

dseomn commented May 12, 2024

Description

When I try to install salt-master from the repo mentioned by https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/debian.html I get this error:

Setting up salt-master (3007.0) ...
/usr/bin/systemctl
Synchronizing state of salt-master.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable salt-master
Failed to enable unit: Unit file /etc/systemd/system/salt-master.service is masked.
dpkg: error processing package salt-master (--configure):
 installed salt-master package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 salt-master
Error: Sub-process /usr/bin/dpkg returned an error code (1)

I want the salt-run command from the salt-master package, but I don't want to run any salt services, so I masked salt-master.service. Shouldn't the install still work?

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior

  1. Make /etc/systemd/system/salt-master.service a symlink to /dev/null.
  2. Install salt-master 3007.0 from https://repo.saltproject.io/salt/py3/debian/12/amd64/latest

Expected behavior

The package installs successfully, but does not enable or start the salt-master service.

Screenshots
N/A

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3007.0
 
Python Version:
        Python: 3.10.13 (main, Feb 19 2024, 03:31:20) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 1.16.0
      cherrypy: unknown
      dateutil: 2.8.2
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.3
       libgit2: Not Installed
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.7
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 23.1
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.5.2
        PyYAML: 6.0.1
         PyZMQ: 25.1.2
        relenv: 0.15.1
         smmap: Not Installed
       timelib: 0.3.0
       Tornado: 6.3.3
           ZMQ: 4.3.4
 
Salt Package Information:
  Package Type: onedir
 
System Versions:
          dist: debian n/a trixie
        locale: utf-8
       machine: x86_64
       release: 6.7.12-amd64
        system: Linux
       version: Debian GNU/Linux n/a trixie

Additional context
N/A

@dseomn dseomn added Bug broken, incorrect, or confusing behavior needs-triage labels May 12, 2024
@max-arnold
Copy link
Contributor

I can confirm this:

systemctl mask salt-minion
systemctl mask salt-master

Works for the minion:

curl -L https://bootstrap.saltproject.io | sh -s -- -X -d onedir latest

Doesn't work for the master:

curl -L https://bootstrap.saltproject.io | sh -s -- -X -d -M onedir latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants