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

What's the correct way to install packages into onedir during bootstrapping? #1933

Open
smitelli opened this issue May 31, 2023 · 1 comment

Comments

@smitelli
Copy link

Description of Issue/Question

When installing the new "onedir" version of Salt, by default there are no pip packages installed to allow for connection to a MySQL database. All of the mysql.* states fail with an error similar to the following:

----------
          ID: db-user
    Function: mysql_user.present
        Name: testing
      Result: False
     Comment: State 'mysql_user.present' was not found in SLS 'salt.minion'
              Reason: 'mysql_user' __virtual__ returned False: mysql module could not be loaded
     Changes:
----------

In order to make these work, I find I now have to install the build-essential and libmariadb-dev packages using the system package manager, then install mysqlclient into onedir using salt-pip. That works and is relatively straightforward, but it feels like I'm doing something wrong by installing things in this way.

The pre-onedir versions of Salt (3005 and earlier) worked out of the box in this regard -- once bootstrap-salt.sh finished I was able to use mysql.* states without any additional effort. I opened this issue to inquire if there was a way for salt-bootstrap to make this simpler and less platform-specific for me.

Setup

sudo ./bootstrap-salt.sh -X -F -c /tmp
sudo apt-get install build-essential libmariadb-dev
sudo salt-pip install mysqlclient

Versions and Systems

  • bootstrap-salt.sh version 2023.04.26
  • salt version 3006.1
  • debian 11 bullseye (x86_64)
@dmurphy18
Copy link
Contributor

dmurphy18 commented Jul 26, 2024

@smitelli Can you retry with the latest bootstrap script which has been heavily updated this July, noting that support for older EOL version of Salt has been dropped. If the latest version of the bootstrap scrip resolves your issues, please consider closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants