salt-bootstrap icon indicating copy to clipboard operation
salt-bootstrap copied to clipboard

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

Open smitelli opened this issue 2 years ago • 1 comments

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)

smitelli avatar May 31 '23 01:05 smitelli

@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.

dmurphy18 avatar Jul 26 '24 19:07 dmurphy18

@smitelli Given there has been no response since July, closing this as unresponsive, however please do try the latest v2024.12.12, there have been many changes in infrastructure and testing since July.

dmurphy18 avatar Dec 12 '24 20:12 dmurphy18