SUSE Support

Here When You Need Us

Migration to venv-salt-minion does not copy grains information

This document (000020729) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Manager 4.3
susemanager-sls-4.3.18-150400.1.2.noarch

Situation

When executing the migration to the Salt Bundle (see https://documentation.suse.com/suma/4.3/en/suse-manager/client-configuration/contact-methods-saltbundle.html for details), existing grains information in /etc/salt/grains is not being copied to the new /etc/venv-salt-minion directory. 

Resolution

Workaround:

Until a fix will be provided with a regular maintenance update, please add these lines to /usr/share/susemanager/salt/util/mgr_switch_to_venv_minion.sls:

mgr_copy_salt_grains:
  file.copy:
    - name: /etc/venv-salt-minion/grains
    - source: /etc/salt/grains
    - require:
      - pkg: mgr_venv_salt_minion_pkg
    - onlyif:
      - test -f /etc/salt/grains


This will copy /etc/salt/grains to /etc/venv-salt-minion during the migration. For already completed migrations please copy the file manually. 

Additional Information

Procedure:

1. On SUSE Manager:

cp /usr/share/susemanager/salt/util/mgr_switch_to_venv_minion.sls /usr/share/susemanager/salt/util/mgr_switch_to_venv_minion.sls.backup

2. Edit the file and add the lines mentioned in the Resolution section of this article.

3. When done, compare the files using diff. The output returned should be similar to:

diff /usr/share/susemanager/salt/util/mgr_switch_to_venv_minion.sls /usr/share/susemanager/salt/util/mgr_switch_to_venv_minion.sls.backup
29,37d28
< mgr_copy_salt_grains:
<   file.copy:
<     - name: /etc/venv-salt-minion/grains
<     - source: /etc/salt/grains
<     - require:
<       - pkg: mgr_venv_salt_minion_pkg
<     - onlyif:
<       - test -f /etc/salt/grains


4. Continue with the migration as outlined in the documentation.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020729
  • Creation Date: 19-Aug-2022
  • Modified Date:19-Aug-2022
    • SUSE Manager Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.